Changeset 287 for trunk/UCore.pas
- Timestamp:
- Mar 24, 2019, 2:26:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r284 r287 353 353 354 354 procedure TCore.AGameNewExecute(Sender: TObject); 355 var 356 NewServer: TServer; 355 357 begin 356 358 FormNew := TFormNew.Create(nil); 357 359 try 358 FormNew.Load(Server); 360 NewServer := TServer.Create; 361 NewServer.Assign(Server); 362 NewServer.Game := TGame.Create; 363 NewServer.Game.Assign(GameSettings); 364 FormNew.Server := NewServer; 359 365 FormNew.PageControl1.TabIndex := FormNewTabIndex; 360 366 if FormNew.ShowModal = mrOk then begin 367 Server.Assign(NewServer); 368 Server.Game := Game; 361 369 Game.Running := False; 362 FormNew.Save(Server);363 Game Settings.PostConfig;364 Game .Assign(GameSettings);370 Game.PostConfig; 371 Game.Assign(NewServer.Game); 372 GameSettings.Assign(NewServer.Game); 365 373 SaveConfigAll; 366 374 StartNewGame; … … 368 376 end; 369 377 FormNewTabIndex := FormNew.PageControl1.TabIndex; 378 NewServer.Game.Free; 379 NewServer.Game := nil; 380 NewServer.Free; 370 381 finally 371 382 FormNew.Free;
Note:
See TracChangeset
for help on using the changeset viewer.