mirror of https://github.com/PrimeDecomp/prime.git
Improve CPlayerState::Get/SetScanTime
This commit is contained in:
parent
9faedfc547
commit
8c3bb41887
|
@ -372,18 +372,12 @@ void CPlayerState::InitializeScanTimes() {
|
||||||
|
|
||||||
float CPlayerState::GetScanTime(CAssetId res) const {
|
float CPlayerState::GetScanTime(CAssetId res) const {
|
||||||
rstl::vector< rstl::pair< CAssetId, float > >::const_iterator it = rstl::find_by_key(x170_scanTimes, res);
|
rstl::vector< rstl::pair< CAssetId, float > >::const_iterator it = rstl::find_by_key(x170_scanTimes, res);
|
||||||
|
|
||||||
if (it != x170_scanTimes.end())
|
|
||||||
return 0.f;
|
|
||||||
|
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayerState::SetScanTime(CAssetId res, float time) {
|
void CPlayerState::SetScanTime(CAssetId res, float time) {
|
||||||
rstl::vector< rstl::pair< CAssetId, float > >::iterator it = rstl::find_by_key_nc(x170_scanTimes, res);
|
rstl::vector< rstl::pair< CAssetId, float > >::iterator it = rstl::find_by_key_nc(x170_scanTimes, res);
|
||||||
|
it->second = time;
|
||||||
if (it != x170_scanTimes.end())
|
|
||||||
it->second = time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayerState::UpdateStaticInterference(CStateManager& stateMgr, const float& dt) {
|
void CPlayerState::UpdateStaticInterference(CStateManager& stateMgr, const float& dt) {
|
||||||
|
|
Loading…
Reference in New Issue