Skip to content

Commit

Permalink
Verify player is in vehicle before adding player to vehicle (#3173)
Browse files Browse the repository at this point in the history
* Verify player is in vehicle before adding player to vehicle

* Fix bug persisting when using a simulated use action
  • Loading branch information
Denneisk authored Nov 9, 2024
1 parent 1a635b3 commit 2c98046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_pod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ end
function Wire_Pod_EnterVehicle(ply, vehicle)
for _, v in ipairs(pods) do
local pod = v:GetPod()
if pod and pod == vehicle then
if pod == vehicle and ply:GetVehicle() == pod then
v:PlayerEntered(ply)
end
end
Expand Down

0 comments on commit 2c98046

Please sign in to comment.