From 746f0d2d46a9f56e4b1899f85b5282c50fd087c7 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 15 Mar 2017 12:34:42 +1000 Subject: [PATCH] Fix a potential endless function call loop in platform code --- qcsrc/common/triggers/subs.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index 67eb18a678..b7cea323d5 100644 --- a/qcsrc/common/triggers/subs.qc +++ b/qcsrc/common/triggers/subs.qc @@ -87,7 +87,7 @@ void SUB_CalcMoveDone(entity this) SUB_SETORIGIN (this, this.finaldest); this.SUB_VELOCITY = '0 0 0'; this.SUB_NEXTTHINK = -1; - if (this.think1) + if (this.think1 && this.think1 != SUB_CalcMoveDone) this.think1 (this); } @@ -310,7 +310,7 @@ void SUB_CalcAngleMoveDone(entity this) this.angles = this.finalangle; this.SUB_AVELOCITY = '0 0 0'; this.SUB_NEXTTHINK = -1; - if (this.think1) + if (this.think1 && this.think1 != SUB_CalcAngleMoveDone) // avoid endless loops this.think1 (this); } -- 2.39.2