From 48e9ef51332a939479bf3accbdbd3b43d3392059 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 13:23:14 +0100 Subject: [PATCH 1/7] Fix multiple NPC weapons dissolving at once. Replaced our Dissolve function with default GMod one. --- gamemode/sh_entity_extend.lua | 38 ----------------------------------- 1 file changed, 38 deletions(-) diff --git a/gamemode/sh_entity_extend.lua b/gamemode/sh_entity_extend.lua index 67c2d3b3..320e10a5 100644 --- a/gamemode/sh_entity_extend.lua +++ b/gamemode/sh_entity_extend.lua @@ -435,42 +435,4 @@ end function ENTITY_META:DispatchResponse(response) self:Input("DispatchResponse", self, self, response) -end - -ENTITY_DISSOLVE_NORMAL = 0 -ENTITY_DISSOLVE_ELECTRICAL = 1 -ENTITY_DISSOLVE_ELECTRICAL_LIGHT = 2 -ENTITY_DISSOLVE_CORE = 3 - -function ENTITY_META:Dissolve(dissolveType) - if dissolveType == nil then - dissolveType = ENTITY_DISSOLVE_NORMAL - end - - self:SetOwner(NULL) - local name = self:GetName() - - if name == nil or name == "" then - name = "dissolve_" .. tostring(self:EntIndex()) - self:SetName(name) - end - - local dissolver = ents.Create("env_entity_dissolver") - dissolver:SetKeyValue("target", name) - dissolver:SetKeyValue("dissolvetype", tostring(dissolveType)) - -- Ensure all clients receive this. - dissolver:AddEFlags(EFL_FORCE_CHECK_TRANSMIT) - dissolver:Spawn() - dissolver:Activate() - dissolver:Fire("Dissolve", name, 0) - dissolver:Fire("Kill", "", 0.1) - - if self:IsNPC() then - -- Play any appropriate noises when we start to dissolve - if dissolveType == ENTITY_DISSOLVE_ELECTRICAL or dissolveType == ENTITY_DISSOLVE_ELECTRICAL_LIGHT then - self:DispatchResponse("TLK_ELECTROCUTESCREAM") - else - self:DispatchResponse("TLK_DISSOLVESCREAM") - end - end end \ No newline at end of file From 9aeb4c502fec9307ddc1e10f90fd1426a689e806 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 13:24:30 +0100 Subject: [PATCH 2/7] Fix Alyx being stuck behind a clip for way too long on ep1_citadel_03 --- gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua b/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua index 78e50047..1dbe0ad3 100644 --- a/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua +++ b/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua @@ -95,9 +95,9 @@ function MAPSCRIPT:PostInit() monitorSceneTrigger:SetName("trigger_startmonitor_scene_1") monitorSceneTrigger:SetKeyValue("StartDisabled", "1") monitorSceneTrigger:SetKeyValue("teamwait", "1") + monitorSceneTrigger:SetKeyValue("spawnflags", "1") monitorSceneTrigger:Fire("AddOutput", "OnTrigger trigger_door_comb_close,Enable,0.0,-1") monitorSceneTrigger:Fire("AddOutput", "OnTrigger lcs_core_control_scene,Start,0.0,1") - monitorSceneTrigger:Fire("AddOutput", "OnTrigger pclip_door1,Enable,0.0,-1") monitorSceneTrigger.OnTrigger = function(_, activator) local checkpoint = GAMEMODE:CreateCheckpoint(Vector(1224, 11835, 5317)) GAMEMODE:SetPlayerCheckpoint(checkpoint, activator) From defac668f0a09c97dd1e2aeb34ca833fd5c11ba0 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 15:26:55 +0100 Subject: [PATCH 3/7] Remove unused function --- gamemode/sh_entity_extend.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gamemode/sh_entity_extend.lua b/gamemode/sh_entity_extend.lua index 320e10a5..b62ea391 100644 --- a/gamemode/sh_entity_extend.lua +++ b/gamemode/sh_entity_extend.lua @@ -431,8 +431,4 @@ end function ENTITY_META:BlocksLOS() return self:IsEFlagSet(EFL_DONTBLOCKLOS) == false -end - -function ENTITY_META:DispatchResponse(response) - self:Input("DispatchResponse", self, self, response) end \ No newline at end of file From 1e1875d8a004db3fcd38c8496e4499db1df41047 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 15:28:28 +0100 Subject: [PATCH 4/7] Move combine out of control room so that func_brush can have alyx excluded --- .../gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua b/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua index 1dbe0ad3..67c0df4b 100644 --- a/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua +++ b/gamemode/gametypes/hl2ep1/mapscripts/ep1_citadel_03.lua @@ -90,6 +90,16 @@ function MAPSCRIPT:PostInit() GAMEMODE:SetPlayerCheckpoint(checkpoint, activator) end + -- Move this idiot just outside those doors + local roomnpc = ents.FindByPos(Vector(1227, 11883, 5364), "npc_combine_s") + if roomnpc[1] then + roomnpc[1]:SetPos(Vector(1057, 12001, 5351)) + end + + ents.WaitForEntityByName("pclip_door1", function(ent) + ent:SetKeyValue("excludednpc", "npc_alyx") + end) + local monitorSceneTrigger = ents.Create("trigger_once") monitorSceneTrigger:SetupTrigger(Vector(1200, 11676, 5536), Angle(0, 0, 0), Vector(-208, -156, -222), Vector(208, 156, 222)) monitorSceneTrigger:SetName("trigger_startmonitor_scene_1") @@ -98,6 +108,7 @@ function MAPSCRIPT:PostInit() monitorSceneTrigger:SetKeyValue("spawnflags", "1") monitorSceneTrigger:Fire("AddOutput", "OnTrigger trigger_door_comb_close,Enable,0.0,-1") monitorSceneTrigger:Fire("AddOutput", "OnTrigger lcs_core_control_scene,Start,0.0,1") + monitorSceneTrigger:Fire("AddOutput", "OnTrigger pclip_door1,Enable,0.0,-1") monitorSceneTrigger.OnTrigger = function(_, activator) local checkpoint = GAMEMODE:CreateCheckpoint(Vector(1224, 11835, 5317)) GAMEMODE:SetPlayerCheckpoint(checkpoint, activator) From 0f2245dd72d30fe7da1afab6b53df9774413fb80 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 15:28:37 +0100 Subject: [PATCH 5/7] Updated changelog --- changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.md b/changelog.md index 4a733764..e9d3eb8d 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,8 @@ - Improved: Vehicles now temporarily disable collisions when entering a changelevel trigger, remains disabled set by settings. - Added: Setting to disable vehicle collisions. - Fixed: Bad lightning by forcing r_radiosity convar to 4. +- Fixed: Multiple weapons dissolving when an NPC dies. +- Fixed: ep1_citadel_03 disabled clip so Alyx can go through the door sooner. 0.9.29 - Improved: Use new checkpoint structure in mapscripts where possible with better positioning (first 5 chapters). From a5491bf7e9ff63ca876158b3aa1209da170b952d Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 17:28:20 +0100 Subject: [PATCH 6/7] Hopefully fixed all crosshairs and selection of them --- gamemode/cl_hud.lua | 15 ++++++--------- gamemode/huds/hud_lambda_settings.lua | 8 ++++---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/gamemode/cl_hud.lua b/gamemode/cl_hud.lua index 577463de..687462cd 100644 --- a/gamemode/cl_hud.lua +++ b/gamemode/cl_hud.lua @@ -50,7 +50,7 @@ function GM:HUDInit(reloaded) self.HUDRoundInfo = vgui.Create("HUDRoundInfo") end - if lambda_crosshair:GetInt() == 2 and not IsValid(self.HUDQuickInfo) then + if lambda_crosshair:GetInt() == 1 and not IsValid(self.HUDQuickInfo) then self.HUDQuickInfo = vgui.Create("LQuickInfo") end @@ -110,12 +110,9 @@ function GM:HUDShouldDraw(hudName) if hidehud:GetBool() == true then return false end if hudName == "CHudCrosshair" then - if self:ShouldDrawCrosshair() == false then return false end - - if lambda_crosshair:GetInt() >= 1 then - local wep = ply:GetActiveWeapon() - if wep and wep.DoDrawCrosshair == nil then return false end - end + local wep = ply:GetActiveWeapon() + if lambda_crosshair:GetInt() == 2 then return false end + if self:ShouldDrawCrosshair() == false or not wep and wep.DoDrawCrosshair == nil then return false end elseif hudName == "CHudGeiger" then if not ply:IsSuitEquipped() then return false end elseif hudName == "CHudBattery" then @@ -150,10 +147,10 @@ function GM:HUDPaint() local chcVar = lambda_crosshair:GetInt() - if chcVar == 1 and self:ShouldDrawCrosshair() == true then + if chcVar == 2 and self:ShouldDrawCrosshair() == true then if IsValid(self.HUDQuickInfo) then self.HUDQuickInfo:Remove() end hook.Run("DrawDynamicCrosshair") - elseif chcVar == 2 and self:ShouldDrawCrosshair() == true then + elseif chcVar == 1 and self:ShouldDrawCrosshair() == true then if not IsValid(self.HUDQuickInfo) then self.HUDQuickInfo = vgui.Create("LQuickInfo") end diff --git a/gamemode/huds/hud_lambda_settings.lua b/gamemode/huds/hud_lambda_settings.lua index 874a2ea7..5a917ea2 100644 --- a/gamemode/huds/hud_lambda_settings.lua +++ b/gamemode/huds/hud_lambda_settings.lua @@ -45,8 +45,8 @@ function PANEL_CROSSHAIR:Init() local chVar = GetConVar("lambda_crosshair"):GetInt() local chTbl = { [0] = "Garry's Mod Default", - [1] = "Lambda", - [2] = "Half-Life 2" + [1] = "Half-Life 2", + [2] = "Lambda" } local chSelectLbl = self:Add("DLabel") chSelectLbl:SetPos(5, 7) @@ -66,7 +66,7 @@ function PANEL_CROSSHAIR:Init() function chSelect:OnSelect(index, text, data) local a = chSelect:GetParent() - if data == 1 then + if index == 3 then a:HideAll(false) else a:HideAll(true) @@ -201,7 +201,7 @@ function PANEL_CROSSHAIR:Init() chDynamic:SetConVar("lambda_crosshair_dynamic") chDynamic:SetValue(cvars.Number("lambda_crosshair_dynamic")) - if chVar ~= 1 then + if chVar ~= 2 then self:HideAll(true) end end From 15bd6f89cb130cb59910eae9009e8ab11b1dcef9 Mon Sep 17 00:00:00 2001 From: knoxed Date: Sun, 14 Dec 2025 17:29:24 +0100 Subject: [PATCH 7/7] Updated changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index e9d3eb8d..fb087156 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ - Fixed: Bad lightning by forcing r_radiosity convar to 4. - Fixed: Multiple weapons dissolving when an NPC dies. - Fixed: ep1_citadel_03 disabled clip so Alyx can go through the door sooner. +- Fixed: Missing default crosshair and incomplete QuickInfo crosshair. 0.9.29 - Improved: Use new checkpoint structure in mapscripts where possible with better positioning (first 5 chapters).