From: Mario Date: Fri, 5 May 2017 17:58:21 +0000 (+1000) Subject: Prevent bots from updating spectatee (they use .enemy field for attacking targets) X-Git-Tag: xonotic-v0.8.5~2808 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=801b8d0dea376b62cf9701d9fe3e323619c96bb0;p=xonotic%2Fxonotic-data.pk3dir.git Prevent bots from updating spectatee (they use .enemy field for attacking targets) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index b27ce6af9..a9413972a 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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;