mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-16 16:20:53 +00:00
Do not scale duration when timescale is zero
This commit is contained in:
parent
573e64e9c9
commit
d3bdf912a4
@ -290,7 +290,9 @@ namespace MWMechanics
|
||||
void MechanicsManager::advanceTime (float duration)
|
||||
{
|
||||
// Uses ingame time, but scaled to real time
|
||||
duration /= MWBase::Environment::get().getWorld()->getTimeScaleFactor();
|
||||
const float timeScaleFactor = MWBase::Environment::get().getWorld()->getTimeScaleFactor();
|
||||
if (timeScaleFactor != 0.0f)
|
||||
duration /= timeScaleFactor;
|
||||
MWWorld::Ptr player = getPlayer();
|
||||
player.getClass().getInventoryStore(player).rechargeItems(duration);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user