Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix d3_citadel_04 elevator #275

Merged
merged 3 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed: Killing mission critical NPCs causes the game end text to show up twice in some cases.
- Fixed: d2_coast_07: Forcefield has a white square when returning from d2_coast_08.
- Fixed: d2_coast_07: Wrong vehicle checkpoint when returning from d2_coast_08.
- Fixed: d3_citadel_04: Added missing checkpoint for the elevator.

0.9.21
- Improved: lambda_gametype will now default to 'auto' and warns about a misconfiguration.
Expand Down
23 changes: 14 additions & 9 deletions gamemode/gametypes/hl2/mapscripts/d3_citadel_04.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ if SERVER then
AddCSLuaFile()
end

local DbgPrint = GetLogging("MapScript")
local MAPSCRIPT = {}
MAPSCRIPT.PlayersLocked = false

Expand All @@ -28,16 +27,22 @@ MAPSCRIPT.GlobalStates = {

function MAPSCRIPT:PostInit()
if SERVER then
DbgPrint("YUP")

ents.WaitForEntityByName("citadel_trigger_elevatorride_up", function(ent)
ent:SetKeyValue("teamwait", "1")
ents.WaitForEntityByName("citadel_trigger_elevatorride_up", function(elevatorTrigger)
elevatorTrigger:SetKeyValue("teamwait", "1")

ents.WaitForEntityByName("citadel_train_lift01_1", function(elevator)
-- Checkpoint on elevator.
local pos = elevator:GetPos()
local checkpoint1 = GAMEMODE:CreateCheckpoint(Vector(262.721558, 803.862915, pos.z + 5), Angle(0, -180, 0))
checkpoint1:SetParent(elevator)

elevatorTrigger.OnTrigger = function(_, activator)
GAMEMODE:SetPlayerCheckpoint(checkpoint1, activator)
end
end)
end)
end
end

function MAPSCRIPT:PostPlayerSpawn(ply)
--DbgPrint("PostPlayerSpawn")
end
end

return MAPSCRIPT