mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 22:41:14 +00:00
Defines for Actor#bgCheckFlags
(#1126)
* First pass, tool assisted bgCheckFlags * Few manual bgCheckFlags * Run formatter * Remove fake bgCheckFlags 10-15 * Move existing documentation to the defines * Comment on `bgCheckFlags` and rephrase some doc * Name obvious flags, and some cleanup * Comment on flag 9 being wall-interaction-related (thanks engineer and fig) * Run formatter * `BGCHECKFLAG_7` -> `BGCHECKFLAG_GROUND_STRICT` * Touch up water-related bgcheckflags doc * `BGCHECKFLAG_9` -> `BGCHECKFLAG_PLAYER_WALL_INTERACT`
This commit is contained in:
parent
251d90301c
commit
67f294774b
121 changed files with 711 additions and 652 deletions
|
@ -1389,7 +1389,7 @@ void BossTw_HitByBeam(BossTw* this, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
this->actor.world.pos.y += 50.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -3539,7 +3539,7 @@ void BossTw_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
diff.y = this->groundBlastPos2.y - player->actor.world.pos.y;
|
||||
diff.z = this->groundBlastPos2.z - player->actor.world.pos.z;
|
||||
|
||||
if ((fabsf(diff.y) < 10.0f) && (player->actor.bgCheckFlags & 1) &&
|
||||
if ((fabsf(diff.y) < 10.0f) && (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
(sqrtf(SQ(diff.x) + SQ(diff.z)) < (this->workf[UNK_F12] * 4600.0f)) && (sFreezeState == 0) &&
|
||||
(this->workf[UNK_F11] > 200.0f)) {
|
||||
sFreezeState = 1;
|
||||
|
@ -4057,7 +4057,7 @@ void BossTw_BlastFire(BossTw* this, GlobalContext* globalCtx) {
|
|||
yDiff = sKoumePtr->groundBlastPos2.y - player->actor.world.pos.y;
|
||||
zDiff = sKoumePtr->groundBlastPos2.z - player->actor.world.pos.z;
|
||||
|
||||
if (!player->isBurning && (player->actor.bgCheckFlags & 1) && (fabsf(yDiff) < 10.0f) &&
|
||||
if (!player->isBurning && (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (fabsf(yDiff) < 10.0f) &&
|
||||
(sqrtf(SQ(xDiff) + SQ(zDiff)) < (sKoumePtr->workf[UNK_F13] * 4550.0f))) {
|
||||
s16 j;
|
||||
|
||||
|
@ -5330,7 +5330,7 @@ void BossTw_TwinrovaStun(BossTw* this, GlobalContext* globalCtx) {
|
|||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_035030, 0.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue