mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed infinite spectator switch loop
This commit is contained in:
parent
f73e4b6f22
commit
c0a50eb2ff
1 changed files with 1 additions and 1 deletions
|
@ -4652,7 +4652,7 @@ void Player::Think(void)
|
|||
if (!ent->inuse || !ent->entity) {
|
||||
// Invalid spectate entity
|
||||
SetPlayerSpectateRandom();
|
||||
} else if (ent->entity->deadflag >= DEAD_DEAD || static_cast<Player *>(ent->entity)->IsSpectator() || IsValidSpectatePlayer(static_cast<Player *>(ent->entity))) {
|
||||
} else if (ent->entity->deadflag >= DEAD_DEAD || static_cast<Player *>(ent->entity)->IsSpectator() || !IsValidSpectatePlayer(static_cast<Player *>(ent->entity))) {
|
||||
SetPlayerSpectateRandom();
|
||||
} else if (g_gametype->integer >= GT_TEAM && GetTeam() > TEAM_FREEFORALL && static_cast<Player*>(ent->entity)->GetTeam() != GetTeam()) {
|
||||
SetPlayerSpectateRandom();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue