engine: server: sv_pmove: use model name for physent name to avoid crash when classname isn't initialized yet

This commit is contained in:
Alibek Omarov 2023-10-28 11:04:35 +03:00
parent 8647110a10
commit 7f9025e178
1 changed files with 2 additions and 2 deletions

View File

@ -80,8 +80,8 @@ static qboolean SV_CopyEdictToPhysEnt( physent_t *pe, edict_t *ed )
}
else
{
// otherwise copy the classname
Q_strncpy( pe->name, STRING( ed->v.classname ), sizeof( pe->name ));
// otherwise copy the modelname
Q_strncpy( pe->name, mod->name, sizeof( pe->name ));
}
pe->model = pe->studiomodel = NULL;