diff --git a/configure.py b/configure.py index e1b0ca97..fcebb5e9 100755 --- a/configure.py +++ b/configure.py @@ -238,7 +238,7 @@ LIBS = [ "MetroidPrime/CBoneTracking", ["MetroidPrime/Player/CFaceplateDecoration", False], "MetroidPrime/BodyState/CBSCover", - ["MetroidPrime/ScriptObjects/CScriptBallTrigger", False], + ["MetroidPrime/ScriptObjects/CScriptBallTrigger", True], "MetroidPrime/Weapons/CPlasmaProjectile", "MetroidPrime/Player/CPlayerOrbit", "MetroidPrime/CGameCollision", diff --git a/obj_files.mk b/obj_files.mk index a43bf4eb..953953a0 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -203,7 +203,7 @@ METROIDPRIME :=\ $(BUILD_DIR)/asm/MetroidPrime/CBoneTracking.o\ $(BUILD_DIR)/asm/MetroidPrime/Player/CFaceplateDecoration.o\ $(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSCover.o\ - $(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptBallTrigger.o\ + $(BUILD_DIR)/src/MetroidPrime/ScriptObjects/CScriptBallTrigger.o\ $(BUILD_DIR)/asm/MetroidPrime/Weapons/CPlasmaProjectile.o\ $(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\ $(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\ diff --git a/src/MetroidPrime/ScriptObjects/CScriptBallTrigger.cpp b/src/MetroidPrime/ScriptObjects/CScriptBallTrigger.cpp index c5a70c43..0505eaa3 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptBallTrigger.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptBallTrigger.cpp @@ -65,7 +65,8 @@ void CScriptBallTrigger::Think(float dt, CStateManager& mgr) { x168_24_canApplyForce = true; } else { const CVector3f offset = radiusPosDif.AsNormalized(); - float angleCos = cosf(x154_minAngle * 0.01745329f); + // TODO: why doesn't Deg2Rad match? + float angleCos = cosf(x154_minAngle * (1.f * (M_PIF / 180.f))); if (angleCos < CVector3f::Dot(-offset, x15c_forceAngle) && distance < x158_maxDistance) { float a = x150_force * (x158_maxDistance / (distance * distance)); float b = 1.f / dt * distance;