From: Mario Date: Wed, 15 Mar 2017 02:34:42 +0000 (+1000) Subject: Fix a potential endless function call loop in platform code X-Git-Tag: xonotic-v0.8.2~52 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=746f0d2d46a9f56e4b1899f85b5282c50fd087c7;p=xonotic%2Fxonotic-data.pk3dir.git Fix a potential endless function call loop in platform code --- diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index 67eb18a67..b7cea323d 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); }