From b37e3db802945d95f7a67a7b648fc151349bbe45 Mon Sep 17 00:00:00 2001 From: rylieb <31797144+rylieb@users.noreply.github.com> Date: Tue, 2 Nov 2021 18:29:20 -0600 Subject: Rename yDistTo variables (#286) * Change yDistTo to yDirDistTo. * Run format.sh. * Apply suggestions from code review Fix comments in header file. * Added "Surface" to yDirDistToWater. * Update names in sellnuts and skb. * Actually fix skb * Rename yDirDistToWaterSurface to depthInWater. * Rename yDirDistToPlayer to playerHeightRel. * Apply suggestions from code review Fix capitalization in header file comments. Co-authored-by: Anghelo Carvajal * Fix Jenkins (Obj_Aqua). * Fix Jenkins (Obj_Etcetera). * Fix Jenkins (En_Thiefbird). * Fix misformatted files in current master. * Fix Jenkins and run format.sh. * Fix misformatted file in current master (z_debug). * Update PR to include new actors. * Update PR to include elforg, po_sisters, wf. * update actorfixer.py with variable name changes. Co-authored-by: Anghelo Carvajal --- src/code/z_en_item00.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/code') diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index acae2e0ce..7d4c050d4 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -480,10 +480,10 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { return; } - if (!((sp38 != 0) && (this->actor.xzDistToPlayer <= 60.0f) && (this->actor.yDistToPlayer >= -100.0f) && - (this->actor.yDistToPlayer <= 100.0f)) && - !((sp38 == 0) && (this->actor.xzDistToPlayer <= 30.0f) && (this->actor.yDistToPlayer >= -50.0f) && - (this->actor.yDistToPlayer <= 50.0f))) { + if (!((sp38 != 0) && (this->actor.xzDistToPlayer <= 60.0f) && (this->actor.playerHeightRel >= -100.0f) && + (this->actor.playerHeightRel <= 100.0f)) && + !((sp38 == 0) && (this->actor.xzDistToPlayer <= 30.0f) && (this->actor.playerHeightRel >= -50.0f) && + (this->actor.playerHeightRel <= 50.0f))) { if (!Actor_HasParent(&this->actor, globalCtx)) { return; } -- cgit v1.2.3