]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Prevent bots from updating spectatee (they use .enemy field for attacking targets)
authorMario <mario@smbclan.net>
Fri, 5 May 2017 17:58:21 +0000 (03:58 +1000)
committerMario <mario@smbclan.net>
Fri, 5 May 2017 17:58:21 +0000 (03:58 +1000)
qcsrc/server/client.qc

index b27ce6af9bc14dc2010720dc5571eafb7b59cbaa..a9413972ad2189777c90ea6fdf370e13013c8b84 100644 (file)
@@ -1810,6 +1810,9 @@ void SetSpectatee_status(entity this, int spectatee_num)
 
 void SetSpectatee(entity this, entity spectatee)
 {
+       if(IS_BOT_CLIENT(this))
+               return; // bots abuse .enemy, this code is useless to them
+
        entity old_spectatee = this.enemy;
 
        this.enemy = spectatee;