diff --git a/lua/autorun/server/pointsaving_mapstats.lua b/lua/autorun/server/pointsaving_mapstats.lua
index e4fbc14..fa0d7c0 100644
--- a/lua/autorun/server/pointsaving_mapstats.lua
+++ b/lua/autorun/server/pointsaving_mapstats.lua
@@ -57,9 +57,9 @@ end
local function postStatistics(mapParams, timesPlayed, freqMult, zombiePercentCalcMap)
PrintMessage(HUD_PRINTTALK,"This map has been played "..timesPlayed.." times with humans winning "..(mapParams.TimesWon).." times.("..(math.Round((mapParams.TimesWon/timesPlayed)*100)).."%)")
- PrintMessage(HUD_PRINTTALK,"Zombies were only playing for "..math.Round(zombiePercentCalcMap * 100).."% of the time.")
- PrintMessage(HUD_PRINTTALK,"frequency multiplier for this map is: "..freqMult..". play maps infrequently for a higher value!")
- PrintMessage(HUD_PRINTTALK,"Special boost for this map is:"..(mapParams.Boost)..". tell an admin if you think it should be changed!")
+ PrintMessage(HUD_PRINTTALK,"Zombies were playing this map for "..math.Round(zombiePercentCalcMap * 100).."% of the time.")
+ PrintMessage(HUD_PRINTTALK,"frequency multiplier for this map is "..freqMult..". play maps infrequently for a higher value!")
+ PrintMessage(HUD_PRINTTALK,"Special boost for this map is "..(mapParams.Boost)..". tell an admin if you think it should be changed!")
PrintMessage(HUD_PRINTTALK,"Map jackpot is now "..(mapParams.Jackpot)..".")
end
@@ -80,9 +80,9 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
timer.Simple(0, function()
print("point bonus hook")
- local zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter) or .01
+ local zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter)
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
if zombiePercentCalcMap <= .5 then
@@ -112,7 +112,7 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
-- Again, as the counter changed
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
if timesPlayed < settings.MinimumRounds then