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

Function zEntButton_Reset

src/SB/Game/zEntButton.cpp:155–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void zEntButton_Reset(_zEntButton* ent, xScene* sc)
156{
157 xEntReset((xEnt*)ent);
158 xEntMotionInit(&ent->motion, (xEnt*)ent, (xEntMotionAsset*)(ent->basset + 1));
159 xEntMotionReset(&ent->motion, sc);
160
161 ent->pflags |= (1 << 0);
162 ent->penby |= XENT_COLLTYPE_PLYR;
163 if (ent->asset->flags & (1 << 0))
164 {
165 ent->flags |= (1 << 0);
166 }
167 ent->chkby |= XENT_COLLTYPE_PLYR;
168
169 ent->bupdate(ent, (xVec3*)&ent->model->Mat->pos);
170
171 ent->state = 0;
172
173 xEntMotionStop(&ent->motion);
174 ent->oldState = 5;
175 ent->oldMotState = 6;
176}
177
178void zEntButton_Update(_zEntButton* ent, xScene* sc, F32 dt)
179{

Callers 2

zEntButtonEventCBFunction · 0.85
zSceneSetupFunction · 0.85

Calls 4

xEntMotionStopFunction · 0.85
xEntResetFunction · 0.50
xEntMotionInitFunction · 0.50
xEntMotionResetFunction · 0.50

Tested by

no test coverage detected