From 9cb433b5644ec37d4503b31db7efffdee590c662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 19 May 2024 17:35:20 +0300 Subject: [PATCH 1/3] Fix transitioning doors having the wrong rotation --- gamemode/sv_transition.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gamemode/sv_transition.lua b/gamemode/sv_transition.lua index 4e832cf7..a3eebf21 100644 --- a/gamemode/sv_transition.lua +++ b/gamemode/sv_transition.lua @@ -810,7 +810,9 @@ function GM:CreateTransitionObjects() end ent:SetPos(data.Pos) - ent:SetAngles(data.Ang) + if data.Type ~= ENT_TYPE_DOOR then + ent:SetAngles(data.Ang) + end ent:SetVelocity(data.Vel) if data.Mdl ~= nil then ent:SetModel(data.Mdl) From e184abb8445168c191eeb8e5ae96a7e7124be0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 19 May 2024 17:36:07 +0300 Subject: [PATCH 2/3] Update changelog.md --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 368702d4..80b1e083 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,5 @@ 0.9.23 (in development) +- Fixed: Transitioning doors have sometimes the wrong rotation. 0.9.22 - Improved: Weapon selection weights, this should improve selecting the next weapon when current one is empty. From b96c670a982e9a9f7d269dd57a8f9e269511e644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 19 May 2024 17:40:56 +0300 Subject: [PATCH 3/3] Remove debug code in tranitioning system --- gamemode/sv_transition.lua | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gamemode/sv_transition.lua b/gamemode/sv_transition.lua index a3eebf21..4529885c 100644 --- a/gamemode/sv_transition.lua +++ b/gamemode/sv_transition.lua @@ -744,8 +744,6 @@ function GM:CreateTransitionObjects() DbgPrint("Creating " .. tostring(objCount) .. " transition Objects...") local entityTransitionData = {} - ignoreKeyIndex = -1 -- ignoreKeyIndex + 1 - DbgPrint("IgnoreKeyIndex: " .. ignoreKeyIndex) for _, data in pairs(objects) do if data.Ignored == true then continue end -- NOTE/FIXME: Observed different results on linux @@ -773,7 +771,6 @@ function GM:CreateTransitionObjects() ent.SourceMap = data.SourceMap ent.ShouldDispatchSpawn = dispatchSpawn -- Do key values first because we might override a few things with setters. - local keyIndex = 0 for k, v in pairs(data.KeyValues) do if KEYVALUE_BLACKLIST[k] == true then continue end v = tostring(v) @@ -786,15 +783,9 @@ function GM:CreateTransitionObjects() ent:SetKeyValue(k, v) GAMEMODE:EntityKeyValue(ent, k, v) else - if keyIndex == ignoreKeyIndex then - DbgPrint("IGNORED KEY: " .. k) - else - ent:SetKeyValue(k, v) - GAMEMODE:EntityKeyValue(ent, k, v) - end + ent:SetKeyValue(k, v) + GAMEMODE:EntityKeyValue(ent, k, v) end - - keyIndex = keyIndex + 1 end for k, v in pairs(data.EntityOutputs or {}) do @@ -816,7 +807,6 @@ function GM:CreateTransitionObjects() ent:SetVelocity(data.Vel) if data.Mdl ~= nil then ent:SetModel(data.Mdl) - DbgPrint(data.Mdl) end ent:SetName(data.Name) @@ -924,5 +914,4 @@ function GM:CreateTransitionObjects() end end - if ignoreKeyIndex ~= -1 then ignoreKeyIndex = ignoreKeyIndex + 1 end end \ No newline at end of file