Verify player is in vehicle before adding player to vehicle (#3173)

* Verify player is in vehicle before adding player to vehicle

* Fix bug persisting when using a simulated use action
This commit is contained in:
Denneisk 2024-11-09 13:16:34 +00:00 committed by GitHub
parent 1a635b307d
commit 2c98046255
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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