Skip to content

Commit

Permalink
Fix transitioning alyx, its a hack but it works
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Jun 2, 2024
1 parent 0268603 commit 8c2559a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 11 additions & 1 deletion gamemode/sh_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,17 @@ if SERVER then
["OnNewGame"] = true,
["OnGetValue"] = true,
["OnHitMax"] = true,
["OnHitMin"] = true
["OnHitMin"] = true,
["PlayerOff"] = true,
["PlayerOn"] = true,
["OnCompanionEnteredVehicle"] = true,
["OnCompanionExitedVehicle"] = true,
["OnHostileEnteredVehicle"] = true,
["OnHostileExitedVehicle"] = true,
["PressedAttack"] = true,
["PressedAttack2"] = true,
["AttackAxis"] = true,
["Attack2Axis"] = true,
}

function util.IsOutputValue(key)
Expand Down
7 changes: 6 additions & 1 deletion gamemode/sv_transition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,12 @@ function GM:CreateTransitionObjects()
if data.Parent then
local parent = self.CreatedTransitionObjects[data.Parent]
if IsValid(parent) then
ent:SetParent(parent)
-- FIXME: This is way too generic to be safe.
if ent:IsNPC() and parent:IsVehicle() and parent:GetClass() == "prop_vehicle_jeeep" then
ent:Fire("EnterVehicleImmediately", parent:GetName(), 0)
else
ent:SetParent(parent)
end
-- FIX: Make sure we assign the seat to the vehicle.
if ent:GetNWBool("IsPassengerSeat", false) == true then parent:SetNWEntity("PassengerSeat", ent) end
end
Expand Down

0 comments on commit 8c2559a

Please sign in to comment.