Einen Nullpointer-Check auf den Skin. Fixt einen Crash in rogue, wenn

Dateien fehlen.
This commit is contained in:
Yamagi Burmeister 2010-02-20 07:48:37 +00:00
parent be1c483597
commit 91b84e1aac

View file

@ -784,20 +784,23 @@ void CL_AddPacketEntities (frame_t *frame)
//PGM //PGM
if (renderfx & RF_USE_DISGUISE) if (renderfx & RF_USE_DISGUISE)
{ {
if(!strncmp((char *)ent.skin, "players/male", 12)) if (ent.skin != NULL)
{ {
ent.skin = re.RegisterSkin ("players/male/disguise.pcx"); if(!strncmp((char *)ent.skin, "players/male", 12))
ent.model = re.RegisterModel ("players/male/tris.md2"); {
} ent.skin = re.RegisterSkin ("players/male/disguise.pcx");
else if(!strncmp((char *)ent.skin, "players/female", 14)) ent.model = re.RegisterModel ("players/male/tris.md2");
{ }
ent.skin = re.RegisterSkin ("players/female/disguise.pcx"); else if(!strncmp((char *)ent.skin, "players/female", 14))
ent.model = re.RegisterModel ("players/female/tris.md2"); {
} ent.skin = re.RegisterSkin ("players/female/disguise.pcx");
else if(!strncmp((char *)ent.skin, "players/cyborg", 14)) ent.model = re.RegisterModel ("players/female/tris.md2");
{ }
ent.skin = re.RegisterSkin ("players/cyborg/disguise.pcx"); else if(!strncmp((char *)ent.skin, "players/cyborg", 14))
ent.model = re.RegisterModel ("players/cyborg/tris.md2"); {
ent.skin = re.RegisterSkin ("players/cyborg/disguise.pcx");
ent.model = re.RegisterModel ("players/cyborg/tris.md2");
}
} }
} }
//PGM //PGM