mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-14 11:54:39 +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
|
@ -278,18 +278,18 @@ void EnAObj_BoulderFragment(EnAObj* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.shape.rot.x += this->dyna.actor.world.rot.x >> 1;
|
||||
this->dyna.actor.shape.rot.z += this->dyna.actor.world.rot.z >> 1;
|
||||
|
||||
if (this->dyna.actor.speedXZ != 0.0f && this->dyna.actor.bgCheckFlags & 0x8) {
|
||||
if (this->dyna.actor.speedXZ != 0.0f && this->dyna.actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->dyna.actor.world.rot.y =
|
||||
this->dyna.actor.wallYaw - this->dyna.actor.world.rot.y + this->dyna.actor.wallYaw - 0x8000;
|
||||
if (1) {}
|
||||
this->dyna.actor.bgCheckFlags &= ~0x8;
|
||||
this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
|
||||
}
|
||||
|
||||
if (this->dyna.actor.bgCheckFlags & 0x2) {
|
||||
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (this->dyna.actor.velocity.y < -8.0f) {
|
||||
this->dyna.actor.velocity.y *= -0.6f;
|
||||
this->dyna.actor.speedXZ *= 0.6f;
|
||||
this->dyna.actor.bgCheckFlags &= ~0x3;
|
||||
this->dyna.actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
|
||||
} else {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue