]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Properly check against the world when trying for worldstartsolid, fixes some issues...
authorMario <mario@smbclan.net>
Fri, 23 Aug 2019 07:13:09 +0000 (17:13 +1000)
committerMario <mario@smbclan.net>
Fri, 23 Aug 2019 07:13:09 +0000 (17:13 +1000)
qcsrc/common/physics/movetypes/movetypes.qc

index b3f460ce7d99daaf5f6c1dab28832cbca57a5ad8..4539466a24feb9f10d97f6652f3eb31c519af490 100644 (file)
@@ -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