return nearest;
}
+// blacklist of entities that WarpZone_FindRadius doesn't care about
bool WarpZoneLib_BadEntity(entity e)
{
if (is_pure(e)) return true;
string s = e.classname;
- //if (s == "net_linked") return true; // actually some real entities are linked without classname, fail
- if (s == "") return true;
+ switch(s)
+ {
+ case "weaponentity":
+ case "exteriorweaponentity":
+ case "sprite_waypoint":
+ case "waypoint":
+ case "spawnfunc":
+ case "weaponchild":
+ case "chatbubbleentity":
+ case "buff_model":
+ //case "net_linked": // actually some real entities are linked without classname, fail
+ case "":
+ return true;
+ }
if (startsWith(s, "target_")) return true;
bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher)
{
vector emin = toucher.absmin, emax = toucher.absmax;
- // the engine offsets absolute bounding boxes by a single quake unit
- // we must undo that here to allow accurate touching
- emin += '1 1 1';
- emax -= '1 1 1';
+ if(STAT(Q3COMPAT))
+ {
+ // DP's tracebox enlarges absolute bounding boxes by a single quake unit
+ // we must undo that here to allow accurate touching
+ emin += '1 1 1';
+ emax -= '1 1 1';
+ }
return !WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher);
}