not work for DNC 2014
Code:
void ServerGameLogic::GetStartSpawnPosition(const wiCharDataFull& loadout, r3dPoint3D* pos, float* dir, DWORD peerId)
{
// If not assigned a map, not assigned a new map, or this is a new character
if(loadout.GameMapId == 0 || loadout.GameMapId != ginfo_.mapId || loadout.Alive == 3)
{
GetSpawnPositionNewPlayer(loadout.GamePos, pos, dir);
pos->x += u_GetRandom(10, 120);
pos->z += u_GetRandom(10, 120);
return;
}
// Alive and logging back in game
if(loadout.GameMapId && (loadout.GameMapId == ginfo_.mapId) && loadout.Alive == 1)
{
*pos = loadout.GamePos;
*dir = loadout.GameDir;
loadout.GamePos;
return;
}
[COLOR="#FF0000"]// Early Revive Spawn at location of Death
if(loadout.GameMapId && loadout.Alive == 2)
{
*pos = loadout.GamePos;
*dir = loadout.GameDir;
loadout.GamePos;
return;[/COLOR]
}
r3d_assert(false && "GetStartSpawnPosition");
}