Permalink
Browse files

Fix noclipping as a spectator.

The check was wrong. Since PM_SPECTATOR will be overridden by
PM_NOCLIP, and if you're a spectator, you will have no health.
Instead, use PERS_SPECSTATE to determine if you are a spectator
or not.
  • Loading branch information...
1 parent 3ca1501 commit 55b9eeb8b3e21504ef0b7102e5d8a707fbdc8266 @DolceTriade DolceTriade committed Mar 6, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/shared/bg_pmove.cpp
@@ -4720,7 +4720,7 @@ void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd )
return; // no view changes at all
}
- if ( ps->pm_type != PM_SPECTATOR && ps->stats[ STAT_HEALTH ] <= 0 )
+ if ( ps->persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT && ps->stats[ STAT_HEALTH ] <= 0 )
{
return; // no view changes at all
}

0 comments on commit 55b9eeb

Please sign in to comment.