X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fwarpzonelib%2Fcommon.qh;h=c2f36bea868d8baf7ad06c37294b3b7bb2316a24;hp=1a4c368c3e08098d7fd401df78e615b250c749a5;hb=a7b24450e4c7ca75636df1375d01d2266bd00c8c;hpb=ee7dc19575e67cead4014eb45ffd644a8a3e3cfa diff --git a/qcsrc/warpzonelib/common.qh b/qcsrc/warpzonelib/common.qh index 1a4c368c3e..c2f36bea86 100644 --- a/qcsrc/warpzonelib/common.qh +++ b/qcsrc/warpzonelib/common.qh @@ -1,8 +1,10 @@ // uncomment this if your mod uses the roll angle in fixangle // #define KEEP_ROLL -const void func_null(void); // never assign to this one please +float warpzone_warpzones_exist; +float warpzone_cameras_exist; +.float warpzone_isboxy; .vector warpzone_shift; .vector warpzone_origin; .vector warpzone_angles; @@ -11,6 +13,8 @@ const void func_null(void); // never assign to this one please .vector warpzone_targetangles; .vector warpzone_targetforward; .vector warpzone_transform; +.float warpzone_fadestart; +.float warpzone_fadeend; void WarpZone_SetUp(entity e, vector my_org, vector my_ang, vector other_org, vector other_ang); float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig); @@ -21,9 +25,12 @@ void WarpZone_MakeAllSolid(); void WarpZone_MakeAllOther(); #define MOVE_NOTHING -1 +entity WarpZone_trace_forent; // temp, callback is allowed to change it typedef void(vector start, vector hit, vector end) WarpZone_trace_callback_t; // called on every elementary trace const var WarpZone_trace_callback_t WarpZone_trace_callback_t_null; entity WarpZone_trace_transform; // transform accumulator during a trace +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) +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) vector WarpZone_tracetoss_velocity; // ending velocity of a tracetoss (post-transform) float WarpZone_tracetoss_time; // duration of toss (approximate) void WarpZone_TraceBox(vector org, vector min, vector max, vector end, float nomonsters, entity forent); @@ -32,6 +39,9 @@ void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent) void WarpZone_TraceToss(entity e, entity forent); void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZone_trace_callback_t cb); void WarpZone_TrailParticles(entity own, float eff, vector org, vector end); +#ifdef CSQC +void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, float boxflags); +#endif .vector WarpZone_findradius_dist; .vector WarpZone_findradius_nearest; @@ -60,3 +70,22 @@ vector WarpZone_RefSys_TransformVelocity(entity from, entity to, vector vel); vector WarpZone_RefSys_TransformAngles(entity from, entity to, vector ang); vector WarpZone_RefSys_TransformVAngles(entity from, entity to, vector ang); entity WarpZone_RefSys_SpawnSameRefSys(entity me); + +#ifndef BITCLR +# define BITCLR(a,b) ((a) - ((a) & (b))) +#endif +#ifndef BITSET +# define BITSET(a,b) ((a) | (b)) +#endif +#ifndef BITXOR +# define BITXOR(a,b) (((a) | (b)) - ((a) & (b))) +#endif +#ifndef BITCLR_ASSIGN +# define BITCLR_ASSIGN(a,b) ((a) = (a) - ((a) & (b))) +#endif +#ifndef BITSET_ASSIGN +# define BITSET_ASSIGN(a,b) ((a) |= (b)) +#endif +#ifndef BITXOR_ASSIGN +# define BITXOR_ASSIGN(a,b) ((a) = ((a) | (b)) - ((a) & (b))) +#endif