1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2024-12-14 10:23:17 +02:00

Fixing crash when first player leaves too early.

Fixing crash when first player leaves too early.
This commit is contained in:
Oarcinae 2017-05-11 09:47:06 -04:00 committed by GitHub
parent 262a1d99c3
commit 6f78237362

View File

@ -83,7 +83,7 @@ function FindUnusedSpawns(event)
end
-- Remove a force if this player created it and they are the only one on it
if (#player.force.players <= 1) then
if ((#player.force.players <= 1) and (player.force.name ~= MAIN_FORCE)) then
game.merge_forces(player.force, MAIN_FORCE)
end
@ -284,4 +284,4 @@ function ShareVisionBetweenPlayers()
end
end
end
end
end