]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Lyberta/DynamicHandicap' into 'master'
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 16 Sep 2017 03:20:32 +0000 (03:20 +0000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 16 Sep 2017 03:20:32 +0000 (03:20 +0000)
Dynamic handicap.

See merge request xonotic/xonotic-data.pk3dir!485

qcsrc/server/client.qc

index 13111fbd6517b71108b696429732f92b98d622a0..7acd7bb5eaeac4c6b4540b6e689752ffa4c7f088 100644 (file)
@@ -220,9 +220,20 @@ void PutObserverInServer(entity this)
     bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver, this);
        PlayerState_detach(this);
 
-       if (IS_PLAYER(this) && this.health >= 1) {
-        // despawn effect
-               Send_Effect(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1);
+       if (IS_PLAYER(this))
+       {
+               if(this.health >= 1)
+               {
+               // despawn effect
+                       Send_Effect(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1);
+               }
+
+               // was a player, recount votes and ready status
+               if(IS_REAL_CLIENT(this))
+               {
+                       VoteCount(false);
+                       ReadyCount();
+               }
     }
 
     {