mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-17 12:33:38 +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:
parent
fe8d5988b9
commit
327a813b37
42 changed files with 497 additions and 451 deletions
|
@ -74,7 +74,7 @@ void EnNwc_ChickNoop(EnNwcChick* chick, EnNwc* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnNwc_ChickBgCheck(EnNwcChick* chick, PlayState* play) {
|
||||
CollisionPoly* outPoly;
|
||||
CollisionPoly* groundPoly;
|
||||
s32 bgId;
|
||||
Vec3f outPos;
|
||||
f32 dy;
|
||||
|
@ -90,7 +90,7 @@ void EnNwc_ChickBgCheck(EnNwcChick* chick, PlayState* play) {
|
|||
//! @bug The use of outPos here is totally wrong. Even if it didn't get overwritten
|
||||
// by the wall check, it should add an offset to the y-value so the raycast
|
||||
// doesn't go through the floor and cause the chicks to ignore all floors.
|
||||
chick->floorY = BgCheck_EntityRaycastFloor3(&play->colCtx, &outPoly, &bgId, &outPos);
|
||||
chick->floorY = BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &bgId, &outPos);
|
||||
dy = chick->floorY - chick->pos.y;
|
||||
if ((0.0f <= dy) && (dy < 40.0f)) {
|
||||
chick->pos.y = chick->floorY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue