From 467c9a4da9ad904550df81786b0f3f49b5867796 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 11 Feb 2017 09:19:20 +1000 Subject: [PATCH] Silence some turret warnings --- qcsrc/common/turrets/sv_turrets.qc | 2 ++ qcsrc/common/turrets/turret/walker.qc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.2