This commit is contained in:
Tim Angus 2005-10-23 17:18:23 +00:00
parent e27a35a207
commit 69b81f2bd9
1 changed files with 8 additions and 10 deletions

View File

@ -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;
}
}