]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Silence some turret warnings
authorMario <mario@smbclan.net>
Fri, 10 Feb 2017 23:19:20 +0000 (09:19 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Feb 2017 23:19:20 +0000 (09:19 +1000)
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/walker.qc

index 83db075b422a7efe3f75dd1bab2a9220102d8060..99f9f80328b2c883048a60a91df8dc71d3161acf 100644 (file)
@@ -1357,6 +1357,8 @@ bool turret_initialize(entity this, Turret tur)
        this.tur_head.solid                     = SOLID_NOT;
        set_movetype(this.tur_head, this.move_movetype);
 
+       this.weaponentities[0] = this; // lol
+
        if(!this.tur_defend)
        if(this.target != "")
        {
index de744a65d7a6c6109aa43736beb3df1c82d9eff3..0a82a4a7bcef08cd1db7c03cdbcc925ca6c0474f 100644 (file)
@@ -569,8 +569,9 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
     it.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMITS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS;
     it.iscreature = true;
     it.teleportable = TELEPORT_NORMAL;
+    if(!it.damagedbycontents)
+        IL_PUSH(g_damagedbycontents, it);
     it.damagedbycontents = true;
-    IL_PUSH(g_damagedbycontents, it);
     it.solid = SOLID_SLIDEBOX;
     it.takedamage = DAMAGE_AIM;
     if(it.move_movetype != MOVETYPE_WALK)