]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/movetypes/movetypes.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / movetypes.qc
index ec2761431c7376334292451feeef9b97f95e64b7..33c56216a5d71b8ad053f9c3a05236af65ae5509 100644 (file)
@@ -321,7 +321,7 @@ void _Movetype_Impact(entity this, entity oth)  // SV_Impact
        {
                other = oth;
 
-               WITH(entity, self, this, this.move_touch());
+               WITHSELF(this, this.move_touch());
 
                other = oldother;
        }
@@ -330,7 +330,7 @@ void _Movetype_Impact(entity this, entity oth)  // SV_Impact
        {
                other = this;
 
-               WITH(entity, self, oth, oth.move_touch());
+               WITHSELF(oth, oth.move_touch());
 
                other = oldother;
        }
@@ -343,11 +343,10 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
 
        entity oldother = other;
 
-       FOREACH_ENTITY_FLOAT(solid, SOLID_TRIGGER,
-       {
-               if(it != this && it.move_touch)
-               if(it.move_nomonsters != MOVE_NOMONSTERS && it.move_nomonsters != MOVE_WORLDONLY)
-               if(boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
+    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))
                {
                        other = this;
 
@@ -361,9 +360,9 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
                        trace_plane_dist = 0;
                        trace_ent = this;
 
-                       WITH(entity, self, it, it.move_touch());
+                       WITHSELF(it, it.move_touch());
                }
-       });
+    });
 
        other = oldother;
 }