Changeset 182 for trunk/UCore.pas


Ignore:
Timestamp:
Feb 9, 2018, 10:06:13 AM (7 years ago)
Author:
chronos
Message:
  • Added: Popup menu action Spectate in Players stats window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r181 r182  
    9191    //CurrentClient: TClient;
    9292    LocalClients: TObjectList; // TClient
     93    procedure Spectate(Player: TPlayer);
    9394    procedure UpdateActions;
    9495    procedure Init;
     
    359360
    360361procedure TCore.ANewSpectatorClientExecute(Sender: TObject);
    361 var
    362   Form: TFormClient;
    363 begin
    364   Form := TFormClient.Create(nil);
    365   Form.Client := Game.Server.Clients.New(SSpectator);
    366   //Form.Client.Form := Form;
    367   Form.AZoomAll.Execute;
    368   Form.Show;
     362begin
     363  Spectate(nil);
    369364end;
    370365
     
    480475end;
    481476
     477procedure TCore.Spectate(Player: TPlayer);
     478var
     479  Form: TFormClient;
     480begin
     481  Form := TFormClient.Create(nil);
     482  Form.Client := Game.Server.Clients.New(SSpectator);
     483  //Form.Client.Form := Form;
     484  //Form.Client.ControlPlayer := Player;
     485  Form.AZoomAll.Execute;
     486  Form.Show;
     487end;
     488
    482489procedure TCore.StartNewGame;
    483490begin
Note: See TracChangeset for help on using the changeset viewer.