[nexuiz-commits] r8697 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Feb 28 14:43:12 EST 2010


Author: div0
Date: 2010-02-28 14:43:12 -0500 (Sun, 28 Feb 2010)
New Revision: 8697

Modified:
   trunk/data/qcsrc/server/portals.qc
Log:
fix porto

Modified: trunk/data/qcsrc/server/portals.qc
===================================================================
--- trunk/data/qcsrc/server/portals.qc	2010-02-28 19:43:08 UTC (rev 8696)
+++ trunk/data/qcsrc/server/portals.qc	2010-02-28 19:43:12 UTC (rev 8697)
@@ -34,7 +34,9 @@
 	 */
 
 	// PLAYERS use different math
+#ifndef POSITIVE_PITCH_IS_DOWN
 	ang_x = -ang_x;
+#endif
 
 	//print("reference: ", vtos(AnglesTransform_ApplyToVAngles(transform, ang)), "\n");
 
@@ -73,7 +75,9 @@
 		//print("GOOD path: ", vtos(ang), "\n");
 	}
 
+#ifndef POSITIVE_PITCH_IS_DOWN
 	ang_x = -ang_x;
+#endif
 	ang_z = vangle_z;
 	return ang;
 }
@@ -99,7 +103,7 @@
 	// this now is INSIDE the plane... can't use that
 
 	// shift it out
-	fixedmakevectors(teleporter.enemy.angles);
+	fixedmakevectors(teleporter.enemy.mangle);
 
 	// first shift it ON the plane if needed
 	planeshift = ((teleporter.enemy.origin - to) * v_forward) + PlayerEdgeDistance(player, v_forward) + 1;
@@ -188,7 +192,7 @@
 	o = portal.origin;
 	portal.mins = PL_MIN - SAFERNUDGE;
 	portal.maxs = PL_MAX + SAFERNUDGE;
-	fixedmakevectors(portal.angles);
+	fixedmakevectors(portal.mangle);
 	portal.origin += 16 * v_forward;
 	if(!move_out_of_solid(portal))
 	{
@@ -276,7 +280,7 @@
 		if(other.aiment.classname == "player")
 			if(IS_INDEPENDENT_PLAYER(other.aiment) || IS_INDEPENDENT_PLAYER(self.aiment))
 				return; // cannot go through someone else's portal
-	fixedmakevectors(self.angles);
+	fixedmakevectors(self.mangle);
 	g = frametime * '0 0 -1' * cvar("sv_gravity");
 	if(!Portal_WillHitPlane(other.origin, other.mins, other.maxs, other.velocity + g, self.origin, v_forward, self.maxs_x))
 		return;
@@ -351,7 +355,7 @@
 
 void Portal_Connect(entity teleporter, entity destination)
 {
-	teleporter.portal_transform = AnglesTransform_Divide(AnglesTransform_TurnDirectionFR(destination.angles), teleporter.angles);
+	teleporter.portal_transform = AnglesTransform_Divide(AnglesTransform_TurnDirectionFR(destination.mangle), teleporter.mangle);
 
 	teleporter.enemy = destination;
 	destination.enemy = teleporter;
@@ -389,7 +393,7 @@
 	// makes the portal vanish
 	if(killed)
 	{
-		fixedmakevectors(portal.angles);
+		fixedmakevectors(portal.mangle);
 		sound(portal, CHAN_PROJECTILE, "porto/explode.wav", VOL_BASE, ATTN_NORM);
 		pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
 		remove(portal);
@@ -445,7 +449,7 @@
 
 	g = frametime * '0 0 -1' * cvar("sv_gravity");
 
-	fixedmakevectors(self.angles);
+	fixedmakevectors(self.mangle);
 
 	FOR_EACH_PLAYER(e)
 	{
@@ -602,7 +606,9 @@
 	portal.classname = "portal";
 	portal.aiment = own;
 	setorigin(portal, org);
+	portal.mangle = ang;
 	portal.angles = ang;
+	portal.angles_x = -portal.angles_x; // is a bmodel
 	portal.think = Portal_Think;
 	portal.nextthink = 0;
 	portal.portal_activatetime = time + 0.1;



More information about the nexuiz-commits mailing list