mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-01 00:50:15 -04:00
fix for global variables of type short
This commit is contained in:
parent
a7102c143f
commit
3bd228f71b
@ -20,6 +20,14 @@ void Global::load(ESMReader &esm)
|
|||||||
|
|
||||||
// Note: Both floats and longs are represented as floats.
|
// Note: Both floats and longs are represented as floats.
|
||||||
esm.getHNT(mValue, "FLTV");
|
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)
|
void Global::save(ESMWriter &esm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user