MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zScriptUpdate

Function zScriptUpdate

src/SB/Game/zScript.cpp:116–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void zScriptUpdate(xBase* obj, xScene* scene, F32 dt)
117{
118 _zScript* script = (_zScript*)obj;
119 if (script->state == ZSCRIPT_STATE_RUNNING)
120 {
121 zScriptExecuteEvents(script, script->time, script->time + dt);
122 script->time += dt;
123 if (!script->more && script->state == ZSCRIPT_STATE_WAITING)
124 {
125 zEntEvent(script, eEventExpired);
126 }
127 }
128 else if (script->state == ZSCRIPT_STATE_WAITING)
129 {
130 if (globals.pad0 && (globals.pad0->on & 0x40000))
131 {
132 script->state = ZSCRIPT_STATE_RUNNING;
133 }
134 }
135}

Callers 1

zSceneUpdateFunction · 0.70

Calls 2

zScriptExecuteEventsFunction · 0.70
zEntEventFunction · 0.50

Tested by

no test coverage detected