equal
deleted
inserted
replaced
1078 if Gear^.Timer = 0 then |
1078 if Gear^.Timer = 0 then |
1079 begin |
1079 begin |
1080 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
1080 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
1081 end |
1081 end |
1082 end; |
1082 end; |
1083 gtATSmoothWindCh: |
1083 gtATFinishGame: |
1084 begin |
1084 begin |
1085 if Gear^.Timer = 0 then |
1085 AllInactive := false; |
1086 begin |
1086 if Gear^.Timer = 1000 then |
1087 if WindBarWidth < Gear^.Tag then inc(WindBarWidth) |
1087 begin |
1088 else if WindBarWidth > Gear^.Tag then dec(WindBarWidth); |
1088 ScreenFade := sfToBlack; |
1089 if WindBarWidth <> Gear^.Tag then Gear^.Timer := 10; |
1089 ScreenFadeValue := 0; |
1090 end |
1090 ScreenFadeSpeed := 1; |
1091 end; |
1091 end; |
1092 gtATFinishGame: |
1092 if Gear^.Timer = 0 then |
1093 begin |
1093 begin |
1094 AllInactive := false; |
1094 SendIPC('N'); |
1095 if Gear^.Timer = 1000 then |
1095 SendIPC('q'); |
1096 begin |
1096 GameState := gsExit |
1097 ScreenFade := sfToBlack; |
1097 end |
1098 ScreenFadeValue := 0; |
1098 end; |
1099 ScreenFadeSpeed := 1; |
|
1100 end; |
|
1101 if Gear^.Timer = 0 then |
|
1102 begin |
|
1103 SendIPC('N'); |
|
1104 SendIPC('q'); |
|
1105 GameState := gsExit |
|
1106 end |
|
1107 end; |
|
1108 end; |
1099 end; |
1109 if Gear^.Timer = 0 then DeleteGear(Gear) |
1100 if Gear^.Timer = 0 then DeleteGear(Gear) |
1110 end; |
1101 end; |
1111 |
1102 |
1112 //////////////////////////////////////////////////////////////////////////////// |
1103 //////////////////////////////////////////////////////////////////////////////// |
1875 procedure doStepRollingBarrel(Gear: PGear); |
1866 procedure doStepRollingBarrel(Gear: PGear); |
1876 var |
1867 var |
1877 i: LongInt; |
1868 i: LongInt; |
1878 particle: PVisualGear; |
1869 particle: PVisualGear; |
1879 begin |
1870 begin |
|
1871 if (Gear^.dY.QWordValue = 0) and (Gear^.dY.QWordValue = 0) and not TestCollisionYwithGear(Gear, 1) then SetLittle(Gear^.dY); |
1880 Gear^.State := Gear^.State or gstAnimation; |
1872 Gear^.State := Gear^.State or gstAnimation; |
1881 if ((Gear^.dX.QWordValue <> 0) or (Gear^.dY.QWordValue <> 0)) then |
1873 if ((Gear^.dX.QWordValue <> 0) or (Gear^.dY.QWordValue <> 0)) then |
1882 begin |
1874 begin |
1883 DeleteCI(Gear); |
1875 DeleteCI(Gear); |
1884 AllInactive := false; |
1876 AllInactive := false; |
2414 Gear^.Y := int2hwFloat(topY-300); |
2406 Gear^.Y := int2hwFloat(topY-300); |
2415 Gear^.dX := int2hwFloat(TargetPoint.X - 5 * Gear^.Tag * 15); |
2407 Gear^.dX := int2hwFloat(TargetPoint.X - 5 * Gear^.Tag * 15); |
2416 |
2408 |
2417 // calcs for Napalm Strike, so that it will hit the target (without wind at least :P) |
2409 // calcs for Napalm Strike, so that it will hit the target (without wind at least :P) |
2418 if (Gear^.State = 2) then |
2410 if (Gear^.State = 2) then |
2419 Gear^.dX := Gear^.dX - cBombsSpeed * Gear^.Tag * 1000 // ^.Timer of gtNapalmBomb, make it a constant var if you prefer that :P |
2411 Gear^.dX := Gear^.dX - cBombsSpeed * Gear^.Tag * 900 |
2420 // calcs for regular falling gears |
2412 // calcs for regular falling gears |
2421 else if (int2hwFloat(TargetPoint.Y) - Gear^.Y > _0) then |
2413 else if (int2hwFloat(TargetPoint.Y) - Gear^.Y > _0) then |
2422 Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 / |
2414 Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 / |
2423 cGravity) * Gear^.Tag; |
2415 cGravity) * Gear^.Tag; |
2424 |
2416 |