From 8c7c5ccc515d06ba849f60a5504ec186672689e1 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 11 Oct 2018 13:11:10 +1000 Subject: [PATCH] Don't allow a trigger to target itself (infinite loops tend to be crashy) --- qcsrc/common/mapobjects/triggers.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/mapobjects/triggers.qc b/qcsrc/common/mapobjects/triggers.qc index 940eb3212..9a7181d3a 100644 --- a/qcsrc/common/mapobjects/triggers.qc +++ b/qcsrc/common/mapobjects/triggers.qc @@ -304,7 +304,7 @@ void SUB_UseTargets_Ex(entity this, entity actor, entity trigger, bool preventRe { for(entity t = NULL; (t = find(t, targetname, s)); ) { - if(t.use && (t.sub_target_used != time || !preventReuse)) + if(t != this && t.use && (t.sub_target_used != time || !preventReuse)) { if(this.target_random) { -- 2.39.2