[nexuiz-commits] r8719 - in trunk/data/qcsrc: server warpzonelib
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 28 14:45:36 EST 2010
Author: div0
Date: 2010-02-28 14:45:36 -0500 (Sun, 28 Feb 2010)
New Revision: 8719
Modified:
trunk/data/qcsrc/server/g_damage.qc
trunk/data/qcsrc/warpzonelib/common.qc
trunk/data/qcsrc/warpzonelib/common.qh
Log:
change the sense of the transform in findradius
Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc 2010-02-28 19:45:18 UTC (rev 8718)
+++ trunk/data/qcsrc/server/g_damage.qc 2010-02-28 19:45:36 UTC (rev 8719)
@@ -1116,7 +1116,7 @@
local float hitratio;
local vector hitloc;
local vector myblastorigin;
- myblastorigin = WarpZone_UnTransformOrigin(targ, blastorigin);
+ myblastorigin = WarpZone_TransformOrigin(targ, blastorigin);
center = targ.origin + (targ.mins + targ.maxs) * 0.5;
// if it's a player, use the view origin as reference
if (targ.classname == "player")
@@ -1135,7 +1135,7 @@
while (c < total)
{
//traceline(targ.WarpZone_findradius_findorigin, nearest, MOVE_NOMONSTERS, inflictor);
- WarpZone_TraceLine(blastorigin, WarpZone_TransformOrigin(targ, nearest), MOVE_NOMONSTERS, inflictor);
+ WarpZone_TraceLine(blastorigin, WarpZone_UnTransformOrigin(targ, nearest), MOVE_NOMONSTERS, inflictor);
if (trace_fraction == 1 || trace_ent == targ)
{
hits = hits + 1;
Modified: trunk/data/qcsrc/warpzonelib/common.qc
===================================================================
--- trunk/data/qcsrc/warpzonelib/common.qc 2010-02-28 19:45:18 UTC (rev 8718)
+++ trunk/data/qcsrc/warpzonelib/common.qc 2010-02-28 19:45:36 UTC (rev 8719)
@@ -394,7 +394,6 @@
vector org_new;
vector org0_new;
vector shift_new, transform_new;
- vector shift_second, transform_second;
vector p;
entity e, e0;
entity wz;
@@ -444,10 +443,8 @@
traceline(e.warpzone_targetorigin, org0_new, MOVE_NOMONSTERS, e);
org_new = trace_endpos;
- transform_second = AnglesTransform_Invert(e.warpzone_transform);
- shift_second = AnglesTransform_PrePostShift_GetPostShift(e.warpzone_shift, transform_second, '0 0 0'); // invert the shift
- transform_new = AnglesTransform_Multiply(transform, transform_second);
- shift_new = AnglesTransform_Multiply_GetPostShift(transform, shift, transform_second, shift_second);
+ transform_new = AnglesTransform_Multiply(e.warpzone_transform, transform);
+ shift_new = AnglesTransform_Multiply_GetPostShift(e.warpzone_transform, e.warpzone_shift, transform, shift);
WarpZone_FindRadius_Recurse(
org_new,
bound(0, rad - vlen(org_new - org0_new), rad - 8),
Modified: trunk/data/qcsrc/warpzonelib/common.qh
===================================================================
--- trunk/data/qcsrc/warpzonelib/common.qh 2010-02-28 19:45:18 UTC (rev 8718)
+++ trunk/data/qcsrc/warpzonelib/common.qh 2010-02-28 19:45:36 UTC (rev 8719)
@@ -32,7 +32,7 @@
.vector WarpZone_findradius_dist;
.vector WarpZone_findradius_nearest;
-// also set: warpzone parameters, so WarpZone_TransformOrigin can transform vectors from victim's to blast's system
+// also set: warpzone parameters, so WarpZone_TransformOrigin can transform vectors from blast's to victim's system
.vector WarpZone_findradius_findorigin;
.float WarpZone_findradius_findradius;
entity WarpZone_FindRadius(vector org, float radius, float needlineofsight);
More information about the nexuiz-commits
mailing list