mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 09:39:43 +00:00
Merge branch 'infinite_splash' into 'master'
Fail on invalid water levels Closes #6051 See merge request OpenMW/openmw!1034
This commit is contained in:
commit
59c7e9f7c4
2 changed files with 14 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
||||||
Bug #5842: GetDisposition adds temporary disposition change from different actors
|
Bug #5842: GetDisposition adds temporary disposition change from different actors
|
||||||
Bug #6037: Morrowind Content Language Cannot be Set to English in OpenMW Launcher
|
Bug #6037: Morrowind Content Language Cannot be Set to English in OpenMW Launcher
|
||||||
|
Bug #6051: NaN water height in ESM file is not handled gracefully
|
||||||
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
||||||
Bug #6067: esp loader fails in for certain subrecord orders
|
Bug #6067: esp loader fails in for certain subrecord orders
|
||||||
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#include "loadcell.hpp"
|
#include "loadcell.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <limits>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <boost/concept_check.hpp>
|
#include <boost/concept_check.hpp>
|
||||||
|
|
||||||
|
#include <components/debug/debuglog.hpp>
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
#include "esmreader.hpp"
|
#include "esmreader.hpp"
|
||||||
|
@ -109,6 +111,7 @@ namespace ESM
|
||||||
|
|
||||||
void Cell::loadCell(ESMReader &esm, bool saveContext)
|
void Cell::loadCell(ESMReader &esm, bool saveContext)
|
||||||
{
|
{
|
||||||
|
bool overriding = !mName.empty();
|
||||||
bool isLoaded = false;
|
bool isLoaded = false;
|
||||||
mHasAmbi = false;
|
mHasAmbi = false;
|
||||||
while (!isLoaded && esm.hasMoreSubs())
|
while (!isLoaded && esm.hasMoreSubs())
|
||||||
|
@ -123,8 +126,17 @@ namespace ESM
|
||||||
mWaterInt = true;
|
mWaterInt = true;
|
||||||
break;
|
break;
|
||||||
case ESM::FourCC<'W','H','G','T'>::value:
|
case ESM::FourCC<'W','H','G','T'>::value:
|
||||||
esm.getHT(mWater);
|
float waterLevel;
|
||||||
|
esm.getHT(waterLevel);
|
||||||
mWaterInt = false;
|
mWaterInt = false;
|
||||||
|
if(!std::isfinite(waterLevel))
|
||||||
|
{
|
||||||
|
if(!overriding)
|
||||||
|
mWater = std::numeric_limits<float>::max();
|
||||||
|
Log(Debug::Warning) << "Warning: Encountered invalid water level in cell " << mName << " defined in " << esm.getContext().filename;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
mWater = waterLevel;
|
||||||
break;
|
break;
|
||||||
case ESM::FourCC<'A','M','B','I'>::value:
|
case ESM::FourCC<'A','M','B','I'>::value:
|
||||||
esm.getHT(mAmbi);
|
esm.getHT(mAmbi);
|
||||||
|
|
Loading…
Reference in a new issue