Link CScriptBallTrigger

This commit is contained in:
Luke Street 2022-11-04 23:20:01 -04:00
parent 30c893ce35
commit e567be363a
3 changed files with 4 additions and 3 deletions

View File

@ -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",

View File

@ -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\

View File

@ -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;