MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / isInState

Method isInState

src/logic/NpcScriptState.cpp:463–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463bool NpcScriptState::isInState(size_t stateMain)
464{
465 if (m_CurrentState.valid)
466 {
467 return m_CurrentState.symIndex == stateMain || (m_CurrentState.prgState != NPC_PRGAISTATE_INVALID && m_CurrentState.prgState == stateMain);
468 }
469 else if (m_NextState.valid)
470 {
471 return m_NextState.symIndex == stateMain || (m_NextState.prgState != NPC_PRGAISTATE_INVALID && m_NextState.prgState == stateMain);
472 }
473
474 return false;
475}
476
477void NpcScriptState::importState(NpcAIState& state, const json& j) const
478{

Callers 2

dieMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected