From: Mario Date: Fri, 23 Aug 2019 07:13:09 +0000 (+1000) Subject: Properly check against the world when trying for worldstartsolid, fixes some issues... X-Git-Tag: xonotic-v0.8.5~1377 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b77b919cc78f3a71992be1cae4de1cc8a52a03e;p=xonotic%2Fxonotic-data.pk3dir.git Properly check against the world when trying for worldstartsolid, fixes some issues with elevators --- diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index b3f460ce7..4539466a2 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -509,10 +509,11 @@ bool _Movetype_PushEntity(entity this, vector push, bool failonstartsolid, bool { _Movetype_PushEntityTrace(this, push); + // NOTE: this is a workaround for the QC's lack of a worldstartsolid trace parameter if(trace_startsolid && failonstartsolid) { int oldtype = this.move_nomonsters; - this.move_nomonsters = MOVE_NOMONSTERS; + this.move_nomonsters = MOVE_WORLDONLY; _Movetype_PushEntityTrace(this, push); this.move_nomonsters = oldtype; if(trace_startsolid) @@ -527,7 +528,7 @@ bool _Movetype_PushEntity(entity this, vector push, bool failonstartsolid, bool _Movetype_LinkEdict(this, true); if(trace_fraction < 1) - if(this.solid >= SOLID_TRIGGER && (!IS_ONGROUND(this) || (this.groundentity != trace_ent))) + if(this.solid >= SOLID_TRIGGER && trace_ent && (!IS_ONGROUND(this) || (this.groundentity != trace_ent))) _Movetype_Impact(this, trace_ent); return (this.origin == last_origin); // false if teleported by touch