1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

fix for global variables of type short

This commit is contained in:
Marc Zinnschlag 2013-02-28 11:50:29 +01:00
parent a7102c143f
commit 3bd228f71b

View file

@ -20,6 +20,14 @@ void Global::load(ESMReader &esm)
// Note: Both floats and longs are represented as floats.
esm.getHNT(mValue, "FLTV");
if (mType==VT_Short)
{
if (mValue!=mValue)
mValue = 0; // nan
else
mValue = static_cast<short> (mValue);
}
}
void Global::save(ESMWriter &esm)