MCPcopy Create free account
hub / github.com/Farama-Foundation/ViZDoom / RunScript

Function RunScript

src/vizdoom/src/fragglescript/t_script.cpp:624–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622//==========================================================================
623
624static bool RunScript(int snum, AActor * t_trigger)
625{
626 DFraggleThinker *th = DFraggleThinker::ActiveThinker;
627 if (th)
628 {
629 // [CO] It is far too dangerous to start the script right away.
630 // Better queue it for execution for the next time
631 // the runningscripts are checked.
632
633 if(snum < 0 || snum >= MAXSCRIPTS) return false;
634
635 DFsScript *script = th->LevelScript->children[snum];
636 if(!script) return false;
637
638 DRunningScript *runscr = new DRunningScript(t_trigger, script, 0);
639 // hook into chain at start
640 th->AddRunningScript(runscr);
641 return true;
642 }
643 return false;
644}
645
646//==========================================================================
647//

Callers 2

LS_FS_ExecuteFunction · 0.70
CCMDFunction · 0.70

Calls 1

AddRunningScriptMethod · 0.80

Tested by

no test coverage detected