From: Mario Date: Mon, 8 Aug 2016 03:40:24 +0000 (+1000) Subject: Only detach playerstate if observer was a player (potential fix for player state... X-Git-Tag: xonotic-v0.8.2~737 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bd092afdac1b154997e2c429f88d4cc9d2f0255c;p=xonotic%2Fxonotic-data.pk3dir.git Only detach playerstate if observer was a player (potential fix for player state related issues when switching from spectator to observer) --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index c212691db..a37227d03 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -218,7 +218,8 @@ void FixPlayermodel(entity player); void PutObserverInServer(entity this) { bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver, this); - PlayerState_detach(this); + if(IS_PLAYER(this)) // our own state + PlayerState_detach(this); if (IS_PLAYER(this) && this.health >= 1) { // despawn effect