mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #211 from lioncash/init
CPlayerEnergyDrain: Initialize x10_energyDrainTime on construction
This commit is contained in:
commit
8badbd3f35
|
@ -138,7 +138,7 @@ private:
|
||||||
std::vector<CToken> x25c_ballTransitionsRes;
|
std::vector<CToken> x25c_ballTransitionsRes;
|
||||||
TUniqueId x26c_attachedActor = kInvalidUniqueId;
|
TUniqueId x26c_attachedActor = kInvalidUniqueId;
|
||||||
float x270_attachedActorTime = 0.f;
|
float x270_attachedActorTime = 0.f;
|
||||||
CPlayerEnergyDrain x274_energyDrain = CPlayerEnergyDrain(4);
|
CPlayerEnergyDrain x274_energyDrain{4};
|
||||||
float x288_startingJumpTimeout = 0.f;
|
float x288_startingJumpTimeout = 0.f;
|
||||||
float x28c_sjTimer = 0.f;
|
float x28c_sjTimer = 0.f;
|
||||||
float x290_minJumpTimeout = 0.f;
|
float x290_minJumpTimeout = 0.f;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
|
|
||||||
CPlayerEnergyDrain::CPlayerEnergyDrain(u32 capacity) { x0_sources.reserve(capacity); }
|
CPlayerEnergyDrain::CPlayerEnergyDrain(u32 numSources) { x0_sources.reserve(numSources); }
|
||||||
|
|
||||||
void CPlayerEnergyDrain::AddEnergyDrainSource(TUniqueId id, float intensity) { x0_sources.emplace_back(id, intensity); }
|
void CPlayerEnergyDrain::AddEnergyDrainSource(TUniqueId id, float intensity) { x0_sources.emplace_back(id, intensity); }
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@ namespace urde {
|
||||||
class CStateManager;
|
class CStateManager;
|
||||||
class CPlayerEnergyDrain {
|
class CPlayerEnergyDrain {
|
||||||
std::vector<CEnergyDrainSource> x0_sources;
|
std::vector<CEnergyDrainSource> x0_sources;
|
||||||
float x10_energyDrainTime;
|
float x10_energyDrainTime = 0.0f;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CPlayerEnergyDrain(u32);
|
explicit CPlayerEnergyDrain(u32 numSources);
|
||||||
const std::vector<CEnergyDrainSource>& GetEnergyDrainSources() const { return x0_sources; }
|
const std::vector<CEnergyDrainSource>& GetEnergyDrainSources() const { return x0_sources; }
|
||||||
void AddEnergyDrainSource(TUniqueId, float);
|
void AddEnergyDrainSource(TUniqueId, float);
|
||||||
void RemoveEnergyDrainSource(TUniqueId id);
|
void RemoveEnergyDrainSource(TUniqueId id);
|
||||||
|
|
Loading…
Reference in New Issue