mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-18 02:50:33 +00:00
sv_game: fix pfnSetModel theoretically may ignore precached models
This commit is contained in:
parent
8770bdc694
commit
4d63eb4413
@ -1294,14 +1294,19 @@ void pfnSetModel( edict_t *e, const char *m )
|
|||||||
|
|
||||||
if( COM_CheckString( name ))
|
if( COM_CheckString( name ))
|
||||||
{
|
{
|
||||||
|
qboolean notfound = true;
|
||||||
|
|
||||||
// check to see if model was properly precached
|
// check to see if model was properly precached
|
||||||
for( i = 1; i < MAX_MODELS && sv.model_precache[i][0]; i++ )
|
for( i = 1; i < MAX_MODELS && sv.model_precache[i][0]; i++ )
|
||||||
{
|
{
|
||||||
if( !Q_stricmp( sv.model_precache[i], name ))
|
if( !Q_stricmp( sv.model_precache[i], name ))
|
||||||
|
{
|
||||||
|
notfound = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( i == MAX_MODELS )
|
if( notfound )
|
||||||
{
|
{
|
||||||
Con_Printf( S_ERROR "no precache: %s\n", name );
|
Con_Printf( S_ERROR "no precache: %s\n", name );
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user