Răsfoiți Sursa

[fixed] Corrected counting and array access issues with the deletion GoSub function in music_onlinemusic. After deleting old songs, the game was not properly counting the number of uploadable songs.

Dank 8 luni în urmă
părinte
comite
f405a91814
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      locations/music_onlinemusic.qsrc

+ 3 - 1
locations/music_onlinemusic.qsrc

@@ -236,7 +236,7 @@ if $ARGS[0] = 'deleting':
 	j = -1
 	
 	:deletemusic
-		if (ml_onlinesong_uploaded = 1) or (ml_onlinesong_uploaded = 0 and ml_onlinesong_skilllevel > ml_threshold_skilllevel):
+		if (ml_onlinesong_uploaded[i] = 1) or (ml_onlinesong_uploaded[i] = 0 and ml_onlinesong_skilllevel[i] > ml_threshold_skilllevel):
 			j += 1
 			ml_tempsong_freshness[j] = ml_onlinesong_freshness[i]
 			ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
@@ -258,6 +258,7 @@ if $ARGS[0] = 'deleting':
 	killvar 'i'
 
 	ml_onlinesongcount = 0
+	ml_uploadablemusic = 0
 
 	if j >= 0:
 		:looprebuildsongs
@@ -266,6 +267,7 @@ if $ARGS[0] = 'deleting':
 			ml_onlinesong_lastcalcday[ml_onlinesongcount] = ml_tempsong_lastcalcday[ml_onlinesongcount]
 			ml_onlinesong_skilllevel[ml_onlinesongcount] = ml_tempsong_skilllevel[ml_onlinesongcount]
 			ml_onlinesong_uploaded[ml_onlinesongcount] = ml_tempsong_uploaded[ml_onlinesongcount]
+			if (ml_onlinesong_uploaded[ml_onlinesongcount] = 0): ml_uploadablemusic += 1
 			ml_onlinesongcount += 1
 		if ml_onlinesongcount <= j: jump 'looprebuildsongs'
 	end