|
|
@ -80,7 +80,7 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
|
|
|
|
if PointSaving_shouldIgnoreMap(game.GetMap()) then return end
|
|
|
|
if PointSaving_shouldIgnoreMap(game.GetMap()) then return end
|
|
|
|
|
|
|
|
|
|
|
|
timer.Simple(0, function()
|
|
|
|
timer.Simple(0, function()
|
|
|
|
print("point bonus hook")
|
|
|
|
--print("point bonus hook")
|
|
|
|
local zombiePercentCalcMap = 1
|
|
|
|
local zombiePercentCalcMap = 1
|
|
|
|
if totalIntervalCounter > 0 then
|
|
|
|
if totalIntervalCounter > 0 then
|
|
|
|
zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter)
|
|
|
|
zombiePercentCalcMap = (zombieIntervalCounter / totalIntervalCounter)
|
|
|
@ -149,8 +149,8 @@ hook.Add("PostEndRound", "pointsave_givedapoints", function(winner)
|
|
|
|
local pointsToGivePly
|
|
|
|
local pointsToGivePly
|
|
|
|
local points = math.Round(ply:GetSavedPoints())
|
|
|
|
local points = math.Round(ply:GetSavedPoints())
|
|
|
|
local gainedPoints = points - (ply.PointSaving_StartPoints or 0)
|
|
|
|
local gainedPoints = points - (ply.PointSaving_StartPoints or 0)
|
|
|
|
print("GAINED: "..gainedPoints)
|
|
|
|
--print("GAINED: "..gainedPoints)
|
|
|
|
if gainedPoints < 0 then gainedPoints = 0 end
|
|
|
|
if gainedPoints < 0 or not ply.PointSaving_StartPoints then gainedPoints = 0 end
|
|
|
|
-- Calculate points to give for each player (Depending on if the round was lost or won)
|
|
|
|
-- Calculate points to give for each player (Depending on if the round was lost or won)
|
|
|
|
if ply:Team() == TEAM_HUMAN then
|
|
|
|
if ply:Team() == TEAM_HUMAN then
|
|
|
|
points = math.Round(ply:GetPoints())
|
|
|
|
points = math.Round(ply:GetPoints())
|
|
|
|