1 vector WarpZone_TransformVAngles(vector t, vector ang)
10 print(vtos(ang), " input\n");
15 print(vtos(vf), " -> ", vtos(AnglesTransform_Apply(t, vf)), "\n");
16 print(vtos(vr), " -> ", vtos(AnglesTransform_Apply(t, vr)), "\n");
17 print(vtos(vu), " -> ", vtos(AnglesTransform_Apply(t, vu)), "\n");
20 ang = AnglesTransform_ApplyToVAngles(t, ang);
21 // FIXME when a roll comes out and angle is near +/-90 degrees
22 // then roll can be incorporated into yaw and cancelled out
25 print(vtos(ang), " output\n");
27 print(vtos(vf), " -> ", vtos(v_forward), "\n");
28 print(vtos(vr), " -> ", vtos(v_right), "\n");
29 print(vtos(vu), " -> ", vtos(v_up), "\n");
32 ang = AnglesTransform_Normalize(ang, TRUE);
33 ang = AnglesTransform_CancelRoll(ang);
36 print(vtos(ang), " output\n");
43 vector WarpZoneLib_BoxTouchesBrush_mins;
44 vector WarpZoneLib_BoxTouchesBrush_maxs;
45 entity WarpZoneLib_BoxTouchesBrush_ent;
46 entity WarpZoneLib_BoxTouchesBrush_ignore;
47 float WarpZoneLib_BoxTouchesBrush_Recurse()
53 tracebox('0 0 0', WarpZoneLib_BoxTouchesBrush_mins, WarpZoneLib_BoxTouchesBrush_maxs, '0 0 0', MOVE_NOMONSTERS, WarpZoneLib_BoxTouchesBrush_ignore);
55 if (trace_networkentity)
57 dprint("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n");
58 // we cannot continue, as a player blocks us...
65 if (trace_ent == WarpZoneLib_BoxTouchesBrush_ent)
73 f = WarpZoneLib_BoxTouchesBrush_Recurse();
79 float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig)
88 WarpZoneLib_BoxTouchesBrush_mins = mi;
89 WarpZoneLib_BoxTouchesBrush_maxs = ma;
90 WarpZoneLib_BoxTouchesBrush_ent = e;
91 WarpZoneLib_BoxTouchesBrush_ignore = ig;
92 f = WarpZoneLib_BoxTouchesBrush_Recurse();