Parcourir la source

[added] lastpain var to track last pain received

Lusticon il y a 7 mois
Parent
commit
0094028516
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      locations/pain.qsrc

+ 4 - 1
locations/pain.qsrc

@@ -100,8 +100,11 @@ else
     curpain = (pain[1] * pain[2] * pain[3]) /10
     prevpain = pain[$painPart]
 
-    pain[$painPart] = func( 'shortgs','modul',prevpain,curpain)
+    !! lastpain var can be used elsewhere, do not kill it
+    $lastpain = $painPart
+    lastpain = func( 'shortgs','modul',prevpain,curpain)
 
+    pain[$painPart] = lastpain
     if pain[$painPart] > 100: pain[$painPart] = 100
 
     killvar 'prevpain'