[Quake2world-dev] r173 - in quake2world/trunk/src: . game/default

jdolan at jdolan.dyndns.org jdolan at jdolan.dyndns.org
Wed Feb 11 03:11:07 UTC 2009


Author: jdolan
Date: 2009-02-11 03:11:06 +0000 (Wed, 11 Feb 2009)
New Revision: 173

Modified:
   quake2world/trunk/src/game/default/g_local.h
   quake2world/trunk/src/game/default/g_misc.c
   quake2world/trunk/src/game/default/p_client.c
   quake2world/trunk/src/pmove.c
   quake2world/trunk/src/shared.h
Log:
Kill off useless code (?)

Modified: quake2world/trunk/src/game/default/g_local.h
===================================================================
--- quake2world/trunk/src/game/default/g_local.h	2009-02-11 02:50:24 UTC (rev 172)
+++ quake2world/trunk/src/game/default/g_local.h	2009-02-11 03:11:06 UTC (rev 173)
@@ -679,7 +679,6 @@
 
 	// private to game
 	client_locals_t locals;
-	pmove_state_t old_pmove;  // for detecting out-of-pmove changes
 
 	qboolean showscores;  // set layout stat
 

Modified: quake2world/trunk/src/game/default/g_misc.c
===================================================================
--- quake2world/trunk/src/game/default/g_misc.c	2009-02-11 02:50:24 UTC (rev 172)
+++ quake2world/trunk/src/game/default/g_misc.c	2009-02-11 03:11:06 UTC (rev 173)
@@ -239,7 +239,7 @@
 	dest = G_Find(NULL, FOFS(targetname), self->target);
 
 	if(!dest){
-		gi.Dprintf("Couldn't find destination\n");
+		gi.Dprintf("G_teleporter_touch: Couldn't find destination.\n");
 		return;
 	}
 
@@ -270,7 +270,7 @@
 
 	AngleVectors(dest->s.angles, forward, NULL, NULL);
 	VectorScale(forward, speed, other->velocity);
-	other->velocity[2] += 100.0;
+	other->velocity[2] = 150.0;
 
 	VectorClear(other->client->cmd_angles);
 	VectorClear(other->s.angles);
@@ -293,7 +293,7 @@
 	vec3_t v;
 
 	if(!ent->target){
-		gi.Dprintf("teleporter without a target.\n");
+		gi.Dprintf("G_misc_teleporter: No target specified.\n");
 		G_FreeEdict(ent);
 		return;
 	}

Modified: quake2world/trunk/src/game/default/p_client.c
===================================================================
--- quake2world/trunk/src/game/default/p_client.c	2009-02-11 02:50:24 UTC (rev 172)
+++ quake2world/trunk/src/game/default/p_client.c	2009-02-11 03:11:06 UTC (rev 173)
@@ -736,7 +736,7 @@
 	VectorCopy(mins, ent->mins);
 	VectorCopy(maxs, ent->maxs);
 	VectorClear(ent->velocity);
-	ent->velocity[2] = 100.0;
+	ent->velocity[2] = 150.0;
 
 	// clear playerstate values
 	memset(&ent->client->ps, 0, sizeof(client->ps));
@@ -1171,10 +1171,6 @@
 			pm.s.velocity[i] = ent->velocity[i] * 8.0;
 		}
 
-		if(memcmp(&client->old_pmove, &pm.s, sizeof(pm.s))){
-			pm.snapinitial = true;
-		}
-
 		pm.cmd = *ucmd;
 
 		pm.trace = P_Trace;  // adds default params
@@ -1185,7 +1181,6 @@
 
 		// save results of pmove
 		client->ps.pmove = pm.s;
-		client->old_pmove = pm.s;
 
 		for(i = 0; i < 3; i++){
 			ent->s.origin[i] = pm.s.origin[i] * 0.125;

Modified: quake2world/trunk/src/pmove.c
===================================================================
--- quake2world/trunk/src/pmove.c	2009-02-11 02:50:24 UTC (rev 172)
+++ quake2world/trunk/src/pmove.c	2009-02-11 03:11:06 UTC (rev 173)
@@ -892,38 +892,6 @@
 
 
 /*
- * Pm_InitialSnapPosition
- */
-static void Pm_InitialSnapPosition(void){
-	int x, y, z;
-	short base[3];
-	static int offset[3] = { 0, -1,  1 };
-
-	VectorCopy(pm->s.origin, base);
-
-	for(z = 0; z < 3; z++){
-		pm->s.origin[2] = base[2] + offset[ z ];
-
-		for(y = 0; y < 3; y++){
-			pm->s.origin[1] = base[1] + offset[ y ];
-
-			for(x = 0; x < 3; x++){
-				pm->s.origin[0] = base[0] + offset[ x ];
-
-				if(Pm_GoodPosition()){
-					VectorScale(pml.origin, 0.125, pm->s.origin);
-					VectorCopy(pm->s.origin, pml.previous_origin);
-					return;
-				}
-			}
-		}
-	}
-
-	Com_Dprintf("Pm_InitialSnapPosition: Bad position.\n");
-}
-
-
-/*
  * Pm_ClampAngles
  */
 static void Pm_ClampAngles(void){
@@ -1085,9 +1053,6 @@
 	// set mins, maxs, and viewheight
 	Pm_CheckDuck();
 
-	if(pm->snapinitial)
-		Pm_InitialSnapPosition();
-
 	// set groundentity, watertype, and waterlevel
 	Pm_CategorizePosition();
 

Modified: quake2world/trunk/src/shared.h
===================================================================
--- quake2world/trunk/src/shared.h	2009-02-11 02:50:24 UTC (rev 172)
+++ quake2world/trunk/src/shared.h	2009-02-11 03:11:06 UTC (rev 173)
@@ -438,7 +438,6 @@
 	pmove_state_t s;  // state (in / out)
 
 	usercmd_t cmd;  // command (in)
-	qboolean snapinitial;  // if s has been changed outside pmove
 
 	int numtouch;  // results (out)
 	struct edict_s *touchents[MAXTOUCH];



More information about the Quake2World-dev mailing list