]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make turrets send their position when attached to misc_follow
authorMattia Basaglia <mattia.basaglia@gmail.com>
Thu, 23 Mar 2017 19:23:27 +0000 (19:23 +0000)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Thu, 23 Mar 2017 19:23:27 +0000 (19:23 +0000)
qcsrc/common/turrets/sv_turrets.qc

index f2f2190231dfcfddb52e4e06bc127a50dc910301..231117d24c31abb10c2d42ecc80e328d5d3f3b3b 100644 (file)
@@ -1049,6 +1049,9 @@ void turret_think(entity this)
        if (this.ammo < this.ammo_max)
                this.ammo = min(this.ammo + this.ammo_recharge, this.ammo_max);
 
+       if (this.move_movetype == MOVETYPE_FOLLOW && this.origin - this.view_ofs != this.aiment.origin)
+               this.SendFlags |= TNSF_MOVE;
+
        // Inactive turrets needs to run the think loop,
        // So they can handle animation and wake up if need be.
        if(!this.active)