Krakatoa: Fix spawn position of rejoining players

install-platforms
Lukas Werling 2018-01-17 00:05:44 +01:00
parent 04ee087e7d
commit ad66ba3145
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,10 @@ protected func InitializePlayer(int plr)
// Give the player the elementary base materials.
GivePlayerElementaryBaseMaterial(plr);
// When rejoining, try joining at a flag. The default position may
// otherwise be on the wrong side of the volcano.
var flag = FindObject(Find_ID(Flagpole));
// Give crew some equipment.
var index = 0, crew;
@ -75,6 +79,8 @@ protected func InitializePlayer(int plr)
if (index == 2)
crew->CreateContents(Axe);
crew->CreateContents(Shovel);
if (flag)
crew->SetPosition(flag->GetX(), flag->GetY());
}
// Initialize the intro sequence if not yet started.