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

Function zEntReset

src/SB/Game/zEnt.cpp:252–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void zEntReset(zEnt* ent)
253{
254 xEntReset(ent);
255
256 if (ent->asset->animListID != 0 && ent->atbl != NULL)
257 {
258 xAnimState* ast = xAnimTableGetState(ent->atbl, "idle");
259 if (ast != NULL)
260 {
261 xAnimSingle* single = ent->model->Anim->Single;
262 single->State = ast;
263 single->Time = 0.0f;
264 single->CurrentSpeed = 1.0f;
265 xModelEval(ent->model);
266 }
267 }
268
269 if (!(ent->miscflags & 1) && ent->asset->modelInfoID != 0 && ent->model != NULL &&
270 ent->model->Anim != NULL && ent->model->Anim->Table != NULL &&
271 strcmp("xEntAutoEventSimple", ent->model->Anim->Table->Name) == 0)
272 {
273 ent->model->Anim = ent->model->Anim;
274 xAnimPlaySetState(ent->model->Anim->Single, ent->model->Anim->Table->StateList, 0.0f);
275 ent->miscflags = ent->miscflags | 1;
276 }
277 checkpoint_collision_hack(ent);
278}
279
280void zEntUpdate(zEnt* ent, zScene* scene, F32 elapsedSec)
281{

Callers 11

zPendulum_InitFunction · 0.70
zPendulum_ResetFunction · 0.70
zEntTriggerResetFunction · 0.70
zEntSimpleObj_InitFunction · 0.70
zEntSimpleObj_ResetFunction · 0.70
zEGenerator_ResetFunction · 0.70
zEntPickupInitFunction · 0.70
zEntPickup_ResetFunction · 0.70
zPlatform_ResetFunction · 0.70
zUI_InitFunction · 0.70
zUI_ResetFunction · 0.70

Calls 6

xAnimTableGetStateFunction · 0.85
xModelEvalFunction · 0.85
strcmpFunction · 0.85
xAnimPlaySetStateFunction · 0.85
xEntResetFunction · 0.50

Tested by

no test coverage detected