C_BG_MIN_HEIGHT, C_BG_MAX_HEIGHT

This commit is contained in:
LagoLunatic
2025-03-06 20:41:37 -05:00
parent 0e508ad721
commit 49c69eeb0f
46 changed files with 147 additions and 140 deletions
+5 -5
View File
@@ -625,8 +625,8 @@ static u8 ground_4_check(bk_class* i_this, int r18, s16 r20, f32 f29) {
sp8 += i_this->current.pos;
gndChk.SetPos(&sp8);
sp8.y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (sp8.y == -1e9f) {
sp8.y = 1e9f;
if (sp8.y == C_BG_MIN_HEIGHT) {
sp8.y = C_BG_MAX_HEIGHT;
}
if (i_this->dr.mAcch.GetGroundH() - sp8.y > 200.0f) {
r19 |= check_bit[i];
@@ -3225,14 +3225,14 @@ static BOOL daBk_Execute(bk_class* i_this) {
sp28.y += 50.0f - i_this->dr.m44C.y;
gndChk.SetPos(&sp28);
sp28.y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (sp28.y != -1e9f) {
if (sp28.y != C_BG_MIN_HEIGHT) {
Vec temp;
temp.x = sp28.x;
temp.y = 50.0f + sp28.y;
temp.z = sp28.z + f31;
gndChk.SetPos(&temp);
f32 f1 = dComIfG_Bgsp()->GroundCross(&gndChk);
if (f1 != -1e9f) {
if (f1 != C_BG_MIN_HEIGHT) {
r21 = (s16)-cM_atan2s(f1 - sp28.y, temp.z - sp28.z);
if (r21 > 0x2000 || r21 < -0x2000) {
r21 = 0;
@@ -3243,7 +3243,7 @@ static BOOL daBk_Execute(bk_class* i_this) {
temp.z = sp28.z;
gndChk.SetPos(&temp);
f1 = dComIfG_Bgsp()->GroundCross(&gndChk);
if (f1 != -1e9f) {
if (f1 != C_BG_MIN_HEIGHT) {
r23 = (s16)cM_atan2s(f1 - sp28.y, temp.x - sp28.x);
if (r23 > 0x2000 || r23 < -0x2000) {
r23 = 0;