diff --git a/src/SB/Game/zNPCTypeBossSandy.cpp b/src/SB/Game/zNPCTypeBossSandy.cpp index 6584422ab..c2a4452de 100644 --- a/src/SB/Game/zNPCTypeBossSandy.cpp +++ b/src/SB/Game/zNPCTypeBossSandy.cpp @@ -566,6 +566,18 @@ void zNPCBSandy_BossDamageEffect_Init() } } +void zNPCBSandy::CalcMagnetizeInfo() +{ + xMat4x3 boneMat; + xQuatFromMat(&this->qBoulder, (xMat3x3*)this->headBoulder->model->Mat); + xVec3Copy(&this->pBoulder, (xVec3*)&this->headBoulder->model->Mat->pos); + xMat4x3Mul(&boneMat, (xMat4x3*)&this->model->Mat[sBone[1]], (xMat4x3*)this->model->Mat); + xQuatFromMat(&this->qHead, &boneMat); + xMat3x3RMulVec(&this->pHead, &boneMat, &sBoneOffset[1]); + xVec3AddTo(&this->pHead, &boneMat.pos); + magnetizeTime = xVec3Dist(&this->pHead, &this->pBoulder) * 0.1f; +} + void zNPCBSandy::InitFX() { this->timeToNextBolt[0] = 0.0f; @@ -1474,7 +1486,7 @@ S32 zNPCGoalBossSandyNoHead::Process(en_trantype* trantype, F32 dt, void* updCtx zNPCBSandy* sandy = (zNPCBSandy*)psyche->clt_owner; U32 numHints; xVec3 newAt; - float lerpFactor; + F32 lerpFactor; xMat4x3 boneMat; xQuat q; @@ -1619,6 +1631,32 @@ S32 zNPCGoalBossSandyElbowDrop::Process(en_trantype* trantype, F32 dt, void* upd return xGoal::Process(trantype, dt, updCtxt, xscn); } +S32 zNPCGoalBossSandyElbowDrop::Exit(F32 dt, void* updCtxt) +{ + sElbowDropTimer = 0.0f; + sElbowDropThreshold = 0.0f; + sChaseTimer = 0.0f; + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalBossSandyLeap::Exit(F32 dt, void* updCtxt) +{ + sChaseTimer = 0.0f; + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalBossSandyGetUp::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* scene) +{ + timeInGoal += dt; + return xGoal::Process(trantype, dt, updCtxt, scene); +} + +S32 zNPCGoalBossSandyRunToRope::Exit(F32 dt, void* updCtxt) +{ + sChaseTimer = 0.0f; + return xGoal::Exit(dt, updCtxt); +} + void xBinaryCamera::add_tweaks(char const*) { } diff --git a/src/SB/Game/zNPCTypeBossSandy.h b/src/SB/Game/zNPCTypeBossSandy.h index 817a1f3e2..c529adeb4 100644 --- a/src/SB/Game/zNPCTypeBossSandy.h +++ b/src/SB/Game/zNPCTypeBossSandy.h @@ -105,6 +105,7 @@ struct zNPCBSandy : zNPCBoss zNPCBSandy(S32 myType); void hiddenByCutscene(); + void CalcMagnetizeInfo(); void InitFX(); /*