Skip to content

Commit

Permalink
fix(proximity): fix players removing themselves as targets
Browse files Browse the repository at this point in the history
  • Loading branch information
AvarianKnight authored Feb 13, 2022
2 parents 1cc44ad + d73f9a9 commit f41aae2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/init/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AddEventHandler('onClientResourceStart', function(resource)

-- Some people modify pma-voice and mess up the resource Kvp, which means that if someone
-- joins another server that has pma-voice, it will error out, this will catch and fix the kvp.
local success = pcall(function()
local success = pcall(function()
local micClicksKvp = GetResourceKvpString('pma-voice_enableMicClicks')
if not micClicksKvp then
SetResourceKvp('pma-voice_enableMicClicks', tostring(true))
Expand Down Expand Up @@ -39,4 +39,4 @@ AddEventHandler('onClientResourceStart', function(resource)
setCallChannel(LocalPlayer.state.callChannel)
end
print('Script initialization finished.')
end)
end)
2 changes: 0 additions & 2 deletions client/init/proximity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ function addNearbyPlayers()
local ply = players[i]
local serverId = GetPlayerServerId(ply)

if serverId == playerServerId then goto skip_loop end

if addProximityCheck(ply) then
if isTarget then goto skip_loop end

Expand Down

0 comments on commit f41aae2

Please sign in to comment.