master
David Vogel 6 years ago
parent 48a85fc6fa
commit bad7b0933d

@ -74,6 +74,7 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
print("point bonus hook")
local zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter) or .01
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
if zombiePercentCalcMap <= .5 then
@ -101,6 +102,10 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
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
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.")
@ -111,7 +116,6 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
end
-- Calculate points to give
local freqMult = 1 / math.pow(timesPlayed / 10, 0.2) + 1
local pointsToGive
if winner == TEAM_HUMAN then

Loading…
Cancel
Save