61 amBazooka: FollowGear:= AddGear(round(X), round(Y), gtAmmo_Grenade, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor); |
61 amBazooka: FollowGear:= AddGear(round(X), round(Y), gtAmmo_Grenade, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor); |
62 amGrenade: FollowGear:= AddGear(round(X), round(Y), gtAmmo_Bomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo[CurSlot, CurAmmo].Timer); |
62 amGrenade: FollowGear:= AddGear(round(X), round(Y), gtAmmo_Bomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo[CurSlot, CurAmmo].Timer); |
63 amUFO: FollowGear:= AddGear(round(X), round(Y), gtUFO, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor); |
63 amUFO: FollowGear:= AddGear(round(X), round(Y), gtUFO, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor); |
64 amShotgun: begin |
64 amShotgun: begin |
65 PlaySound(sndShotgunReload); |
65 PlaySound(sndShotgunReload); |
66 FollowGear:= AddGear(round(X), round(Y), gtShotgunShot, 0, xx * 0.5, yy * 0.5); |
66 CurAmmoGear:= AddGear(round(X), round(Y), gtShotgunShot, 0, xx * 0.5, yy * 0.5); |
67 end; |
67 end; |
68 amDEagle: begin |
68 amDEagle: begin |
69 FollowGear:= AddGear(round(X), round(Y), gtDEagleShot, 0, xx * 0.5, yy * 0.5); |
69 FollowGear:= AddGear(round(X), round(Y), gtDEagleShot, 0, xx * 0.5, yy * 0.5); |
70 end; |
70 end; |
71 amSkip: TurnTimeLeft:= 0; |
71 amSkip: TurnTimeLeft:= 0; |
133 end; |
133 end; |
134 AllInactive:= false; |
134 AllInactive:= false; |
135 DeleteCI(Gear); |
135 DeleteCI(Gear); |
136 if (TurnTimeLeft = 0) or (Gear.Damage > 0) then |
136 if (TurnTimeLeft = 0) or (Gear.Damage > 0) then |
137 begin |
137 begin |
|
138 TurnTimeLeft:= 0; |
138 if ((Gear.State and (gstMoving or gstFalling)) = 0) |
139 if ((Gear.State and (gstMoving or gstFalling)) = 0) |
139 and (CurAmmoGear = nil) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
140 and (CurAmmoGear = nil) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
140 Gear.State:= Gear.State and not gstHHDriven; |
141 Gear.State:= Gear.State and not gstHHDriven; |
141 if Gear.Damage > 0 then |
142 if Gear.Damage > 0 then |
142 Gear.State:= Gear.State and not gstHHJumping; |
143 Gear.State:= Gear.State and not gstHHJumping; |
178 else Gear.Message:= Gear.Message and not gm_Attack; |
179 else Gear.Message:= Gear.Message and not gm_Attack; |
179 |
180 |
180 if ((Gear.State and gstAttacking) <> 0) and ((Gear.Message and gm_Attack) = 0) then |
181 if ((Gear.State and gstAttacking) <> 0) and ((Gear.Message and gm_Attack) = 0) then |
181 begin |
182 begin |
182 Attack(Gear); |
183 Attack(Gear); |
183 StepTicks:= 40 |
184 StepTicks:= cHHStepTicks |
184 end; |
185 end; |
185 |
186 |
186 if (Gear.State and gstFalling) <> 0 then |
187 if (Gear.State and gstFalling) <> 0 then |
187 begin |
188 begin |
188 // it could be the source to trick: double-backspace jump -> vertical wall |
189 // it could be the source to trick: double-backspace jump -> vertical wall |