From 494690bd872756d7e484036e3c7e2b3a070edb9f Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 9 Oct 2018 21:13:36 +1000 Subject: [PATCH] Move some antiwall handling out of the main trigger code --- qcsrc/common/mapobjects/models.qc | 5 +++++ qcsrc/common/mapobjects/triggers.qc | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index 9fb61c230..10c390040 100644 --- a/qcsrc/common/mapobjects/models.qc +++ b/qcsrc/common/mapobjects/models.qc @@ -41,6 +41,11 @@ void g_clientmodel_setcolormaptoactivator(entity this, entity actor, entity trig void g_clientmodel_use(entity this, entity actor, entity trigger) { + // Flag to set func_clientwall state + // 1 == deactivate, 2 == activate, 0 == do nothing + if(this.classname == "func_clientwall" || this.classname == "func_clientillusionary") + this.antiwall_flag = trigger.antiwall_flag; + if (this.antiwall_flag == 1) { this.inactive = 1; diff --git a/qcsrc/common/mapobjects/triggers.qc b/qcsrc/common/mapobjects/triggers.qc index 62fabd2aa..940eb3212 100644 --- a/qcsrc/common/mapobjects/triggers.qc +++ b/qcsrc/common/mapobjects/triggers.qc @@ -302,9 +302,6 @@ void SUB_UseTargets_Ex(entity this, entity actor, entity trigger, bool preventRe } if (s != "") { - // Flag to set func_clientwall state - // 1 == deactivate, 2 == activate, 0 == do nothing - int aw_flag = this.antiwall_flag; for(entity t = NULL; (t = find(t, targetname, s)); ) { if(t.use && (t.sub_target_used != time || !preventReuse)) @@ -315,9 +312,6 @@ void SUB_UseTargets_Ex(entity this, entity actor, entity trigger, bool preventRe } else { - if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary") - t.antiwall_flag = aw_flag; - t.use(t, actor, this); if(preventReuse) t.sub_target_used = time; -- 2.39.2