Skip to content

Commit

Permalink
fix: Fix event propagation (fixes points boost)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinFunk committed Mar 2, 2018
1 parent c7fafc6 commit 809611c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lua/ps2/server/sv_playerextension.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ local Player = FindMetaTable( "Player" )
function Player:PS2_AddStandardPoints( points, message, small, suppressEvent )
if points == 0 then return end

local shouldSupress = points < 0
if suppressEvent == false then
shouldSupress = false
if suppressEvent == nil then
suppressEvent = points < 0
end
if not shouldSupress then

if not suppressEvent then
hook.Run( "PS2_PointsAwarded", self, points, "points" )
end
end

if Pointshop2.StandardPointsBatch:isInProgress( ) then
Pointshop2.StandardPointsBatch:addPoints( self, points )
Expand Down

0 comments on commit 809611c

Please sign in to comment.