瀏覽代碼

[added] lastpain var to track last pain received

Lusticon 7 月之前
父節點
當前提交
0094028516
共有 1 個文件被更改,包括 4 次插入1 次删除
  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'