1 // uncomment this if your mod uses the roll angle in fixangle
4 float warpzone_warpzones_exist;
5 float warpzone_cameras_exist;
7 const void func_null(void); // never assign to this one please
9 .float warpzone_isboxy;
10 .vector warpzone_shift;
11 .vector warpzone_origin;
12 .vector warpzone_angles;
13 .vector warpzone_forward;
14 .vector warpzone_targetorigin;
15 .vector warpzone_targetangles;
16 .vector warpzone_targetforward;
17 .vector warpzone_transform;
18 .float warpzone_fadestart;
19 .float warpzone_fadeend;
20 void WarpZone_SetUp(entity e, vector my_org, vector my_ang, vector other_org, vector other_ang);
22 float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig);
23 vector WarpZoneLib_NearestPointOnBox(vector mi, vector ma, vector org);
25 entity WarpZone_Find(vector mi, vector ma);
26 void WarpZone_MakeAllSolid();
27 void WarpZone_MakeAllOther();
29 #define MOVE_NOTHING -1
30 typedef void(vector start, vector hit, vector end) WarpZone_trace_callback_t; // called on every elementary trace
31 const var WarpZone_trace_callback_t WarpZone_trace_callback_t_null;
32 entity WarpZone_trace_transform; // transform accumulator during a trace
33 entity WarpZone_trace_firstzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)
34 entity WarpZone_trace_lastzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)
35 vector WarpZone_tracetoss_velocity; // ending velocity of a tracetoss (post-transform)
36 float WarpZone_tracetoss_time; // duration of toss (approximate)
37 void WarpZone_TraceBox(vector org, vector min, vector max, vector end, float nomonsters, entity forent);
38 void WarpZone_TraceBox_ThroughZone(vector org, vector min, vector max, vector end, float nomonsters, entity forent, entity zone, WarpZone_trace_callback_t cb);
39 void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent);
40 void WarpZone_TraceToss(entity e, entity forent);
41 void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZone_trace_callback_t cb);
42 void WarpZone_TrailParticles(entity own, float eff, vector org, vector end);
44 void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, float boxflags);
47 .vector WarpZone_findradius_dist;
48 .vector WarpZone_findradius_nearest;
49 // also set: warpzone parameters, so WarpZone_TransformOrigin can transform vectors from blast's to victim's system
50 .vector WarpZone_findradius_findorigin;
51 .float WarpZone_findradius_findradius;
52 entity WarpZone_FindRadius(vector org, float radius, float needlineofsight);
54 float WarpZone_PlaneDist(entity wz, vector v);
55 float WarpZone_TargetPlaneDist(entity wz, vector v);
56 vector WarpZone_TransformOrigin(entity wz, vector v);
57 vector WarpZone_TransformVelocity(entity wz, vector v);
58 vector WarpZone_TransformAngles(entity wz, vector v);
59 vector WarpZone_TransformVAngles(entity wz, vector v);
60 vector WarpZone_UnTransformOrigin(entity wz, vector v);
61 vector WarpZone_UnTransformVelocity(entity wz, vector v);
62 vector WarpZone_UnTransformAngles(entity wz, vector v);
63 vector WarpZone_UnTransformVAngles(entity wz, vector v);
65 // reference systems (chained warpzone transforms)
66 void WarpZone_RefSys_Add(entity me, entity wz);
67 void WarpZone_RefSys_AddIncrementally(entity me, entity ref);
68 void WarpZone_RefSys_BeginAddingIncrementally(entity me, entity ref);
69 vector WarpZone_RefSys_TransformOrigin(entity from, entity to, vector org);
70 vector WarpZone_RefSys_TransformVelocity(entity from, entity to, vector vel);
71 vector WarpZone_RefSys_TransformAngles(entity from, entity to, vector ang);
72 vector WarpZone_RefSys_TransformVAngles(entity from, entity to, vector ang);
73 entity WarpZone_RefSys_SpawnSameRefSys(entity me);
76 # define BITCLR(a,b) ((a) - ((a) & (b)))
79 # define BITSET(a,b) ((a) | (b))
82 # define BITXOR(a,b) (((a) | (b)) - ((a) & (b)))
85 # define BITCLR_ASSIGN(a,b) ((a) = (a) - ((a) & (b)))
88 # define BITSET_ASSIGN(a,b) ((a) |= (b))
91 # define BITXOR_ASSIGN(a,b) ((a) = ((a) | (b)) - ((a) & (b)))