@@ -84,7 +84,6 @@ bool Logic::NpcScriptState::startAIState(size_t symIdx, bool endOldState, bool i
8484 m_CurrentState.isRoutineState = isRoutineState;
8585
8686 // Just call the function
87- s.prepareRunFunction ();
8887 s.setInstance (" self" , VobTypes::getScriptObject (vob).instanceSymbol );
8988 s.runFunctionBySymIndex (symIdx);
9089
@@ -245,7 +244,6 @@ bool NpcScriptState::doAIState(float deltaTime)
245244 if (m_CurrentState.symIndex > 0 )
246245 {
247246 // Call setup-function
248- s.prepareRunFunction ();
249247 s.runFunctionBySymIndex (m_CurrentState.symIndex );
250248 }
251249
@@ -261,7 +259,6 @@ bool NpcScriptState::doAIState(float deltaTime)
261259 // Call looping-function
262260 if (m_CurrentState.symLoop > 0 )
263261 {
264- s.prepareRunFunction ();
265262 end = s.runFunctionBySymIndex (m_CurrentState.symLoop ) != 0 ;
266263 }
267264
@@ -295,7 +292,6 @@ bool NpcScriptState::doAIState(float deltaTime)
295292 // Call end-function
296293 if (m_CurrentState.symEnd > 0 )
297294 {
298- s.prepareRunFunction ();
299295 s.runFunctionBySymIndex (m_CurrentState.symEnd );
300296 }
301297
@@ -450,7 +446,6 @@ void NpcScriptState::reinitRoutine()
450446
451447 if (newSymFn != 0 )
452448 {
453- s.prepareRunFunction ();
454449 s.runFunctionBySymIndex (newSymFn);
455450
456451 LogInfo () << " Changed routine on "
0 commit comments