mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
This commit is contained in:
parent
e27a35a207
commit
69b81f2bd9
1 changed files with 8 additions and 10 deletions
|
@ -649,11 +649,10 @@ Load it now, taking the disk hits.
|
||||||
This will usually be deferred to a safe time
|
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;
|
const char *dir, *fallback;
|
||||||
int i, modelloaded;
|
int i, modelloaded;
|
||||||
const char *s;
|
const char *s;
|
||||||
int clientNum;
|
|
||||||
char teamname[MAX_QPATH];
|
char teamname[MAX_QPATH];
|
||||||
|
|
||||||
teamname[0] = 0;
|
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
|
// reset any existing players and bodies, because they might be in bad
|
||||||
// frames for this new model
|
// frames for this new model
|
||||||
clientNum = ci - cgs.clientinfo;
|
|
||||||
for ( i = 0 ; i < MAX_GENTITIES ; i++ ) {
|
for ( i = 0 ; i < MAX_GENTITIES ; i++ ) {
|
||||||
if ( cg_entities[i].currentState.clientNum == clientNum
|
if ( cg_entities[i].currentState.clientNum == clientNum
|
||||||
&& cg_entities[i].currentState.eType == ET_PLAYER ) {
|
&& 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.
|
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;
|
int i;
|
||||||
clientInfo_t *match;
|
clientInfo_t *match;
|
||||||
|
|
||||||
|
@ -824,7 +822,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// just load the real info cause it uses the same models and skins
|
// just load the real info cause it uses the same models and skins
|
||||||
CG_LoadClientInfo( ci );
|
CG_LoadClientInfo( clientNum, ci );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -847,7 +845,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
|
||||||
// an improper team skin. This will cause a hitch for the first
|
// an improper team skin. This will cause a hitch for the first
|
||||||
// player, when the second enters. Combat shouldn't be going on
|
// player, when the second enters. Combat shouldn't be going on
|
||||||
// yet, so it shouldn't matter
|
// yet, so it shouldn't matter
|
||||||
CG_LoadClientInfo( ci );
|
CG_LoadClientInfo( clientNum, ci );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,7 +864,7 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
|
||||||
// we should never get here...
|
// we should never get here...
|
||||||
CG_Printf( "CG_SetDeferredClientInfo: no valid clients!\n" );
|
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 we are defering loads, just have it pick the first valid
|
||||||
if ( forceDefer || (cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) {
|
if ( forceDefer || (cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) {
|
||||||
// keep whatever they had if it won't violate team skins
|
// 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 we are low on memory, leave them with this model
|
||||||
if ( forceDefer ) {
|
if ( forceDefer ) {
|
||||||
CG_Printf( "Memory is low. Using deferred model.\n" );
|
CG_Printf( "Memory is low. Using deferred model.\n" );
|
||||||
newInfo.deferred = qfalse;
|
newInfo.deferred = qfalse;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CG_LoadClientInfo( &newInfo );
|
CG_LoadClientInfo( clientNum, &newInfo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1077,7 +1075,7 @@ void CG_LoadDeferredPlayers( void ) {
|
||||||
ci->deferred = qfalse;
|
ci->deferred = qfalse;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
CG_LoadClientInfo( ci );
|
CG_LoadClientInfo( i, ci );
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue