#include "common.qh"
#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
#include "../server/t_items.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#include "../common/weapons/all.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../dpdefs/progsdefs.qh"
#endif
void WarpZone_Accumulator_Clear(entity acc)
.vector(vector, vector) camera_transform;
float autocvar_cl_warpzone_usetrace = 1;
vector WarpZone_camera_transform(vector org, vector ang)
-{
+{SELFPARAM();
vector vf, vr, vu;
if(self.warpzone_fadestart)
if(vlen(org - self.origin - 0.5 * (self.mins + self.maxs)) > self.warpzone_fadeend + 400)
}
vector WarpZone_Camera_camera_transform(vector org, vector ang)
-{
+{SELFPARAM();
// a fixed camera view
if(self.warpzone_fadestart)
if(vlen(org - self.origin - 0.5 * (self.mins + self.maxs)) > self.warpzone_fadeend + 400)
return nearest;
}
-float WarpZoneLib_BadClassname(string myclassname)
+bool WarpZoneLib_BadEntity(entity e)
{
+ string myclassname = e.classname;
+ if (e.instanceOfObject) return true;
switch(myclassname)
{
- case "weapon_info":
- case "monster_info":
case "deathtype":
- case "callback":
- case "callbackchain":
case "weaponentity":
case "exteriorweaponentity":
case "csqc_score_team":
case "ent_client_scoreinfo":
case "saved_cvar_value":
case "accuracy":
- case "entcs_sender_v2":
- case "entcs_receiver_v2":
+ case "entcs_sender":
+ case "entcs_receiver":
case "clientinit":
case "sprite_waypoint":
case "waypoint":
for(e = e0; e; e = e.chain)
{
- if(WarpZoneLib_BadClassname(e.classname))
+ if(WarpZoneLib_BadEntity(e))
continue;
p = WarpZoneLib_NearestPointOnBox(e.origin + e.mins, e.origin + e.maxs, org0);
if(needlineofsight)
}
for(e = wz; e; e = e.WarpZone_findradius_next)
{
- if(WarpZoneLib_BadClassname(e.classname))
+ if(WarpZoneLib_BadEntity(e))
continue;
org0_new = WarpZone_TransformOrigin(e, org);
.entity WarpZone_refsys;
void WarpZone_RefSys_GC()
-{
+{SELFPARAM();
// garbage collect unused reference systems
self.nextthink = time + 1;
if(self.owner.WarpZone_refsys != self)
}
float WarpZoneLib_ExactTrigger_Touch()
-{
+{SELFPARAM();
return !WarpZoneLib_BoxTouchesBrush(other.absmin, other.absmax, self, other);
}