aboutsummaryrefslogtreecommitdiffstats
path: root/code/cgame
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-23 17:18:23 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-23 17:18:23 +0000
commitce657b08b631122d881cb6dff2a47b735b06f2fb (patch)
tree01d9e69ae4b6e5f1d2bb0fbaf91ab5846a9a7a59 /code/cgame
parentbd081280b1ccbf813bdf7335ff0ef1a14075e8d9 (diff)
downloadioquake3-aero-ce657b08b631122d881cb6dff2a47b735b06f2fb.tar.gz
ioquake3-aero-ce657b08b631122d881cb6dff2a47b735b06f2fb.zip
* Fix to https://bugzilla.icculus.org/show_bug.cgi?id=2401
git-svn-id: svn://svn.icculus.org/quake3/trunk@176 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/cgame')
-rw-r--r--code/cgame/cg_players.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c
index dd29fe2..7ed3427 100644
--- a/code/cgame/cg_players.c
+++ b/code/cgame/cg_players.c
@@ -649,11 +649,10 @@ Load it now, taking the disk hits.
This will usually be deferred to a safe time
===================
*/
-static void CG_LoadClientInfo( clientInfo_t *ci ) {
+static void CG_LoadClientInfo( int clientNum, clientInfo_t *ci ) {
const char *dir, *fallback;
int i, modelloaded;
const char *s;
- int clientNum;
char teamname[MAX_QPATH];
teamname[0] = 0;
@@ -726,7 +725,6 @@ static void CG_LoadClientInfo( clientInfo_t *ci ) {
// reset any existing players and bodies, because they might be in bad
// frames for this new model
- clientNum = ci - cgs.clientinfo;
for ( i = 0 ; i < MAX_GENTITIES ; i++ ) {
if ( cg_entities[i].currentState.clientNum == clientNum
&& cg_entities[i].currentState.eType == ET_PLAYER ) {
@@ -805,7 +803,7 @@ We aren't going to load it now, so grab some other
client's info to use until we have some spare time.
======================
*/
-static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
+static void CG_SetDeferredClientInfo( int clientNum, clientInfo_t *ci ) {
int i;
clientInfo_t *match;
@@ -824,7 +822,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
continue;
}
// just load the real info cause it uses the same models and skins
- CG_LoadClientInfo( ci );
+ CG_LoadClientInfo( clientNum, ci );
return;
}
@@ -847,7 +845,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
// an improper team skin. This will cause a hitch for the first
// player, when the second enters. Combat shouldn't be going on
// yet, so it shouldn't matter
- CG_LoadClientInfo( ci );
+ CG_LoadClientInfo( clientNum, ci );
return;
}
@@ -866,7 +864,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
// we should never get here...
CG_Printf( "CG_SetDeferredClientInfo: no valid clients!\n" );
- CG_LoadClientInfo( ci );
+ CG_LoadClientInfo( clientNum, ci );
}
@@ -1037,14 +1035,14 @@ void CG_NewClientInfo( int clientNum ) {
// if we are defering loads, just have it pick the first valid
if ( forceDefer || (cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) {
// keep whatever they had if it won't violate team skins
- CG_SetDeferredClientInfo( &newInfo );
+ CG_SetDeferredClientInfo( clientNum, &newInfo );
// if we are low on memory, leave them with this model
if ( forceDefer ) {
CG_Printf( "Memory is low. Using deferred model.\n" );
newInfo.deferred = qfalse;
}
} else {
- CG_LoadClientInfo( &newInfo );
+ CG_LoadClientInfo( clientNum, &newInfo );
}
}
@@ -1077,7 +1075,7 @@ void CG_LoadDeferredPlayers( void ) {
ci->deferred = qfalse;
continue;
}
- CG_LoadClientInfo( ci );
+ CG_LoadClientInfo( i, ci );
// break;
}
}