equal
deleted
inserted
replaced
255 if (TurnTimeLeft = 0) or (Gear^.Damage > 0) then |
255 if (TurnTimeLeft = 0) or (Gear^.Damage > 0) then |
256 begin |
256 begin |
257 TurnTimeLeft:= 0; |
257 TurnTimeLeft:= 0; |
258 Gear^.State:= Gear^.State and not gstHHDriven; |
258 Gear^.State:= Gear^.State and not gstHHDriven; |
259 if Gear^.Damage > 0 then |
259 if Gear^.Damage > 0 then |
260 Gear^.State:= Gear^.State and not gstHHJumping; |
260 Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump); |
261 exit |
261 exit |
262 end; |
262 end; |
263 if ((Gear^.State and gstFalling) <> 0) or (StepTicks = cHHStepTicks) |
263 if ((Gear^.State and gstFalling) <> 0) or (StepTicks = cHHStepTicks) |
264 or (CurAmmoGear <> nil) then // we're moving |
264 or (CurAmmoGear <> nil) then // we're moving |
265 begin |
265 begin |
278 if ((Gear^.Message and gm_Attack) <> 0) or |
278 if ((Gear^.Message and gm_Attack) <> 0) or |
279 ((Gear^.State and gstAttacking) <> 0)then Attack(Gear); |
279 ((Gear^.State and gstAttacking) <> 0)then Attack(Gear); |
280 |
280 |
281 if (Gear^.State and gstFalling) <> 0 then |
281 if (Gear^.State and gstFalling) <> 0 then |
282 begin |
282 begin |
283 // it could be the source to trick: hwFloat-backspace jump -> vertical wall |
283 if ((Gear^.Message and gm_HJump) <> 0) and |
284 // collision - > (abs(Gear^.dX) < 0.0000002) -> backspace -> even more high jump |
284 ((Gear^.State and gstHHJumping) <> 0) and |
285 if ((Gear^.Message and gm_HJump) <> 0) and ((Gear^.State and gstHHJumping) <> 0) then |
285 ((Gear^.State and gstHHHJump) = 0) then |
286 if (hwAbs(Gear^.dX) < cLittle + cLittle) and (Gear^.dY < -_0_02) then |
286 if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then |
287 begin |
287 begin |
|
288 Gear^.State:= Gear^.State or gstHHHJump; |
288 Gear^.dY:= -_0_25; |
289 Gear^.dY:= -_0_25; |
289 Gear^.dX:= hwSign(Gear^.dX) * _0_02 |
290 Gear^.dX:= hwSign(Gear^.dX) * _0_02 |
290 end; |
291 end; |
291 Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
292 Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
292 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX); |
293 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX); |
297 if (not Gear^.dY.isNegative)and TestCollisionYwithGear(Gear, 1) then |
298 if (not Gear^.dY.isNegative)and TestCollisionYwithGear(Gear, 1) then |
298 begin |
299 begin |
299 CheckHHDamage(Gear); |
300 CheckHHDamage(Gear); |
300 if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55) |
301 if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55) |
301 and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); |
302 and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); |
302 Gear^.State:= Gear^.State and not (gstFalling or gstHHJumping); |
303 Gear^.State:= Gear^.State and not (gstFalling or gstHHJumping or gstHHHJump); |
303 StepTicks:= 300; |
304 StepTicks:= 300; |
304 Gear^.dY:= 0 |
305 Gear^.dY:= 0 |
305 end; |
306 end; |
306 CheckGearDrowning(Gear); |
307 CheckGearDrowning(Gear); |
307 exit |
308 exit |