if (!ps) return; // initial connect
PS(this) = NULL;
+ if (ps.m_client != this) return; // don't own state, spectator
ps.m_switchweapon = WEP_Null;
ps.m_weapon = WEP_Null;
ps.m_switchingweapon = WEP_Null;
ps.ps_push(ps, this);
-
- if (ps.m_client != this) return; // don't own state, spectator
+
FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; });
delete(ps);
void PutObserverInServer(entity this)
{
bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver, this);
- if(IS_PLAYER(this)) // our own state
- PlayerState_detach(this);
+ PlayerState_detach(this);
if (IS_PLAYER(this) && this.health >= 1) {
// despawn effect