hedgewars/GSHandlers.inc
changeset 8679 a8bdcf7bec20
parent 8668 b04a3724e328
child 8727 43b1487f02f6
equal deleted inserted replaced
8678:fb62d23c70f8 8679:a8bdcf7bec20
  1151 procedure doStepActionTimer(Gear: PGear);
  1151 procedure doStepActionTimer(Gear: PGear);
  1152 begin
  1152 begin
  1153 dec(Gear^.Timer);
  1153 dec(Gear^.Timer);
  1154 case Gear^.Kind of
  1154 case Gear^.Kind of
  1155     gtATStartGame: 
  1155     gtATStartGame: 
  1156     begin
  1156         begin
  1157         AllInactive := false;
  1157         AllInactive := false;
  1158         if Gear^.Timer = 0 then
  1158         if Gear^.Timer = 0 then
  1159             begin
  1159             begin
  1160             AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState);
  1160             AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState);
  1161             end
  1161             end
  1162     end;
  1162         end;
  1163     gtATFinishGame: 
  1163     gtATFinishGame: 
  1164     begin
  1164         begin
  1165         AllInactive := false;
  1165         AllInactive := false;
  1166         if Gear^.Timer = 1000 then
  1166         if Gear^.Timer = 1000 then
  1167             begin
  1167             begin
  1168             ScreenFade := sfToBlack;
  1168             ScreenFade := sfToBlack;
  1169             ScreenFadeValue := 0;
  1169             ScreenFadeValue := 0;
  1173             begin
  1173             begin
  1174             SendIPC(_S'N');
  1174             SendIPC(_S'N');
  1175             SendIPC(_S'q');
  1175             SendIPC(_S'q');
  1176             GameState := gsExit
  1176             GameState := gsExit
  1177             end
  1177             end
       
  1178         end;
  1178     end;
  1179     end;
  1179 end;
       
  1180 if Gear^.Timer = 0 then
  1180 if Gear^.Timer = 0 then
  1181     DeleteGear(Gear)
  1181     DeleteGear(Gear)
  1182 end;
  1182 end;
  1183 
  1183 
  1184 ////////////////////////////////////////////////////////////////////////////////
  1184 ////////////////////////////////////////////////////////////////////////////////