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

Method startRoutineState

src/logic/NpcScriptState.cpp:312–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312bool NpcScriptState::startRoutineState(bool force)
313{
314 VobTypes::NpcVobInformation npc = VobTypes::asNpcVob(m_World, m_HostVob);
315
316 // Just say "yes" for the player, as he never has any routine
317 if (npc.playerController->isPlayerControlled())
318 return true;
319
320 // Turn off, so we don't recurse
321 m_Routine.startNewRoutine = false;
322
323 // Start new state
324 bool res = activateRoutineState(force);
325 m_Routine.startNewRoutine = !res;
326
327 return res;
328}
329
330bool NpcScriptState::isInRoutine()
331{

Callers 1

EV_StateMethod · 0.80

Calls 1

isPlayerControlledMethod · 0.80

Tested by

no test coverage detected