@ -74,6 +74,7 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
print ( " point bonus hook " )
print ( " point bonus hook " )
local zombiePercentCalcMap = ( zombieIntervalCounter / totalIntervalCounter ) or .01
local zombiePercentCalcMap = ( zombieIntervalCounter / totalIntervalCounter ) or .01
local timesPlayed = mapParams.TimesWon + mapParams.TimesLost
local timesPlayed = mapParams.TimesWon + mapParams.TimesLost
local freqMult = 1 / math.pow ( timesPlayed / 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
@ -101,6 +102,10 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
end
end
end
end
-- Again, as the counter changed
timesPlayed = mapParams.TimesWon + mapParams.TimesLost
freqMult = 1 / math.pow ( timesPlayed / 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
PrintMessage ( HUD_PRINTTALK , " Sorry, this map needs to be played at least " .. ( settings.MinimumRounds - timesPlayed ) .. " more times, before you can get points for winning. " )
PrintMessage ( HUD_PRINTTALK , " Sorry, this map needs to be played at least " .. ( settings.MinimumRounds - timesPlayed ) .. " more times, before you can get points for winning. " )
@ -111,7 +116,6 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
end
end
-- Calculate points to give
-- Calculate points to give
local freqMult = 1 / math.pow ( timesPlayed / 10 , 0.2 ) + 1
local pointsToGive
local pointsToGive
if winner == TEAM_HUMAN then
if winner == TEAM_HUMAN then