| 1439 | } |
| 1440 | |
| 1441 | S32 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 | |
| 1472 | S32 zNPCGoalBossSandyIdle::Exit(F32 dt, void* updCtxt) |
| 1473 | { |
nothing calls this directly
no test coverage detected