1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 06:45:35 +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) .getCreatureStats(ptr)
.getDynamic(mIndex) .getDynamic(mIndex)
.getCurrent(); .getCurrent();
// GetMagicka shouldn't return negative values
if(mIndex == 1 && value < 0)
value = 0;
} }
runtime.push (value); runtime.push (value);
} }