# HG changeset patch # User alfadur # Date 1593182422 -10800 # Node ID afeffdb4a712a3626d3d4a05cc9031d47c95a2ca # Parent 1ee7790caa0fac701b2a95e88a71c9ee7856149d add sentry 🤖 stub diff -r 1ee7790caa0f -r afeffdb4a712 QTfrontend/weapons.h --- a/QTfrontend/weapons.h Thu Jun 25 22:16:11 2020 +0200 +++ b/QTfrontend/weapons.h Fri Jun 26 17:40:22 2020 +0300 @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#define AMMOLINE_EMPTY_QT "00000090000000000000000000000000000000000000000000000000000" -#define AMMOLINE_EMPTY_PROB "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_EMPTY_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_EMPTY_CRATE "13111103121111111231141111111111111112111111111111111111111" +#define AMMOLINE_EMPTY_QT "000000900000000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_PROB "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_CRATE "131111031211111112311411111111111111121111111111111111111111" /* AmmoType lookup table (use monospace font / cursor movements) @@ -83,68 +83,69 @@ amAirMine-------------------------------------------------------------------------------| amCreeper--------------------------------------------------------------------------------| amMinigun---------------------------------------------------------------------------------| + amSentry-----------------------------------------------------------------------------------| */ -#define AMMOLINE_DEFAULT_QT "93919294221991210322351110012000000002111001010111110001000" -#define AMMOLINE_DEFAULT_PROB "04050405416006555465544647765766666661555101011154111111107" -#define AMMOLINE_DEFAULT_DELAY "00000000000002055000000400070040000000002200000006000200000" -#define AMMOLINE_DEFAULT_CRATE "13111103121111111231141111111111111112111111111111111111111" +#define AMMOLINE_DEFAULT_QT "939192942219912103223511100120000000021110010101111100010001" +#define AMMOLINE_DEFAULT_PROB "040504054160065554655446477657666666615551010111541111111073" +#define AMMOLINE_DEFAULT_DELAY "000000000000020550000004000700400000000022000000060002000000" +#define AMMOLINE_DEFAULT_CRATE "131111031211111112311411111111111111121111111111111111111111" -#define AMMOLINE_CRAZY_QT "99999999999999999929999999999999992999999999999999929991909" -#define AMMOLINE_CRAZY_PROB "11111101111111111111111111111111111111111111111111111111101" -#define AMMOLINE_CRAZY_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_CRAZY_CRATE "13111103121111111231141111111111111112111111111111111111111" +#define AMMOLINE_CRAZY_QT "999999999999999999299999999999999929999999999999999299919099" +#define AMMOLINE_CRAZY_PROB "111111011111111111111111111111111111111111111111111111111011" +#define AMMOLINE_CRAZY_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_CRAZY_CRATE "131111031211111112311411111111111111121111111111111111111111" -#define AMMOLINE_PROMODE_QT "90900090000000000000090000000000000000000000000000000000000" -#define AMMOLINE_PROMODE_PROB "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_PROMODE_DELAY "00000000000002055000000400070040000000002000000000000200000" -#define AMMOLINE_PROMODE_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_PROMODE_QT "909000900000000000000900000000000000000000000000000000000000" +#define AMMOLINE_PROMODE_PROB "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_PROMODE_DELAY "000000000000020550000004000700400000000020000000000002000000" +#define AMMOLINE_PROMODE_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_SHOPPA_QT "00000099000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_PROB "44444100442444022101121212224220000000020004000100110010101" -#define AMMOLINE_SHOPPA_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_SHOPPA_QT "000000990000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_PROB "444441004424440221011212122242200000000200040001001100101010" +#define AMMOLINE_SHOPPA_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_CLEAN_QT "10100090000100000110000000000000000000000000000010000000000" -#define AMMOLINE_CLEAN_PROB "04050405416006555465544647765766666661555101011154111211104" -#define AMMOLINE_CLEAN_DELAY "00000000000000000000000000000000000000000000000000000200000" -#define AMMOLINE_CLEAN_CRATE "13111103121111111231141111111111111112111111111111111111111" +#define AMMOLINE_CLEAN_QT "101000900001000001100000000000000000000000000000100000000000" +#define AMMOLINE_CLEAN_PROB "040504054160065554655446477657666666615551010111541112111040" +#define AMMOLINE_CLEAN_DELAY "000000000000000000000000000000000000000000000000000002000000" +#define AMMOLINE_CLEAN_CRATE "131111031211111112311411111111111111121111111111111111111111" -#define AMMOLINE_MINES_QT "00000099000900000003000000000000000000000000000000000000000" -#define AMMOLINE_MINES_PROB "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_MINES_DELAY "00000000000002055000000400070040000000002000000006000200000" -#define AMMOLINE_MINES_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_MINES_QT "000000990009000000030000000000000000000000000000000000000000" +#define AMMOLINE_MINES_PROB "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_MINES_DELAY "000000000000020550000004000700400000000020000000060002000000" +#define AMMOLINE_MINES_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_PORTALS_QT "90000090020000000021000000000000001100000900000000000000000" -#define AMMOLINE_PORTALS_PROB "04050405416006555465544647765766666661555101011154111211102" -#define AMMOLINE_PORTALS_DELAY "00000000000002055000000400070040000000002000000006000200000" -#define AMMOLINE_PORTALS_CRATE "13111103121111111231141111111111111112111111111111111111111" +#define AMMOLINE_PORTALS_QT "900000900200000000210000000000000011000009000000000000000000" +#define AMMOLINE_PORTALS_PROB "040504054160065554655446477657666666615551010111541112111020" +#define AMMOLINE_PORTALS_DELAY "000000000000020550000004000700400000000020000000060002000000" +#define AMMOLINE_PORTALS_CRATE "131111031211111112311411111111111111121111111111111111111111" -#define AMMOLINE_ONEEVERY_QT "11111191111111111111111111111111111111111111111111111111101" -#define AMMOLINE_ONEEVERY_PROB "11111101111111111111111111111111111111111111111111111111101" -#define AMMOLINE_ONEEVERY_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_ONEEVERY_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_ONEEVERY_QT "111111911111111111111111111111111111111111111111111111111011" +#define AMMOLINE_ONEEVERY_PROB "111111011111111111111111111111111111111111111111111111111011" +#define AMMOLINE_ONEEVERY_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_ONEEVERY_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_BRW_QT "33323392332332322323233131122113000003232203022022200020301" -#define AMMOLINE_BRW_PROB "00000000000000000000000000000000111110000000000000000000000" -#define AMMOLINE_BRW_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_BRW_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_BRW_QT "333233923323323223232331311221130000032322030220222000203010" +#define AMMOLINE_BRW_PROB "000000000000000000000000000000001111100000000000000000000000" +#define AMMOLINE_BRW_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_BRW_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_HIGHLANDER_QT "11111191111111111111019111111111100101111101111001001011101" -#define AMMOLINE_HIGHLANDER_PROB "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_HIGHLANDER_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_HIGHLANDER_CRATE "00000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HIGHLANDER_QT "111111911111111111110191111111111001011111011110010010111010" +#define AMMOLINE_HIGHLANDER_PROB "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HIGHLANDER_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HIGHLANDER_CRATE "000000000000000000000000000000000000000000000000000000000001" -#define AMMOLINE_CONSTRUCTION_QT "11000190000000100100900000000000000000000000000000000000000" -#define AMMOLINE_CONSTRUCTION_PROB "11111101111111100100011111101111111111111101111100101110101" -#define AMMOLINE_CONSTRUCTION_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_CONSTRUCTION_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_CONSTRUCTION_QT "110001900000001001009000000000000000000000000000000000000000" +#define AMMOLINE_CONSTRUCTION_PROB "111111011111111001000111111011111111111111011111001011101010" +#define AMMOLINE_CONSTRUCTION_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_CONSTRUCTION_CRATE "111111011111111111111111111111111111111111111111111111111111" -#define AMMOLINE_SHOPPAPRO_QT "00000099000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPAPRO_PROB "44444000440444000000000000004000000000000000000000000000000" -#define AMMOLINE_SHOPPAPRO_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPAPRO_CRATE "11111101111111111111111111111111111111111111111111111211111" +#define AMMOLINE_SHOPPAPRO_QT "000000990000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPAPRO_PROB "444440004404440000000000000040000000000000000000000000000000" +#define AMMOLINE_SHOPPAPRO_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPAPRO_CRATE "111111011111111111111111111111111111111111111111111112111111" -#define AMMOLINE_HEDGEEDITOR_QT "00000090000000000000000000000000000000000000000000000000000" -#define AMMOLINE_HEDGEEDITOR_PROB "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_HEDGEEDITOR_DELAY "00000000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_HEDGEEDITOR_CRATE "11111101111111111111111111111111111111111111111111111111111" +#define AMMOLINE_HEDGEEDITOR_QT "000000900000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HEDGEEDITOR_PROB "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HEDGEEDITOR_DELAY "000000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_HEDGEEDITOR_CRATE "111111011111111111111111111111111111111111111111111111111111" diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uAIAmmoTests.pas Fri Jun 26 17:40:22 2020 +0300 @@ -140,7 +140,8 @@ (proc: nil; flags: 0), // amRubber (proc: @TestAirMine; flags: amtest_LaserSight), // amAirMine (proc: nil; flags: 0), // amCreeper - (proc: @TestMinigun; flags: amtest_LaserSight) // amMinigun + (proc: @TestMinigun; flags: amtest_LaserSight), // amMinigun + (proc: nil; flags: 0) // amSentry ); implementation diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uGears.pas Fri Jun 26 17:40:22 2020 +0300 @@ -1461,7 +1461,8 @@ @doStepKnife, @doStepCreeper, @doStepMinigun, - @doStepMinigunBullet); + @doStepMinigunBullet, + @doStepSentry); begin doStepHandlers:= handlers; diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Fri Jun 26 17:40:22 2020 +0300 @@ -141,6 +141,7 @@ procedure doStepMinigunWork(Gear: PGear); procedure doStepMinigun(Gear: PGear); procedure doStepMinigunBullet(Gear: PGear); +procedure doStepSentry(Gear: PGear); var upd: Longword; @@ -7170,4 +7171,11 @@ Gear^.doStep := @doStepBulletWork end; +//////////////////////////////////////////////////////////////////////////////// +procedure doStepSentry(Gear: PGear); +begin + CheckGearDrowning(Gear); + doStepFallingGear(Gear); +end; + end. diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uGearsHedgehog.pas Fri Jun 26 17:40:22 2020 +0300 @@ -400,6 +400,7 @@ else newGear^.Tag:= 1; end; + amSentry: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtSentry, 0, SignAs(_0_03, dX), _0, 0); amFirePunch: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 10, hwRound(ly), gtFirePunch, 0, xx, _0, 0); amWhip: begin newGear:= AddGear(hwRound(lx) + hwSign(dX) * 10, hwRound(ly), gtWhip, 0, SignAs(_1, dX), - _0_8, 0); diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uGearsList.pas Fri Jun 26 17:40:22 2020 +0300 @@ -107,6 +107,7 @@ (* gtCreeper *) , amCreeper (* gtMinigun *) , amMinigun (* gtMinigunBullet *) , amMinigun +(* gtSentry *) , amSentry ); @@ -259,6 +260,7 @@ gtSnowball, gtKnife, gtCreeper, + gtSentry, gtMolotov, gtFlake, gtGrave, @@ -315,7 +317,8 @@ gtPoisonCloud: Gear^.Boom := 20; gtKnife: Gear^.Boom := 40000; // arbitrary scaling factor since impact-based gtCreeper: Gear^.Boom := 100; - gtMinigunBullet: Gear^.Boom := 2; + gtMinigunBullet: Gear^.Boom := 2; + gtSentry: Gear^.Boom := 25; end; case Kind of @@ -829,6 +832,10 @@ gear^.Radius:= 1; gear^.Health:= 2; end; + gtSentry: begin + gear^.Radius:= cHHRadius; + gear^.Health:= 100; + end; gtGenericFaller:begin gear^.AdvBounce:= 1; gear^.Radius:= 1; diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uGearsRender.pas Fri Jun 26 17:40:22 2020 +0300 @@ -895,6 +895,7 @@ amClusterBomb: DrawSpriteRotated(sprHandCluster, hx, hy, sign, aangle); amDynamite: DrawSpriteRotated(sprHandDynamite, hx, hy, sign, aangle); amCreeper: DrawSpriteRotatedF(sprHandCreeper, hx, hy, 0, sign, aangle); + amSentry: DrawSpriteRotated(sprHandSentry, hx, hy, sign, aangle); amHellishBomb: DrawSpriteRotated(sprHandHellish, hx, hy, sign, aangle); amGasBomb: DrawSpriteRotated(sprHandCheese, hx, hy, sign, aangle); amMine: DrawSpriteRotated(sprHandMine, hx, hy, sign, aangle); @@ -1742,7 +1743,7 @@ gtCreeper: if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then DrawSpriteRotatedF(sprCreeper, x, y, 1, hwRound(SignAs(_1,Gear^.Hedgehog^.Gear^.X-Gear^.X)), 0) else DrawSpriteRotatedF(sprCreeper, x, y, 1, hwRound(SignAs(_1,Gear^.dX)), 0); - + gtSentry: DrawSprite(sprSentry, x, y, 0, 0); gtGenericFaller: begin // DEBUG: draw gtGenericFaller if Gear^.Tag <> 0 then diff -r 1ee7790caa0f -r afeffdb4a712 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Thu Jun 25 22:16:11 2020 +0200 +++ b/hedgewars/uTypes.pas Fri Jun 26 17:40:22 2020 +0300 @@ -95,7 +95,7 @@ sprSliderInverted, sprFingerBack, sprFingerBackInv, sprTargetPBack, sprTargetPBackInv, sprHealthHud, sprHealthPoisonHud, sprVampHud, sprKarmaHud, sprMedicHud, sprMedicPoisonHud, sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch, sprThroughWrap, - sprDynamiteDefused, sprHogBubble, sprHappy); + sprDynamiteDefused, sprHogBubble, sprHappy, sprSentry, sprHandSentry); // Gears that interact with other Gears and/or Land // first row of gears (