From 57b530590b56a3306703456c2434d8f267216cfd Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 24 Jun 2017 12:15:17 +1000 Subject: [PATCH] Fix compile when fancy pathing is enabled, and fix an intrusive list warning when ewheel turrets respawn --- qcsrc/common/turrets/checkpoint.qc | 2 -- qcsrc/common/turrets/sv_turrets.qh | 2 ++ qcsrc/common/turrets/turret/ewheel.qc | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/turrets/checkpoint.qc b/qcsrc/common/turrets/checkpoint.qc index 6c246a75b..d9a20dc97 100644 --- a/qcsrc/common/turrets/checkpoint.qc +++ b/qcsrc/common/turrets/checkpoint.qc @@ -12,8 +12,6 @@ #define checkpoint_cache_to selected_player */ -.entity pathgoal; - /* entity path_makeorcache(entity forwho,entity start, entity end) { diff --git a/qcsrc/common/turrets/sv_turrets.qh b/qcsrc/common/turrets/sv_turrets.qh index 62759c058..edd06bd6d 100644 --- a/qcsrc/common/turrets/sv_turrets.qh +++ b/qcsrc/common/turrets/sv_turrets.qh @@ -94,6 +94,8 @@ bool turret_initialize(entity this, Turret tur); .entity pathcurrent; +.entity pathgoal; + float turret_count; // debugging diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index cf53508b6..fd85e68de 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -198,8 +198,9 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it)) it.iscreature = true; it.teleportable = TELEPORT_NORMAL; - it.damagedbycontents = true; - IL_PUSH(g_damagedbycontents, it); + if(!it.damagedbycontents) + IL_PUSH(g_damagedbycontents, it); + it.damagedbycontents = true; set_movetype(it, MOVETYPE_WALK); it.solid = SOLID_SLIDEBOX; it.takedamage = DAMAGE_AIM; -- 2.39.2