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

Function zEntHangable_SetShaggy

src/SB/Game/zEntHangable.cpp:447–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447void zEntHangable_SetShaggy(zEntHangable* ent, zEnt* shaggy)
448{
449 if (shaggy != NULL)
450 {
451 if (ent->shaggy == NULL)
452 {
453 ent->shaggy = shaggy;
454 shaggy->frame->mode = 1;
455 shaggy->frame->vel.x = 0.0f;
456 shaggy->frame->vel.y = 0.0f;
457 shaggy->frame->vel.z = 0.0f;
458 shaggy->frame->mat.pos.x = ent->model->Mat->pos.x;
459 shaggy->frame->mat.pos.z = ent->model->Mat->pos.z;
460 *shaggy->model->Mat = *(RwMatrixTag *)(&shaggy->frame->mat);
461 }
462 }
463 else if (ent->shaggy != NULL)
464 {
465 ent->shaggy = NULL;
466 }
467}
468
469void zEntHangable_FollowUpdate(zEntHangable* ent)
470{

Callers 1

zEntHangable_ResetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected