- moved OwnedStates and NumOwnedStates out of PClassActor.
This commit is contained in:
parent
05240ccbe5
commit
4afe2d4218
11 changed files with 37 additions and 41 deletions
|
|
@ -353,13 +353,13 @@ static void CheckStates(PClassActor *obj)
|
|||
{
|
||||
CheckStateLabels(obj, pickupstates, SUF_ITEM, "CustomInventory state chain");
|
||||
}
|
||||
for (int i = 0; i < obj->NumOwnedStates; i++)
|
||||
for (int i = 0; i < obj->ActorInfo()->NumOwnedStates; i++)
|
||||
{
|
||||
auto state = obj->OwnedStates + i;
|
||||
auto state = obj->ActorInfo()->OwnedStates + i;
|
||||
if (state->NextState && (state->UseFlags & state->NextState->UseFlags) != state->UseFlags)
|
||||
{
|
||||
GetStateSource(state).Message(MSG_ERROR, TEXTCOLOR_RED "State %s.%d links to a state with incompatible restrictions.\n",
|
||||
obj->TypeName.GetChars(), int(state - obj->OwnedStates));
|
||||
GetStateSource(state).Message(MSG_ERROR, TEXTCOLOR_RED "State %s links to a state with incompatible restrictions.\n",
|
||||
FState::StaticGetStateName(state));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue