Ver Fonte

[added] floor for song freshness to stop <0 value

Dank há 11 meses atrás
pai
commit
09ee011f32
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      locations/cikl.qsrc

+ 2 - 0
locations/cikl.qsrc

@@ -1197,6 +1197,8 @@ if ml_onlinesongcount > 0:
 			if ml_tempsong_uploaded = 1 and (daystart ! ml_tempsong_dayuploaded[j]) and ((daystart - ml_tempsong_dayuploaded[j]) mod(7)) = 0:
             	gs 'fame', 'city', 'music', rand(0, ml_tempsong_freshness[j]/100)
             	ml_tempsong_freshness[j] -= 10
+				!! freshness < 0 shouldn not break anything, but at least for the sake of a clean display it should not go negative
+				if ml_tempsong_freshness[j] < 0: ml_tempsong_freshness[j] = 0
 
 			end
 		end