[0.16.12]force.spawn_position ignored on player creation
Posted: Sun Dec 31, 2017 10:49 pm
When a new player joins a multiplayer game, the spawn_position set by force.set_spawn_position is ignored. To reproduce:
1. Start mp game
2. Run:
3. Have a 2nd player join
Expected: The second player spawns next to the first player because their spawn position is set to the second surface.
Actual result: The second player spawns on nauvis.
1. Start mp game
2. Run:
Code: Select all
/c game.create_surface("2", game.player.surface.map_gen_settings)
game.player.teleport({0, 0}, "2")
for _, force in pairs(game.forces) do
force.set_spawn_position({1,1}, "2")
end
Expected: The second player spawns next to the first player because their spawn position is set to the second surface.
Actual result: The second player spawns on nauvis.