Changeset 184 for trunk/UCore.pas
- Timestamp:
- Feb 12, 2018, 12:44:04 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r183 r184 8 8 Classes, SysUtils, XMLConf, FileUtil, ActnList, Controls, Dialogs, Forms, 9 9 UGame, UApplicationInfo, UPersistentForm, UScaleDPI, UCoolTranslator, 10 URegistry, ULastOpenedList, Registry, Menus, UGeometry, Contnrs, UFormClient; 10 URegistry, ULastOpenedList, Registry, Menus, UGeometry, Contnrs, UFormClient, 11 UGameServer, UGameClient; 11 12 12 13 type … … 104 105 105 106 uses 106 UFormM ove, UFormMain, UFormNew, UFormSettings, UFormAbout,107 UFormMain, UFormNew, UFormSettings, UFormAbout, 107 108 UFormHelp, UFormCharts, UFormUnitMoves, UFormPlayersStats; 108 109 … … 218 219 begin 219 220 FirstHuman := Game.Players.GetFirstHuman; 220 if Assigned(FirstHuman) then FormClient.Client := FirstHuman.Client221 if Assigned(FirstHuman) then FormClient.Client := Server.Clients.SearchPlayer(FirstHuman) 221 222 else FormClient.Client := TClient(Server.Clients.First); 222 223 end; … … 380 381 Game.OnNewTurn := GameNewTurnExecute; 381 382 Game.OnPlayerChange := DoPlayerChange; 382 Game.Server := Server;383 383 Server.Game := Game; 384 384 StoredDimension := TControlDimension.Create; … … 447 447 begin 448 448 Form := TFormClient.Create(nil); 449 Form.Client := Game.Server.Clients.New(SSpectator);449 Form.Client := Server.Clients.New(SSpectator); 450 450 //Form.Client.Form := Form; 451 451 //Form.Client.ControlPlayer := Player; … … 470 470 471 471 procedure TCore.DoPlayerChange(Sender: TObject); 472 begin 473 if Assigned(Game.CurrentPlayer) and Assigned(Game.CurrentPlayer.Client) then begin 474 FormClient.Client := Game.CurrentPlayer.Client; 472 var 473 PlayerClient: TClient; 474 begin 475 if Assigned(Game.CurrentPlayer) then begin 476 PlayerClient := Server.Clients.SearchPlayer(Game.CurrentPlayer); 477 if Assigned(PlayerClient) then FormClient.Client := PlayerClient; 475 478 end; 476 479 UpdateOtherForms;
Note:
See TracChangeset
for help on using the changeset viewer.