mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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
|
@ -106,7 +106,7 @@ void func_80ACE13C(EnPart* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.params == 12) || (this->actor.params == 13)) {
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 5.0f, 15.0f, 0.0f, 0x1D);
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.world.pos.y <= this->actor.floorHeight)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.y <= this->actor.floorHeight)) {
|
||||
this->action = 4;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
|
@ -247,8 +247,8 @@ void EnPart_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 5.0f, 15.0f, 0.0f, 5);
|
||||
if (this->actor.params >= 0) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
if (thisx->bgCheckFlags & 1) {
|
||||
thisx->bgCheckFlags &= ~1;
|
||||
if (thisx->bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
thisx->bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
thisx->velocity.y = 6.0f;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue