148 amMine: begin |
148 amMine: begin |
149 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000); |
149 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000); |
150 PlaySound(sndLaugh, false, CurrentTeam^.voicepack) |
150 PlaySound(sndLaugh, false, CurrentTeam^.voicepack) |
151 end; |
151 end; |
152 amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); |
152 amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); |
|
153 amSniperRifle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0); |
153 amDynamite: begin |
154 amDynamite: begin |
154 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000); |
155 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000); |
155 PlaySound(sndLaugh, false, CurrentTeam^.voicepack) |
156 PlaySound(sndLaugh, false, CurrentTeam^.voicepack) |
156 end; |
157 end; |
157 amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, xx, _0, 0); |
158 amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, xx, _0, 0); |
183 amNapalm: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 2, _0, _0, 0); |
184 amNapalm: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 2, _0, _0, 0); |
184 amDrill: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); |
185 amDrill: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); |
185 amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); |
186 amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); |
186 amLowGravity: cGravity:= cMaxWindSpeed / 2; |
187 amLowGravity: cGravity:= cMaxWindSpeed / 2; |
187 amExtraDamage: cDamageModifier:= _1_5; |
188 amExtraDamage: cDamageModifier:= _1_5; |
188 //this flag unfortunately gets cleared too often for true invulnerability, although it seemed like the natural choice |
|
189 //amInvulnerable: State:= State or gstNoDamage; |
|
190 amInvulnerable: Invulnerable:= true; |
189 amInvulnerable: Invulnerable:= true; |
191 amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000; |
190 amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000; |
192 amLaserSight: cLaserSighting:= true; |
191 amLaserSight: cLaserSighting:= true; |
193 amVampiric: cVampiric:= true; |
192 amVampiric: cVampiric:= true; |
194 end; |
193 end; |
395 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
394 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
396 if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) |
395 if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) |
397 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
396 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
398 end; |
397 end; |
399 |
398 |
400 // ARTILLERY HERE |
399 if (not cArtillery) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); |
401 if not TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); |
|
402 SetAllHHToActive; |
400 SetAllHHToActive; |
403 |
401 |
404 if not TestCollisionYwithGear(Gear, 1) then |
402 if not TestCollisionYwithGear(Gear, 1) then |
405 begin |
403 begin |
406 Gear^.Y:= Gear^.Y + _1; |
404 Gear^.Y:= Gear^.Y + _1; |
626 ((Gear^.State and gstHHHJump) = 0) then |
624 ((Gear^.State and gstHHHJump) = 0) then |
627 if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then |
625 if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then |
628 begin |
626 begin |
629 Gear^.State:= Gear^.State or gstHHHJump or gstMoving; |
627 Gear^.State:= Gear^.State or gstHHHJump or gstMoving; |
630 Gear^.dY:= -_0_25; |
628 Gear^.dY:= -_0_25; |
631 Gear^.dX:= -SignAs(_0_02, Gear^.dX); |
629 if not cArtillery then Gear^.dX:= -SignAs(_0_02, Gear^.dX); |
632 PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) |
630 PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) |
633 end; |
631 end; |
634 |
632 |
635 Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
633 Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
636 |
634 |