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

Method Process

src/SB/Game/zNPCTypeBossSandy.cpp:1441–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439}
1440
1441S32 zNPCGoalBossSandyIdle::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn)
1442{
1443 zNPCBSandy* sandy = (zNPCBSandy*)psyche->clt_owner;
1444
1445 timeInGoal += dt;
1446
1447 xVec3 newAt;
1448 xVec3Sub(&newAt, (xVec3*)&globals.player.ent.model->Mat->pos, (xVec3*)&sandy->model->Mat->pos);
1449
1450 newAt.y = 0.0f;
1451
1452 xVec3Normalize(&newAt, &newAt);
1453 xVec3SMul((xVec3*)&sandy->frame->mat.at, (xVec3*)&sandy->model->Mat->at, 0.98f);
1454
1455 xVec3AddScaled((xVec3*)&sandy->frame->mat.at, &newAt, 0.02f);
1456
1457 sandy->frame->mat.at.y = 0.0f;
1458 xVec3Normalize(&sandy->frame->mat.at, &sandy->frame->mat.at);
1459 xVec3Cross(&sandy->frame->mat.right, &sandy->frame->mat.up, &sandy->frame->mat.at);
1460
1461 sandy->frame->mat.pos.y = 0.0f;
1462 xVec3Dot(&newAt, (xVec3*)&sandy->model->Mat->right);
1463
1464 F32 lerp = 1.0f;
1465 lerp -= 0.02f;
1466 sandy->model->Anim->Single->BilinearLerp[0] = lerp;
1467 sandy->model->Anim->Single->Blend->BilinearLerp[0] = lerp;
1468
1469 return xGoal::Process(trantype, dt, updCtxt, xscn);
1470}
1471
1472S32 zNPCGoalBossSandyIdle::Exit(F32 dt, void* updCtxt)
1473{

Callers

nothing calls this directly

Calls 12

xVec3SubFunction · 0.85
xVec3SMulFunction · 0.85
xVec3AddScaledFunction · 0.85
xVec3CrossFunction · 0.85
DoAutoAnimFunction · 0.85
xrandFunction · 0.85
AnimTimeRemainMethod · 0.80
xSndPlay3DFunction · 0.70
xVec3NormalizeFunction · 0.50
ProcessFunction · 0.50
xStrHashFunction · 0.50
SpeakStartMethod · 0.45

Tested by

no test coverage detected