mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Fixed: In multiplayer, players could spawn at voodoo doll starts
- This could happen in co-op games that did not have enough player starts for all the players spawning. Voodoo doll starts were not excluded from the set of possible starts as they should have been.
This commit is contained in:
parent
e277fbe81d
commit
f82c217047
1 changed files with 23 additions and 1 deletions
|
@ -5020,7 +5020,29 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
// save spots for respawning in network games
|
||||
FPlayerStart start(mthing, pnum+1);
|
||||
playerstarts[pnum] = start;
|
||||
if (level.flags2 & LEVEL2_RANDOMPLAYERSTARTS)
|
||||
{ // When using random player starts, all starts count
|
||||
AllPlayerStarts.Push(start);
|
||||
}
|
||||
else
|
||||
{ // When not using random player starts, later single player
|
||||
// starts should override earlier ones, since the earlier
|
||||
// ones are for voodoo dolls and not likely to be ideal for
|
||||
// spawning regular players.
|
||||
unsigned i;
|
||||
for (i = 0; i < AllPlayerStarts.Size(); ++i)
|
||||
{
|
||||
if (AllPlayerStarts[i].type == pnum+1)
|
||||
{
|
||||
AllPlayerStarts[i] = start;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == AllPlayerStarts.Size())
|
||||
{
|
||||
AllPlayerStarts.Push(start);
|
||||
}
|
||||
}
|
||||
if (!deathmatch && !(level.flags2 & LEVEL2_RANDOMPLAYERSTARTS))
|
||||
{
|
||||
return P_SpawnPlayer(&start, pnum, (level.flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
|
|
Loading…
Reference in a new issue