mirror of https://github.com/AxioDL/metaforce.git
CPlayerState: Rename HealthInfo() to GetHealthInfo()
Allows const overloading to function and prevents compilation errors from occurring if constness changes through future changes of any sort.
This commit is contained in:
parent
fc87bd8022
commit
ef93a601eb
|
@ -182,7 +182,7 @@ u32 CPlayerState::CalculateItemCollectionRate() const {
|
||||||
return total + GetItemCapacity(EItemType::Wavebuster);
|
return total + GetItemCapacity(EItemType::Wavebuster);
|
||||||
}
|
}
|
||||||
|
|
||||||
CHealthInfo& CPlayerState::HealthInfo() { return xc_health; }
|
CHealthInfo& CPlayerState::GetHealthInfo() { return xc_health; }
|
||||||
|
|
||||||
const CHealthInfo& CPlayerState::GetHealthInfo() const { return xc_health; }
|
const CHealthInfo& CPlayerState::GetHealthInfo() const { return xc_health; }
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ public:
|
||||||
static constexpr float GetMissileComboChargeFactor() { return 1.8f; }
|
static constexpr float GetMissileComboChargeFactor() { return 1.8f; }
|
||||||
u32 CalculateItemCollectionRate() const;
|
u32 CalculateItemCollectionRate() const;
|
||||||
|
|
||||||
CHealthInfo& HealthInfo();
|
CHealthInfo& GetHealthInfo();
|
||||||
const CHealthInfo& GetHealthInfo() const;
|
const CHealthInfo& GetHealthInfo() const;
|
||||||
u32 GetPickupTotal() { return 99; }
|
u32 GetPickupTotal() { return 99; }
|
||||||
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
|
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
|
||||||
|
|
|
@ -1049,7 +1049,7 @@ void CPlayer::TakeDamage(bool significant, const zeus::CVector3f& location, floa
|
||||||
|
|
||||||
void CPlayer::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CPlayer::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
CHealthInfo* CPlayer::HealthInfo(CStateManager& mgr) { return &mgr.GetPlayerState()->HealthInfo(); }
|
CHealthInfo* CPlayer::HealthInfo(CStateManager& mgr) { return &mgr.GetPlayerState()->GetHealthInfo(); }
|
||||||
|
|
||||||
bool CPlayer::IsUnderBetaMetroidAttack(const CStateManager& mgr) const {
|
bool CPlayer::IsUnderBetaMetroidAttack(const CStateManager& mgr) const {
|
||||||
if (x274_energyDrain.GetEnergyDrainIntensity() > 0.f) {
|
if (x274_energyDrain.GetEnergyDrainIntensity() > 0.f) {
|
||||||
|
|
Loading…
Reference in New Issue