1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 19:15:41 +00:00

Don't return negative values from GetMagicka

This commit is contained in:
Evil Eye 2021-02-07 11:58:23 +01:00
parent e4cd89643f
commit f1caeea444

View file

@ -187,6 +187,9 @@ namespace MWScript
.getCreatureStats(ptr)
.getDynamic(mIndex)
.getCurrent();
// GetMagicka shouldn't return negative values
if(mIndex == 1 && value < 0)
value = 0;
}
runtime.push (value);
}