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

TargetID: Make ttt_idenfity_body_woconfirm replicated; move and clean up additional ConVars surrounding corpses/ragdolls #1692

Merged
merged 7 commits into from
Dec 9, 2024
Prev Previous commit
Next Next commit
Add changecallback for ttt2_confirm_team as well, and grab its name v…
…ia the ConVar object for consistency with the other globals in the hook
  • Loading branch information
Wryyyong committed Dec 6, 2024
commit b922f5d9034f0bd051ae4353c7a82d2a1d929952
6 changes: 5 additions & 1 deletion gamemodes/terrortown/gamemode/server/sv_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,8 @@ function GM:SyncGlobals()
)
end

SetGlobalBool("ttt2_confirm_team", confirm_team:GetBool())
SetGlobalBool(identify_body_woconfirm:GetName(), identify_body_woconfirm:GetBool())
SetGlobalBool(confirm_team:GetName(), confirm_team:GetBool())

---
-- @realm server
Expand All @@ -525,6 +525,10 @@ cvars.AddChangeCallback(identify_body_woconfirm:GetName(), function(cv, old, new
SetGlobalBool(identify_body_woconfirm:GetName(), tobool(tonumber(new)))
end)

cvars.AddChangeCallback(confirm_team:GetName(), function(cv, old, new)
SetGlobalBool(confirm_team:GetName(), tobool(tonumber(new)))
end)

---
-- This @{function} is used to load the shop equipments
-- @realm server
Expand Down