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

Function xEntDriveDismount

src/SB/Core/x/xEntDrive.cpp:167–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void xEntDriveDismount(xEntDrive* drv, F32 dmt)
168{
169 if (drv == NULL)
170 {
171 return;
172 }
173
174 if (drv->driver == NULL)
175 {
176 return;
177 }
178
179 if (drv->driven == NULL || drv->driven->frame == NULL || drv->driver->frame == NULL)
180 {
181 xEntDriveInit(drv, drv->driven);
182 return;
183 }
184 drv->odriver = drv->driver;
185 drv->os = drv->s;
186 drv->otm = dmt;
187 drv->otmr = dmt * drv->os;
188 if (drv->driver != NULL)
189 {
190 drv->driver->driving_count--;
191 }
192
193 drv->driver = NULL;
194 drv->s = 0.0f;
195 drv->tm = 0.0f;
196 drv->tmr = 0.0f;
197 drv->flags &= ~2;
198 xVec3Copy(&drv->q, &drv->driven->frame->mat.pos);
199 xMat4x3Tolocal(&drv->op, &drv->odriver->frame->mat, &drv->q);
200}
201
202void xEntDriveUpdate(xEntDrive* drv, xScene* s, F32 dt, const xCollis* coll)
203{

Callers 3

CollideReviewMethod · 0.85
zEntPickupEventCBFunction · 0.85
zPlatformEventCBFunction · 0.85

Calls 3

xEntDriveInitFunction · 0.85
xVec3CopyFunction · 0.85
xMat4x3TolocalFunction · 0.85

Tested by

no test coverage detected