- fixed: GetSoundClass must be able to handle non-players.

This commit is contained in:
Christoph Oelckers 2019-01-04 16:08:45 +01:00
parent f10ded756e
commit 980977d444

View file

@ -1906,7 +1906,7 @@ static const char *GetSoundClass(AActor *pp)
{
return Skins[player->userinfo.GetSkin()].Name.GetChars();
}
auto sclass = pp->NameVar(NAME_SoundClass);
auto sclass = player? pp->NameVar(NAME_SoundClass) : NAME_None;
return sclass != NAME_None ? sclass.GetChars() : "player";
}