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

Fixing another issue on player's leaving too quickly before they finish spawning.

This commit is contained in:
Oarcinae 2018-01-27 10:02:45 -05:00
parent 3b538183f3
commit 5b87f9e369

View File

@ -273,7 +273,9 @@ function DelayedSpawnOnTick()
delayedSpawn = global.delayedSpawns[i]
if (delayedSpawn.delayedTick < game.tick) then
SendPlayerToNewSpawnAndCreateIt(delayedSpawn.player, delayedSpawn.spawn, delayedSpawn.moatEnabled)
if ((delayedSpawn.player ~= nil) and (delayedSpawn.player.connected)) then
SendPlayerToNewSpawnAndCreateIt(delayedSpawn.player, delayedSpawn.spawn, delayedSpawn.moatEnabled)
end
table.remove(global.delayedSpawns, i)
end
end