mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
Game still needs to abort if no starts exist at all
This commit is contained in:
parent
c1e362ee83
commit
40d90ba325
2 changed files with 7 additions and 2 deletions
|
@ -1575,6 +1575,11 @@ void G_DeathMatchSpawnPlayer (int playernum)
|
|||
//
|
||||
FPlayerStart *G_PickPlayerStart(int playernum, int flags)
|
||||
{
|
||||
if (AllPlayerStarts.Size() == 0) // No starts to pick
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((level.flags2 & LEVEL2_RANDOMPLAYERSTARTS) || (flags & PPS_FORCERANDOM) ||
|
||||
playerstarts[playernum].type == 0)
|
||||
{
|
||||
|
|
|
@ -1209,8 +1209,8 @@ void G_FinishTravel ()
|
|||
assert (pawn != pawndup);
|
||||
if (pawndup == NULL)
|
||||
{ // Oh no! there was no start for this player!
|
||||
start = G_PickPlayerStart(pnum, PPS_FORCERANDOM);
|
||||
pawndup = P_SpawnPlayer(start, pnum, (level.flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
start = G_PickPlayerStart(pnum, PPS_FORCERANDOM);
|
||||
if (start != NULL) pawndup = P_SpawnPlayer(start, pnum, (level.flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
if (pawndup == NULL)
|
||||
{
|
||||
pawn->flags |= MF_NOSECTOR | MF_NOBLOCKMAP;
|
||||
|
|
Loading…
Reference in a new issue