1403 Gear^.State := Gear^.State or gstAnimation; |
1403 Gear^.State := Gear^.State or gstAnimation; |
1404 if ((Gear^.dX.QWordValue <> 0) or (Gear^.dY.QWordValue <> 0)) then |
1404 if ((Gear^.dX.QWordValue <> 0) or (Gear^.dY.QWordValue <> 0)) then |
1405 begin |
1405 begin |
1406 DeleteCI(Gear); |
1406 DeleteCI(Gear); |
1407 AllInactive := false; |
1407 AllInactive := false; |
1408 if not Gear^.dY.isNegative and (Gear^.dY > _0_03) and TestCollisionYwithGear(Gear, 1) then |
1408 if not Gear^.dY.isNegative and (Gear^.dY > _0_2) and TestCollisionYwithGear(Gear, 1) then |
1409 begin |
1409 begin |
1410 Gear^.State := Gear^.State or gsttmpFlag; |
1410 Gear^.State := Gear^.State or gsttmpFlag; |
1411 inc(Gear^.Damage, hwRound(Gear^.dY * _50)); |
1411 inc(Gear^.Damage, hwRound(Gear^.dY * _70)); |
1412 for i:= min(12, hwRound(Gear^.dY*_10)) downto 0 do |
1412 for i:= min(12, hwRound(Gear^.dY*_10)) downto 0 do |
1413 begin |
1413 begin |
1414 particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, |
1414 particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, |
1415 vgtDust); |
1415 vgtDust); |
1416 if particle <> nil then particle^.dX := particle^.dX + (Gear^.dX / 5) |
1416 if particle <> nil then particle^.dX := particle^.dX + (Gear^.dX / 5) |
1417 end |
1417 end |
1418 end |
1418 end |
1419 else if not Gear^.dX.isNegative and (Gear^.dX > _0_03) and TestCollisionXwithGear(Gear, 1) |
1419 else if not Gear^.dX.isNegative and (Gear^.dX > _0_2) and TestCollisionXwithGear(Gear, 1) |
1420 then |
1420 then |
1421 inc(Gear^.Damage, hwRound(Gear^.dX * _50)) |
1421 inc(Gear^.Damage, hwRound(Gear^.dX * _70)) |
1422 else if Gear^.dY.isNegative and (Gear^.dY < -_0_03) and TestCollisionYwithGear(Gear, -1) |
1422 else if Gear^.dY.isNegative and (Gear^.dY < -_0_2) and TestCollisionYwithGear(Gear, -1) |
1423 then |
1423 then |
1424 inc(Gear^.Damage, hwRound(Gear^.dY * -_50)) |
1424 inc(Gear^.Damage, hwRound(Gear^.dY * -_70)) |
1425 else if Gear^.dX.isNegative and (Gear^.dX < -_0_03) and TestCollisionXwithGear(Gear, -1) |
1425 else if Gear^.dX.isNegative and (Gear^.dX < -_0_2) and TestCollisionXwithGear(Gear, -1) |
1426 then |
1426 then |
1427 inc(Gear^.Damage, hwRound(Gear^.dX * -_50)); |
1427 inc(Gear^.Damage, hwRound(Gear^.dX * -_70)); |
1428 |
1428 |
1429 doStepFallingGear(Gear); |
1429 doStepFallingGear(Gear); |
1430 CalcRotationDirAngle(Gear); |
1430 CalcRotationDirAngle(Gear); |
1431 //CheckGearDrowning(Gear) |
1431 //CheckGearDrowning(Gear) |
1432 end |
1432 end |
1540 Gear^.Y := Gear^.Y + Gear^.dY; |
1540 Gear^.Y := Gear^.Y + Gear^.dY; |
1541 if (not Gear^.dY.isNegative) and (Gear^.dY > _0_001) then SetAllHHToActive; |
1541 if (not Gear^.dY.isNegative) and (Gear^.dY > _0_001) then SetAllHHToActive; |
1542 if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY := _0; |
1542 if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY := _0; |
1543 if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then |
1543 if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then |
1544 begin |
1544 begin |
1545 if (Gear^.dY > _0_02) and (k = gtExplosives) then |
1545 if (Gear^.dY > _0_2) and (k = gtExplosives) then |
1546 inc(Gear^.Damage, hwRound(Gear^.dY * _40)); |
1546 inc(Gear^.Damage, hwRound(Gear^.dY * _70)); |
1547 |
1547 |
1548 if Gear^.dY > _0_2 then |
1548 if Gear^.dY > _0_2 then |
1549 for i:= min(12, hwRound(Gear^.dY*_10)) downto 0 do |
1549 for i:= min(12, hwRound(Gear^.dY*_10)) downto 0 do |
1550 AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust) |
1550 AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust) |
1551 ; |
1551 ; |