- fixed getting state name with incomplete list of actor classes
https://forum.zdoom.org/viewtopic.php?t=69713
This commit is contained in:
parent
fb20730960
commit
f46e3bacb2
3 changed files with 12 additions and 4 deletions
|
|
@ -128,9 +128,17 @@ PClassActor *FState::StaticFindStateOwner (const FState *state, PClassActor *inf
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FString FState::StaticGetStateName(const FState *state)
|
||||
FString FState::StaticGetStateName(const FState *state, PClassActor *info)
|
||||
{
|
||||
auto so = FState::StaticFindStateOwner(state);
|
||||
if (so == nullptr)
|
||||
{
|
||||
so = FState::StaticFindStateOwner(state, info);
|
||||
}
|
||||
if (so == nullptr)
|
||||
{
|
||||
return "<unknown>";
|
||||
}
|
||||
return FStringf("%s.%d", so->TypeName.GetChars(), int(state - so->GetStates()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue