Check for NaN in JobDriver_CleanSelfWithBucket

This commit is contained in:
amevarashi 2022-07-26 18:56:23 +05:00
parent 900c3a758e
commit dfdc60888f
1 changed files with 5 additions and 3 deletions

View File

@ -55,8 +55,10 @@ namespace RJWSexperience // Used in Menstruation with this namespace
} }
else else
{ {
progress = 0; progress = 0f;
severitycache = hediffcache.Severity; severitycache = hediffcache.Severity;
if (float.IsNaN(severitycache)) //TODO: Figure out WHY NaN is here
severitycache = 0.1f;
} }
} }
@ -73,8 +75,8 @@ namespace RJWSexperience // Used in Menstruation with this namespace
{ {
if (hediffcache != null) if (hediffcache != null)
{ {
float cumamount = hediffcache.Severity * 10; float cumamount = hediffcache.Severity * 10f;
hediffcache.Severity = 0; hediffcache.Severity = 0f;
Bucket.AddCum(cumamount); Bucket.AddCum(cumamount);
} }
CleaningInit(); CleaningInit();