From: Mario Date: Fri, 10 Feb 2017 23:19:20 +0000 (+1000) Subject: Silence some turret warnings X-Git-Tag: xonotic-v0.8.2~232 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=467c9a4da9ad904550df81786b0f3f49b5867796;p=xonotic%2Fxonotic-data.pk3dir.git Silence some turret warnings --- diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index 83db075b4..99f9f8032 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -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 != "") { diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index de744a65d..0a82a4a7b 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -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)