]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/movetypes/movetypes.qc
Merge branch 'master' into terencehill/hud_shake_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / movetypes.qc
index 33c56216a5d71b8ad053f9c3a05236af65ae5509..eee217200f7da8baf8015dfae9c87d06516079fb 100644 (file)
@@ -96,7 +96,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                                if(!trace_ent)
                                {
                                        //dprint("_Movetype_FlyMove: !trace_ent\n");
-                                       trace_ent = world;
+                                       trace_ent = NULL;
                                }
 
                                this.move_flags |= FL_ONGROUND;
@@ -317,20 +317,20 @@ void _Movetype_Impact(entity this, entity oth)  // SV_Impact
 {
        entity oldother = other;
 
-       if(this.move_touch)
+       if(gettouch(this))
        {
                other = oth;
 
-               WITHSELF(this, this.move_touch());
+               gettouch(this)(this);
 
                other = oldother;
        }
 
-       if(oth.move_touch)
+       if(gettouch(oth))
        {
                other = this;
 
-               WITHSELF(oth, oth.move_touch());
+               gettouch(oth)(oth);
 
                other = oldother;
        }
@@ -346,7 +346,7 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
     FOREACH_ENTITY_RADIUS(0.5 * (this.absmin + this.absmax), 0.5 * vlen(this.absmax - this.absmin), true, {
                if (it.solid == SOLID_TRIGGER && it != this)
                if (it.move_nomonsters != MOVE_NOMONSTERS && it.move_nomonsters != MOVE_WORLDONLY)
-               if (it.move_touch && boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
+               if (gettouch(it) && boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
                {
                        other = this;
 
@@ -360,7 +360,7 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
                        trace_plane_dist = 0;
                        trace_ent = this;
 
-                       WITHSELF(it, it.move_touch());
+                       gettouch(it)(it);
                }
     });