From: Mario Date: Sat, 24 Jun 2017 02:15:17 +0000 (+1000) Subject: Fix compile when fancy pathing is enabled, and fix an intrusive list warning when... X-Git-Tag: xonotic-v0.8.5~2703 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=57b530590b56a3306703456c2434d8f267216cfd;p=xonotic%2Fxonotic-data.pk3dir.git Fix compile when fancy pathing is enabled, and fix an intrusive list warning when ewheel turrets respawn --- 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;