Changeset 304 for trunk/UCore.pas


Ignore:
Timestamp:
Aug 11, 2019, 4:53:05 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: First game system was rewritten by game system stored in game file.
  • Modified: Each TGame instance has own TGameSystem instance and different game systems are assigned.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r301 r304  
    616616  end;
    617617  if GameSystems.Count > 0 then begin
    618     GameSettings.GameSystem := GameSystems.First;
    619     Game.GameSystem := GameSystems.First;
     618    GameSettings.GameSystem.Assign(GameSystems.First);
     619    Game.GameSystem.Assign(GameSystems.First);
    620620  end;
    621621end;
     
    740740    // GameSystemName needs to be loaded before game systems config itself.
    741741    // Players reference Nations from game system.
    742     GameSettings.GameSystemName := string(XMLConfig1.GetValue(DOMString('Game/GameSystemName'), DOMString('HexWars')));
    743     GameSettings.GameSystem := GameSystems.SearchByName(GameSettings.GameSystemName);
    744 
     742    GameSettings.GameSystem.Assign(GameSystems.SearchByName(string(XMLConfig1.GetValue(DOMString('Game/GameSystemName'), DOMString('HexWars')))));
    745743    GameSettings.LoadConfig(XMLConfig1, 'Game');
    746     if not Assigned(GameSettings.GameSystem) then
    747       GameSettings.GameSystem := GameSystems.First;
    748744    Server.LoadConfig(XMLConfig1, 'Server');
    749745    ServerList.LoadConfig(XmlConfig1, 'ServerList');
Note: See TracChangeset for help on using the changeset viewer.