mirror of https://github.com/AxioDL/metaforce.git
CPlayer: Resolve unused variable warnings
This commit is contained in:
parent
f7ce3f2133
commit
ec79a9de89
|
@ -2376,7 +2376,11 @@ bool CPlayer::SetAreaPlayerHint(const CScriptPlayerHint& hint, CStateManager& mg
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::AddToPlayerHintRemoveList(TUniqueId id, CStateManager& mgr) {
|
void CPlayer::AddToPlayerHintRemoveList(TUniqueId id, CStateManager& mgr) {
|
||||||
if (const TCastToConstPtr<CScriptPlayerHint> hint = mgr.ObjectById(id)) {
|
const TCastToConstPtr<CScriptPlayerHint> hint = mgr.ObjectById(id);
|
||||||
|
if (!hint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const TUniqueId existId : x93c_playerHintsToRemove) {
|
for (const TUniqueId existId : x93c_playerHintsToRemove) {
|
||||||
if (id == existId) {
|
if (id == existId) {
|
||||||
return;
|
return;
|
||||||
|
@ -2386,11 +2390,14 @@ void CPlayer::AddToPlayerHintRemoveList(TUniqueId id, CStateManager& mgr) {
|
||||||
if (x93c_playerHintsToRemove.size() != 32) {
|
if (x93c_playerHintsToRemove.size() != 32) {
|
||||||
x93c_playerHintsToRemove.push_back(id);
|
x93c_playerHintsToRemove.push_back(id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::AddToPlayerHintAddList(TUniqueId id, CStateManager& mgr) {
|
void CPlayer::AddToPlayerHintAddList(TUniqueId id, CStateManager& mgr) {
|
||||||
if (const TCastToConstPtr<CScriptPlayerHint> hint = mgr.ObjectById(id)) {
|
const TCastToConstPtr<CScriptPlayerHint> hint = mgr.ObjectById(id);
|
||||||
|
if (!hint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const TUniqueId existId : x980_playerHintsToAdd) {
|
for (const TUniqueId existId : x980_playerHintsToAdd) {
|
||||||
if (id == existId) {
|
if (id == existId) {
|
||||||
return;
|
return;
|
||||||
|
@ -2400,11 +2407,14 @@ void CPlayer::AddToPlayerHintAddList(TUniqueId id, CStateManager& mgr) {
|
||||||
if (x980_playerHintsToAdd.size() != 32) {
|
if (x980_playerHintsToAdd.size() != 32) {
|
||||||
x980_playerHintsToAdd.push_back(id);
|
x980_playerHintsToAdd.push_back(id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::DeactivatePlayerHint(TUniqueId id, CStateManager& mgr) {
|
void CPlayer::DeactivatePlayerHint(TUniqueId id, CStateManager& mgr) {
|
||||||
if (TCastToPtr<CScriptPlayerHint> hint = mgr.ObjectById(id)) {
|
const TCastToPtr<CScriptPlayerHint> hint = mgr.ObjectById(id);
|
||||||
|
if (!hint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const TUniqueId existId : x93c_playerHintsToRemove) {
|
for (const TUniqueId existId : x93c_playerHintsToRemove) {
|
||||||
if (id == existId) {
|
if (id == existId) {
|
||||||
return;
|
return;
|
||||||
|
@ -2416,7 +2426,6 @@ void CPlayer::DeactivatePlayerHint(TUniqueId id, CStateManager& mgr) {
|
||||||
hint->ClearObjectList();
|
hint->ClearObjectList();
|
||||||
hint->SetDeactivated();
|
hint->SetDeactivated();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::UpdatePlayerHints(CStateManager& mgr) {
|
void CPlayer::UpdatePlayerHints(CStateManager& mgr) {
|
||||||
|
@ -3233,7 +3242,9 @@ void CPlayer::UpdateGunTransform(const zeus::CVector3f& gunPos, CStateManager& m
|
||||||
|
|
||||||
void CPlayer::UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr) {
|
void CPlayer::UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr) {
|
||||||
zeus::CTransform assistXf = xf;
|
zeus::CTransform assistXf = xf;
|
||||||
if (TCastToConstPtr<CActor> target = mgr.GetObjectById(x3f4_aimTarget)) {
|
const TCastToConstPtr<CActor> target = mgr.GetObjectById(x3f4_aimTarget);
|
||||||
|
|
||||||
|
if (target) {
|
||||||
zeus::CVector3f gunToTarget = x480_assistedTargetAim - xf.origin;
|
zeus::CVector3f gunToTarget = x480_assistedTargetAim - xf.origin;
|
||||||
zeus::CVector3f gunToTargetFlat = gunToTarget;
|
zeus::CVector3f gunToTargetFlat = gunToTarget;
|
||||||
gunToTargetFlat.z() = 0.f;
|
gunToTargetFlat.z() = 0.f;
|
||||||
|
@ -4646,7 +4657,7 @@ void CPlayer::UpdateOrbitInput(const CFinalInput& input, CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EPlayerOrbitState::OrbitObject:
|
case EPlayerOrbitState::OrbitObject:
|
||||||
if (const TCastToConstPtr<CScriptGrapplePoint> point = mgr.GetObjectById(x310_orbitTargetId)) {
|
if (TCastToConstPtr<CScriptGrapplePoint>(mgr.GetObjectById(x310_orbitTargetId))) {
|
||||||
if (ValidateCurrentOrbitTargetId(mgr) == EOrbitValidationResult::OK) {
|
if (ValidateCurrentOrbitTargetId(mgr) == EOrbitValidationResult::OK) {
|
||||||
UpdateOrbitPosition(g_tweakPlayer->GetOrbitNormalDistance(int(x308_orbitType)), mgr);
|
UpdateOrbitPosition(g_tweakPlayer->GetOrbitNormalDistance(int(x308_orbitType)), mgr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4729,7 +4740,7 @@ void CPlayer::UpdateOrbitInput(const CFinalInput& input, CStateManager& mgr) {
|
||||||
case EPlayerOrbitState::NoOrbit:
|
case EPlayerOrbitState::NoOrbit:
|
||||||
break;
|
break;
|
||||||
case EPlayerOrbitState::OrbitObject:
|
case EPlayerOrbitState::OrbitObject:
|
||||||
if (TCastToConstPtr<CScriptGrapplePoint> point = mgr.GetObjectById(x310_orbitTargetId)) {
|
if (TCastToConstPtr<CScriptGrapplePoint>(mgr.GetObjectById(x310_orbitTargetId))) {
|
||||||
BreakGrapple(EPlayerOrbitRequest::Default, mgr);
|
BreakGrapple(EPlayerOrbitRequest::Default, mgr);
|
||||||
} else {
|
} else {
|
||||||
SetOrbitRequest(EPlayerOrbitRequest::StopOrbit, mgr);
|
SetOrbitRequest(EPlayerOrbitRequest::StopOrbit, mgr);
|
||||||
|
|
Loading…
Reference in New Issue