Browse Source

Fix crash on game load from missing local player

tags/v1.0.0
NGnius (Graham) 4 years ago
parent
commit
caf714a3d9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      Leadercraft/Scoring/GameLoop.cs

+ 1
- 1
Leadercraft/Scoring/GameLoop.cs View File

@@ -33,8 +33,8 @@ namespace Leadercraft.Scoring

private static void loopPass(EntitiesDB entitiesDB)
{
if (localPlayer == null) localPlayer = new Player(PlayerType.Local);
if (!State.IsPlayingGame) return;
if (localPlayer == null && Player.Exists(PlayerType.Local)) localPlayer = new Player(PlayerType.Local);
FilteredChannelDataStruct[] channelInfo = entitiesDB.QueryEntities<FilteredChannelDataStruct>(CommonExclusiveGroups.OWNED_BLOCKS_GROUP).ToFastAccess(out uint count);
for (uint i = 0; i < count; i++)
{