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

Method Execute

neo/game/script/Script_Thread.cpp:649–679  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

647================
648*/
649bool idThread::Execute( void ) {
650 idThread *oldThread;
651 bool done;
652
653 if ( manualControl && ( waitingUntil > gameLocal.time ) ) {
654 return false;
655 }
656
657 oldThread = currentThread;
658 currentThread = this;
659
660 lastExecuteTime = gameLocal.time;
661 ClearWaitFor();
662 done = interpreter.Execute();
663 if ( done ) {
664 End();
665 if ( interpreter.terminateOnExit ) {
666 PostEventMS( &EV_Remove, 0 );
667 }
668 } else if ( !manualControl ) {
669 if ( waitingUntil > lastExecuteTime ) {
670 PostEventMS( &EV_Thread_Execute, waitingUntil - lastExecuteTime );
671 } else if ( interpreter.MultiFrameEventInProgress() ) {
672 PostEventMS( &EV_Thread_Execute, gameLocal.msec );
673 }
674 }
675
676 currentThread = oldThread;
677
678 return done;
679}
680
681/*
682================

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