mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 23:45:32 +00:00
Fixes #417: Apply weather instantly when teleporting
Corrected constant name. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
faf8011c48
commit
c65f018760
1 changed files with 3 additions and 3 deletions
|
@ -2247,12 +2247,12 @@ namespace MWWorld
|
|||
|
||||
void World::updateWeather(float duration)
|
||||
{
|
||||
static const float TELEPORTATION_STEP_THRESHOLD = 256.f;
|
||||
static const float teleportationStepTreshold = 256.f;
|
||||
static ESM::Position lastPlayerPos;
|
||||
ESM::Position currentPos = mPlayer->getPlayer().getRefData().getPosition();
|
||||
|
||||
if (fabs(fabs(lastPlayerPos.pos[0]) - fabs(currentPos.pos[0])) >= TELEPORTATION_STEP_THRESHOLD
|
||||
|| fabs(fabs(lastPlayerPos.pos[1]) - fabs(currentPos.pos[1])) >= TELEPORTATION_STEP_THRESHOLD)
|
||||
if (fabs(fabs(lastPlayerPos.pos[0]) - fabs(currentPos.pos[0])) >= teleportationStepTreshold
|
||||
|| fabs(fabs(lastPlayerPos.pos[1]) - fabs(currentPos.pos[1])) >= teleportationStepTreshold)
|
||||
{
|
||||
lastPlayerPos = currentPos;
|
||||
mWeatherManager->switchToNextWeather(true);
|
||||
|
|
Loading…
Reference in a new issue