Browse Source

[fixed] dividing by zero

Lusticon 2 months ago
parent
commit
31a1b06c3a
2 changed files with 3 additions and 3 deletions
  1. 2 2
      locations/Cum_Manage.qsrc
  2. 1 1
      locations/arousal.qsrc

+ 2 - 2
locations/Cum_Manage.qsrc

@@ -1130,7 +1130,7 @@ if $ARGS[0] = 'cum_decay':
 							cumsumvag += sparrvol[idx]
 							!! seeping out
 							if FUNC('Cum_Manage', 'check_innards', 0) = 1 or cumforced/rand(2,3) > sparrvol[idx]:
-								cumamount = min(sparrvol[idx]*3/2, (totminut-cumdectime)/15 * max(rand(1,3), rand(sparrvol[idx]/pcs_vag, vgape*40) - InSleep*rand(2,5) + iif(pcs_horny>50, min(100,pcs_horny)/10 - 4,0)) + cumforced/rand(5,10))
+								cumamount = min(sparrvol[idx]*3/2, (totminut-cumdectime)/15 * max(rand(1,3), rand(sparrvol[idx]/max(1,pcs_vag), vgape*40) - InSleep*rand(2,5) + iif(pcs_horny>50, min(100,pcs_horny)/10 - 4,0)) + cumforced/rand(5,10))
 								sparrvol[idx] -= cumamount & cumsumvag -= cumamount
 								cumvol[0] -= cumamount
 
@@ -1193,7 +1193,7 @@ if $ARGS[0] = 'cum_decay':
 							cumsumass += sparrvol[idx]
 							!! seeping out
 							if FUNC('Cum_Manage', 'check_innards', 3) = 1 or cumforced/rand(2,4) > sparrvol[idx]:
-								cumamount = min(sparrvol[idx]*3/2, (totminut-cumdectime)/15 * max(rand(0,1), rand(sparrvol[idx]/(pcs_ass*3/2), agape*20) - InSleep*rand(4,8)) + cumforced/rand(7,15))
+								cumamount = min(sparrvol[idx]*3/2, (totminut-cumdectime)/15 * max(rand(0,1), rand(sparrvol[idx]/max(1,(pcs_ass*3/2)), agape*20) - InSleep*rand(4,8)) + cumforced/rand(7,15))
 								sparrvol[idx] -= cumamount & cumsumass -= cumamount
 								cumvol[3] -= cumamount
 

+ 1 - 1
locations/arousal.qsrc

@@ -238,7 +238,7 @@ if $ARGS[0] ! 'end' and $ARGS[0] ! 'checks' and $ARGS[0] ! 'count' and $ARGS[0]
 				ltdif += max(1, rand(ltdif/6, ltdif/4)) / max(1,ARGS[5]+1)
 			end
 			!! when skilled, it does not harm PC
-			if ARGS[5] > 0 and ltdif > 0: ltdif /= ARGS[5]+1
+			if ARGS[5] > 0 and ltdif > 0: ltdif /= max(1,ARGS[5]+1)
 			!! if there is any discomfort, check intercourse duration, compensated by skill
 			if stim_time > 1:
 				if grdif > rand(stim_time): grdif += rand(stim_time / (max(1,ARGS[5])*5), stim_time / (max(1,ARGS[5])*3))