Changeset 211 for trunk/UCore.pas
- Timestamp:
- May 23, 2018, 8:53:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r207 r211 70 70 procedure LoadRecentExecute(Sender: TObject); 71 71 procedure StartNewGame; 72 procedure LoadGame(FileName: string); 72 73 procedure DoPlayerChange(Sender: TObject); 73 74 procedure DoMoveUpdated(UnitMove: TUnitMove); … … 78 79 procedure CommandLineParams; 79 80 procedure SelectClient; 80 procedure LoadGame(FileName: string);81 procedure RedrawClients;82 81 procedure UpdateOtherForms; 83 82 procedure FormClientActions; … … 139 138 I: Integer; 140 139 begin 141 RedrawClients;140 Server.GameEnd; 142 141 if Assigned(Player) then 143 142 ShowMessage(Format(SPlayerWins, [Player.Name])) … … 276 275 if MessageDlg(SEndGame, SEndGameQuestion, mtConfirmation, mbYesNo, 0) = mrYes then begin 277 276 Game.Running := False; 278 RedrawClients;277 Server.GameEnd; 279 278 UpdateActions; 280 279 end; … … 489 488 TPoint.Create(FormClient.PaintBox1.Width, FormClient.PaintBox1.Height)); 490 489 FormClient.AZoomAll.Execute; 491 RedrawClients;492 490 UpdateOtherForms; 493 491 UpdateActions; … … 495 493 if Assigned(ServerClient) then ServerClient.TurnStart 496 494 else raise Exception.Create(SMissingServerClientForPlayer); 497 end;498 499 procedure TCore.RedrawClients;500 var501 Form: TFormClient;502 begin503 for Form in FormClients do504 Form.Redraw;505 FormClient.Redraw;506 495 end; 507 496 … … 579 568 if Game.Players.GetAliveCount = Game.Players.Count then Game.Running := True 580 569 else ShowMessage(Format(SPlayersNotInitialized, [Game.Players.Count, Game.Players.GetAliveCount])); 581 FormClient.AZoomAll.Execute;582 RedrawClients;583 570 UpdateOtherForms; 584 571 UpdateActions; … … 594 581 begin 595 582 if Assigned(Game.CurrentPlayer) then begin 596 PlayerClient := LocalClients.SearchPlayer(Game.CurrentPlayer); 597 if Assigned(PlayerClient) then FormClient.Client := PlayerClient; 583 if Game.CurrentPlayer.Mode = pmHuman then begin 584 PlayerClient := LocalClients.SearchPlayer(Game.CurrentPlayer); 585 if Assigned(PlayerClient) then FormClient.Client := PlayerClient; 586 end; 598 587 599 588 ServerClient := Server.Clients.SearchByPlayer(Game.CurrentPlayer);
Note:
See TracChangeset
for help on using the changeset viewer.