From: Mario Date: Tue, 9 Oct 2018 11:13:36 +0000 (+1000) Subject: Move some antiwall handling out of the main trigger code X-Git-Tag: xonotic-v0.8.5~1788 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=494690bd872756d7e484036e3c7e2b3a070edb9f Move some antiwall handling out of the main trigger code --- diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index 9fb61c230f..10c3900408 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 62fabd2aa8..940eb32120 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;