Przeglądaj źródła

[added] lastpain var to track last pain received

Lusticon 7 miesięcy temu
rodzic
commit
0094028516
1 zmienionych plików z 4 dodań i 1 usunięć
  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'