mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- fixed: player spawn code should now always use defaults for the currently selected player class, not current flags
This commit is contained in:
parent
3e02121822
commit
8dda7c02c9
1 changed files with 12 additions and 1 deletions
|
@ -1707,7 +1707,18 @@ void FLevelLocals::DoReborn (int playernum, bool freshbot)
|
|||
}
|
||||
else
|
||||
{
|
||||
bool isUnfriendly = players[playernum].mo && !(players[playernum].mo->flags & MF_FRIENDLY);
|
||||
bool isUnfriendly;
|
||||
auto p = players[playernum].mo->player;
|
||||
if (p->cls == NULL)
|
||||
{
|
||||
// this shouldn't ever happen! It's just a fall-through in case it does...
|
||||
isUnfriendly = players[playernum].mo && !(players[playernum].mo->GetDefault()->flags & MF_FRIENDLY);
|
||||
}
|
||||
else
|
||||
{
|
||||
isUnfriendly = !(GetDefaultByType(p->cls)->flags & MF_FRIENDLY);
|
||||
}
|
||||
|
||||
|
||||
// respawn at the start
|
||||
// first disassociate the corpse
|
||||
|
|
Loading…
Reference in a new issue