Fixed menu class replacement

https://forum.zdoom.org/viewtopic.php?t=56824
This commit is contained in:
alexey.lysiuk 2017-06-09 14:08:26 +03:00
parent f8ba5c7b1f
commit 7a29128f6b

View file

@ -512,7 +512,7 @@ static void ParseListMenuBody(FScanner &sc, DListMenuDescriptor *desc)
static bool CheckCompatible(DMenuDescriptor *newd, DMenuDescriptor *oldd) static bool CheckCompatible(DMenuDescriptor *newd, DMenuDescriptor *oldd)
{ {
if (oldd->mClass == nullptr) return true; if (oldd->mClass == nullptr) return true;
return oldd->mClass == newd->mClass; return newd->mClass->IsDescendantOf(oldd->mClass);
} }
static bool ReplaceMenu(FScanner &sc, DMenuDescriptor *desc) static bool ReplaceMenu(FScanner &sc, DMenuDescriptor *desc)