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

Function xTimerUpdate

src/SB/Core/x/xTimer.cpp:134–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void xTimerUpdate(xBase* to, xScene* sc, F32 dt)
135{
136 xTimer* t = (xTimer*)to;
137
138 if (t->state != 1)
139 return;
140
141 if ((t->flags & 1) != 0 && globals.player.ControlOff && ztalkbox::get_active() != NULL)
142 return;
143
144 t->secondsLeft -= dt;
145 if (t->secondsLeft <= 0.0f)
146 {
147 zEntEvent(t, t, eEventExpired);
148 }
149}

Callers 1

zSceneUpdateFunction · 0.50

Calls 1

zEntEventFunction · 0.70

Tested by

no test coverage detected