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:
parent
a7102c143f
commit
3bd228f71b
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue