MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Execute

Method Execute

neo/d3xp/script/Script_Thread.cpp:671–701  ·  view source on GitHub ↗

================ idThread::Execute ================ */

Source from the content-addressed store, hash-verified

669================
670*/
671bool idThread::Execute( void ) {
672 idThread *oldThread;
673 bool done;
674
675 if ( manualControl && ( waitingUntil > gameLocal.time ) ) {
676 return false;
677 }
678
679 oldThread = currentThread;
680 currentThread = this;
681
682 lastExecuteTime = gameLocal.time;
683 ClearWaitFor();
684 done = interpreter.Execute();
685 if ( done ) {
686 End();
687 if ( interpreter.terminateOnExit ) {
688 PostEventMS( &EV_Remove, 0 );
689 }
690 } else if ( !manualControl ) {
691 if ( waitingUntil > lastExecuteTime ) {
692 PostEventMS( &EV_Thread_Execute, waitingUntil - lastExecuteTime );
693 } else if ( interpreter.MultiFrameEventInProgress() ) {
694 PostEventMS( &EV_Thread_Execute, gameLocal.msec );
695 }
696 }
697
698 currentThread = oldThread;
699
700 return done;
701}
702
703/*
704================

Callers 15

CallFrameCommandMethod · 0.45
UpdateStateMethod · 0.45
UpdateScriptMethod · 0.45
UpdateSkinMethod · 0.45
OwnerDiedMethod · 0.45
WeaponStolenMethod · 0.45
ConstructScriptObjectMethod · 0.45
UpdateScriptMethod · 0.45
EnterCinematicMethod · 0.45
ExitCinematicMethod · 0.45

Calls 1

Tested by

no test coverage detected