Browse Source

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

pull/2/head
Alibek Omarov 1 year ago
parent
commit
7f9025e178
  1. 4
      engine/server/sv_pmove.c

4
engine/server/sv_pmove.c

@ -80,8 +80,8 @@ static qboolean SV_CopyEdictToPhysEnt( physent_t *pe, edict_t *ed ) @@ -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;

Loading…
Cancel
Save