Fix crash on game load from missing local player
This commit is contained in:
parent
6990ae2835
commit
caf714a3d9
1 changed files with 1 additions and 1 deletions
|
@ -33,8 +33,8 @@ namespace Leadercraft.Scoring
|
||||||
|
|
||||||
private static void loopPass(EntitiesDB entitiesDB)
|
private static void loopPass(EntitiesDB entitiesDB)
|
||||||
{
|
{
|
||||||
if (localPlayer == null) localPlayer = new Player(PlayerType.Local);
|
|
||||||
if (!State.IsPlayingGame) return;
|
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);
|
FilteredChannelDataStruct[] channelInfo = entitiesDB.QueryEntities<FilteredChannelDataStruct>(CommonExclusiveGroups.OWNED_BLOCKS_GROUP).ToFastAccess(out uint count);
|
||||||
for (uint i = 0; i < count; i++)
|
for (uint i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue