mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 21:41:59 +00:00
Document/fix Player.bodyPartsPos
usage (#1141)
* Document/fix `Player#bodyPartsPos` usage * `distFromLinksHead` -> `distFromPlayerHat` * Comment on `bodyPartsPos[-1]` * Run formatter * Use `PLAYER_BODYPART_MAX` more * Use hex for `PlayerBodyPart` enum comments
This commit is contained in:
parent
c73053db6f
commit
5cadc5df8a
18 changed files with 166 additions and 120 deletions
|
@ -180,9 +180,10 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if (!(this->actor.xzDistToPlayer > 120.0f) && gSaveContext.dayTime >= 0x4555 && gSaveContext.dayTime < 0x5000) {
|
||||
cylinderPos.x = player->bodyPartsPos[7].x + globalCtx->envCtx.sunPos.x * (1.0f / 6.0f);
|
||||
cylinderPos.y = player->bodyPartsPos[7].y - 30.0f + globalCtx->envCtx.sunPos.y * (1.0f / 6.0f);
|
||||
cylinderPos.z = player->bodyPartsPos[7].z + globalCtx->envCtx.sunPos.z * (1.0f / 6.0f);
|
||||
cylinderPos.x = player->bodyPartsPos[PLAYER_BODYPART_HEAD].x + globalCtx->envCtx.sunPos.x * (1.0f / 6.0f);
|
||||
cylinderPos.y =
|
||||
player->bodyPartsPos[PLAYER_BODYPART_HEAD].y - 30.0f + globalCtx->envCtx.sunPos.y * (1.0f / 6.0f);
|
||||
cylinderPos.z = player->bodyPartsPos[PLAYER_BODYPART_HEAD].z + globalCtx->envCtx.sunPos.z * (1.0f / 6.0f);
|
||||
|
||||
this->hitboxPos = cylinderPos;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue