1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +00:00

Fix RaycastFloor flags (#1328)

* fix raycast floor flags

* format.sh

* Name flags

* Rename RaycastFloor functions, clean up caller code, document z_bg_spot15_rrbox

* change comment to prevent format wrap

* change to "if BGCHECK_GROUND_CHECK_ON is set"

* roman suggestions
This commit is contained in:
mzxrules 2022-08-30 11:49:51 -04:00 committed by GitHub
parent fe8d5988b9
commit 327a813b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 497 additions and 451 deletions

View file

@ -189,13 +189,13 @@ void func_80B967C0(ObjLift* this) {
void func_80B96840(ObjLift* this, PlayState* play) {
s32 pad;
s32 bgId;
Vec3f sp2C;
Vec3f pos;
Actor_MoveForward(&this->dyna.actor);
Math_Vec3f_Copy(&sp2C, &this->dyna.actor.prevPos);
sp2C.y += sMaxFallDistances[(this->dyna.actor.params >> 1) & 1];
Math_Vec3f_Copy(&pos, &this->dyna.actor.prevPos);
pos.y += sMaxFallDistances[(this->dyna.actor.params >> 1) & 1];
this->dyna.actor.floorHeight =
BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &sp2C);
BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &pos);
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >=
(sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) {