mirror of https://github.com/PrimeDecomp/prime.git
Link CScriptBallTrigger
This commit is contained in:
parent
30c893ce35
commit
e567be363a
|
@ -238,7 +238,7 @@ LIBS = [
|
||||||
"MetroidPrime/CBoneTracking",
|
"MetroidPrime/CBoneTracking",
|
||||||
["MetroidPrime/Player/CFaceplateDecoration", False],
|
["MetroidPrime/Player/CFaceplateDecoration", False],
|
||||||
"MetroidPrime/BodyState/CBSCover",
|
"MetroidPrime/BodyState/CBSCover",
|
||||||
["MetroidPrime/ScriptObjects/CScriptBallTrigger", False],
|
["MetroidPrime/ScriptObjects/CScriptBallTrigger", True],
|
||||||
"MetroidPrime/Weapons/CPlasmaProjectile",
|
"MetroidPrime/Weapons/CPlasmaProjectile",
|
||||||
"MetroidPrime/Player/CPlayerOrbit",
|
"MetroidPrime/Player/CPlayerOrbit",
|
||||||
"MetroidPrime/CGameCollision",
|
"MetroidPrime/CGameCollision",
|
||||||
|
|
|
@ -203,7 +203,7 @@ METROIDPRIME :=\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CBoneTracking.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CBoneTracking.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CFaceplateDecoration.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Player/CFaceplateDecoration.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSCover.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/Weapons/CPlasmaProjectile.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\
|
||||||
|
|
|
@ -65,7 +65,8 @@ void CScriptBallTrigger::Think(float dt, CStateManager& mgr) {
|
||||||
x168_24_canApplyForce = true;
|
x168_24_canApplyForce = true;
|
||||||
} else {
|
} else {
|
||||||
const CVector3f offset = radiusPosDif.AsNormalized();
|
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) {
|
if (angleCos < CVector3f::Dot(-offset, x15c_forceAngle) && distance < x158_maxDistance) {
|
||||||
float a = x150_force * (x158_maxDistance / (distance * distance));
|
float a = x150_force * (x158_maxDistance / (distance * distance));
|
||||||
float b = 1.f / dt * distance;
|
float b = 1.f / dt * distance;
|
||||||
|
|
Loading…
Reference in New Issue