mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-15 07:51:21 +00:00
Add missing function to CStaticInterference
This commit is contained in:
parent
8dd023e0e8
commit
81c68de6d0
@ -36,6 +36,16 @@ public:
|
|||||||
}
|
}
|
||||||
m_sources.push_back({id, magnitude, duration});
|
m_sources.push_back({id, magnitude, duration});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RemoveSource(TUniqueId id)
|
||||||
|
{
|
||||||
|
auto iter = std::find_if(m_sources.begin(), m_sources.end(), [&id](const CStaticInterferenceSource& src)->bool{
|
||||||
|
return src.id == id;
|
||||||
|
});
|
||||||
|
if (iter != m_sources.end())
|
||||||
|
m_sources.erase(iter);
|
||||||
|
}
|
||||||
|
|
||||||
void Update(CStateManager&, float dt)
|
void Update(CStateManager&, float dt)
|
||||||
{
|
{
|
||||||
std::vector<CStaticInterferenceSource> newSources;
|
std::vector<CStaticInterferenceSource> newSources;
|
||||||
@ -50,6 +60,7 @@ public:
|
|||||||
}
|
}
|
||||||
m_sources = std::move(newSources);
|
m_sources = std::move(newSources);
|
||||||
}
|
}
|
||||||
|
|
||||||
float GetTotalInterference() const
|
float GetTotalInterference() const
|
||||||
{
|
{
|
||||||
float validAccum = 0.0;
|
float validAccum = 0.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user