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

Function zEntButton_Move

src/SB/Game/zEntButton.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void zEntButton_Move(_zEntButton* ent, xScene* sc, F32 dt, xEntFrame* frame)
92{
93 if (ent->driver != NULL)
94 {
95 xEntFrame* ent_frame = ent->driver->frame;
96 if (ent->driveMode == 0)
97 {
98 xVec3 diff;
99 xVec3Sub(&diff, &ent_frame->mat.pos, &ent_frame->oldmat.pos);
100 xVec3Add(&ent->motion.mech.apos, &ent->motion.mech.apos, &diff);
101 xVec3Add(&ent->motion.mech.bpos, &ent->motion.mech.bpos, &diff);
102 }
103 }
104
105 xEntMotionMove(&ent->motion, sc, dt, frame);
106}
107
108void zEntButton_Setup(_zEntButton* ent, xScene*)
109{

Callers

nothing calls this directly

Calls 3

xVec3SubFunction · 0.85
xVec3AddFunction · 0.85
xEntMotionMoveFunction · 0.85

Tested by

no test coverage detected