Fixes
This commit is contained in:
parent
b32676fbac
commit
c8d2c23048
@ -57,9 +57,9 @@ end
|
|||||||
|
|
||||||
local function postStatistics(mapParams, timesPlayed, freqMult, zombiePercentCalcMap)
|
local function postStatistics(mapParams, timesPlayed, freqMult, zombiePercentCalcMap)
|
||||||
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>This map has been played "..timesPlayed.." times with humans winning "..(mapParams.TimesWon).." times.("..(math.Round((mapParams.TimesWon/timesPlayed)*100)).."%)</c>")
|
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>This map has been played "..timesPlayed.." times with humans winning "..(mapParams.TimesWon).." times.("..(math.Round((mapParams.TimesWon/timesPlayed)*100)).."%)</c>")
|
||||||
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>Zombies were only playing for "..math.Round(zombiePercentCalcMap * 100).."% of the time.</c>")
|
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>Zombies were playing this map for "..math.Round(zombiePercentCalcMap * 100).."% of the time.</c>")
|
||||||
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>frequency multiplier for this map is: "..freqMult..". play maps infrequently for a higher value!</c>")
|
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>frequency multiplier for this map is "..freqMult..". play maps infrequently for a higher value!</c>")
|
||||||
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>Special boost for this map is:"..(mapParams.Boost)..". tell an admin if you think it should be changed!</c>")
|
PrintMessage(HUD_PRINTTALK,"<c=0,255,255>Special boost for this map is "..(mapParams.Boost)..". tell an admin if you think it should be changed!</c>")
|
||||||
PrintMessage(HUD_PRINTTALK,"<c=204,204,0>Map jackpot is now "..(mapParams.Jackpot)..".</c>")
|
PrintMessage(HUD_PRINTTALK,"<c=204,204,0>Map jackpot is now "..(mapParams.Jackpot)..".</c>")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -80,9 +80,9 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
|
|||||||
|
|
||||||
timer.Simple(0, function()
|
timer.Simple(0, function()
|
||||||
print("point bonus hook")
|
print("point bonus hook")
|
||||||
local zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter) or .01
|
local zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter)
|
||||||
local timesPlayed = mapParams.TimesWon + mapParams.TimesLost
|
local timesPlayed = mapParams.TimesWon + mapParams.TimesLost
|
||||||
local freqMult = 1 / math.pow(timesPlayed / 10, 0.2) + 1
|
local freqMult = 1 / math.pow(math.Max(timesPlayed, 10) / 10, 0.2) + 1
|
||||||
|
|
||||||
-- Check if zombies did even play most of the map
|
-- Check if zombies did even play most of the map
|
||||||
if zombiePercentCalcMap <= .5 then
|
if zombiePercentCalcMap <= .5 then
|
||||||
@ -112,7 +112,7 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
|
|||||||
|
|
||||||
-- Again, as the counter changed
|
-- Again, as the counter changed
|
||||||
timesPlayed = mapParams.TimesWon + mapParams.TimesLost
|
timesPlayed = mapParams.TimesWon + mapParams.TimesLost
|
||||||
freqMult = 1 / math.pow(timesPlayed / 10, 0.2) + 1
|
local freqMult = 1 / math.pow(math.Max(timesPlayed, 10) / 10, 0.2) + 1
|
||||||
|
|
||||||
-- Check if map was played enough times
|
-- Check if map was played enough times
|
||||||
if timesPlayed < settings.MinimumRounds then
|
if timesPlayed < settings.MinimumRounds then
|
||||||
|
Loading…
Reference in New Issue
Block a user