Skip to content

Commit

Permalink
Fix playerchat firing for owner messages instead of only on owner (#1717
Browse files Browse the repository at this point in the history
)
  • Loading branch information
thegrb93 authored Apr 19, 2024
1 parent 79a4b3d commit 5d524e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/starfall/libs_sh/hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ else
-- @param boolean isdead Whether the message was send from a dead player
-- @return boolean Return true to hide the message. Can only be done for the owner of the chip
add("OnPlayerChat", "playerchat", function(instance, ply, text, teamChat, isDead)
if ply~=LocalPlayer() then return false end
if instance.player~=LocalPlayer() then return false end
return true, {instance.WrapObject(ply), text, teamChat, isDead}
end, function(instance, ret)
if ret[1] and instance.player == LocalPlayer() and ret[2] then return true end
Expand Down

0 comments on commit 5d524e3

Please sign in to comment.