Skip to content

Commit

Permalink
Remove widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogpod committed Aug 2, 2020
1 parent 684cd5b commit 946e5e9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 98 deletions.
96 changes: 0 additions & 96 deletions lua/autorun/optimize.lua

This file was deleted.

7 changes: 6 additions & 1 deletion lua/gamemode/terrortown/gamemode/scoring_shd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ local _IsValid = IsValid
-- Server and client both need this for scoring event logs

-- 2^16 bytes - 4 (header) - 2 (UInt length in TTT_ReportStream) - 1 (terminanting byte)
(SERVER and SCORE or CLSCORE).MaxStreamLength = 65529
if SERVER then
SCORE.MaxStreamLength = 65529
else
CLSCORE.MaxStreamLength = 65529
end


function ScoreInit()
return {
Expand Down
10 changes: 10 additions & 0 deletions lua/gamemode/terrortown/gamemode/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ if CLIENT then
_G.ScreenScale = memoize(_ScreenScale)
end

local _hook_Add = hook.Add
local _MsgN = MsgN
local _hook_Remove = hook.Remove
_hook_Add( "PreGamemodeLoaded", "DeleteWidgets", function()
function widgets.PlayerTick()
end
_hook_Remove( "PlayerTick", "TickWidgets" )
end )


_include("util.lua")
_include("lang_shd.lua") -- uses some of util
_include("equip_items_shd.lua")
Expand Down
2 changes: 1 addition & 1 deletion lua/gamemode/terrortown/gamemode/weaponry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ end

-- Note that this is called both when a player spawns and when a round starts
function GM:PlayerLoadout( ply )
if _IsValid(ply) and (not ply:IsSpec()) then
if _IsValid(ply) and (not ply:IsSpec()) and ply:Alive() then
-- clear out equipment flags
ply:ResetEquipment()

Expand Down

0 comments on commit 946e5e9

Please sign in to comment.