mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 19:15:41 +00:00
Raise a warning when entering non-existent region
This commit is contained in:
parent
e2c896e4ce
commit
47ff6a87a3
2 changed files with 8 additions and 1 deletions
|
@ -77,6 +77,7 @@
|
||||||
Bug #6343: Magic projectile speed doesn't take race weight into account
|
Bug #6343: Magic projectile speed doesn't take race weight into account
|
||||||
Bug #6347: PlaceItem/PlaceItemCell/PlaceAt should work with levelled creatures
|
Bug #6347: PlaceItem/PlaceItemCell/PlaceAt should work with levelled creatures
|
||||||
Bug #6354: SFX abruptly cut off after crossing max distance; implement soft fading of sound effects
|
Bug #6354: SFX abruptly cut off after crossing max distance; implement soft fading of sound effects
|
||||||
|
Bug #6358: Changeweather command does not report an error when entering non-existent region
|
||||||
Bug #6363: Some scripts in Morrowland fail to work
|
Bug #6363: Some scripts in Morrowland fail to work
|
||||||
Bug #6376: Creatures should be able to use torches
|
Bug #6376: Creatures should be able to use torches
|
||||||
Bug #6386: Artifacts in water reflection due to imprecise screen-space coordinate computation
|
Bug #6386: Artifacts in water reflection due to imprecise screen-space coordinate computation
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "interpretercontext.hpp"
|
#include "interpretercontext.hpp"
|
||||||
|
|
||||||
namespace MWScript
|
namespace MWScript
|
||||||
|
@ -91,7 +93,11 @@ namespace MWScript
|
||||||
Interpreter::Type_Integer id = runtime[0].mInteger;
|
Interpreter::Type_Integer id = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->changeWeather(region, id);
|
const ESM::Region* reg = MWBase::Environment::get().getWorld()->getStore().get<ESM::Region>().search(region);
|
||||||
|
if (reg)
|
||||||
|
MWBase::Environment::get().getWorld()->changeWeather(region, id);
|
||||||
|
else
|
||||||
|
runtime.getContext().report("Warning: Region \"" + region + "\" was not found");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue