1262 if k = gtExplosives then |
1262 if k = gtExplosives then |
1263 begin |
1263 begin |
1264 V:= hwSqr(Gear^.dX) + hwSqr(Gear^.dY); |
1264 V:= hwSqr(Gear^.dX) + hwSqr(Gear^.dY); |
1265 //if V > _0_03 then Gear^.State:= Gear^.State or gstAnimation; |
1265 //if V > _0_03 then Gear^.State:= Gear^.State or gstAnimation; |
1266 if hwAbs(Gear^.dX) > _0_15 then Gear^.State:= Gear^.State or gstAnimation; |
1266 if hwAbs(Gear^.dX) > _0_15 then Gear^.State:= Gear^.State or gstAnimation; |
|
1267 if ((Gear^.State and gstAnimation) = 0) or (hwAbs(Gear^.dX) < _0_001) then Gear^.dX:= _0; |
1267 if ((Gear^.State and gstAnimation) <> 0) and (Gear^.dX.QWordValue <> 0) and (Gear^.dY.QWordValue <> 0) then |
1268 if ((Gear^.State and gstAnimation) <> 0) and (Gear^.dX.QWordValue <> 0) and (Gear^.dY.QWordValue <> 0) then |
1268 begin |
1269 begin |
1269 AllInactive:= false; |
1270 AllInactive:= false; |
1270 doStepFallingGear(Gear); |
1271 doStepFallingGear(Gear); |
1271 CalcRotationDirAngle(Gear) |
1272 CalcRotationDirAngle(Gear) |
1272 end; |
1273 end; |
1273 if hwAbs(Gear^.dX) < _0_0002 then Gear^.dX:= _0; |
|
1274 |
1274 |
1275 if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then |
1275 if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then |
1276 AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke); |
1276 AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke); |
1277 dec(Gear^.Health, Gear^.Damage); |
1277 dec(Gear^.Health, Gear^.Damage); |
1278 Gear^.Damage:= 0; |
1278 Gear^.Damage:= 0; |