mirror of
https://github.com/CapsAdmin/wowozela.git
synced 2025-03-04 03:13:27 -05:00
More cleanup
This commit is contained in:
parent
15141f179e
commit
467cf9ab25
@ -26,7 +26,7 @@ end
|
||||
|
||||
|
||||
if CLIENT then
|
||||
wowozela.Samplers = wowozela.Samplers or {}
|
||||
wowozela.Samplers = {}
|
||||
wowozela.volume = CreateClientConVar("wowozela_volume", "0.5", true, false)
|
||||
wowozela.hudtext = CreateClientConVar("wowozela_hudtext", "1", true, false)
|
||||
wowozela.pitchbar = CreateClientConVar("wowozela_pitchbar", "1", true, false)
|
||||
@ -314,8 +314,6 @@ if CLIENT then -- sample meta
|
||||
META.__index = META
|
||||
|
||||
function META:Initialize(ply)
|
||||
ply.wowozela_sampler = self
|
||||
|
||||
self.Player = NULL
|
||||
|
||||
self.Pitch = 100
|
||||
@ -723,14 +721,13 @@ if CLIENT then -- sample meta
|
||||
|
||||
local sampler = setmetatable({}, wowozela.SamplerMeta)
|
||||
sampler:Initialize(ply)
|
||||
ply.wowozela_sampler = sampler
|
||||
|
||||
wowozela.Samplers[ply:AccountID() or ply:UserID()] = sampler
|
||||
wowozela.Samplers[ply:UserID()] = sampler
|
||||
return sampler
|
||||
end
|
||||
|
||||
function wowozela.GetSampler(ply)
|
||||
return ply.wowozela_sampler
|
||||
return wowozela.Samplers[ply:UserID()]
|
||||
end
|
||||
end
|
||||
|
||||
@ -798,7 +795,7 @@ do -- hooks
|
||||
wowozela.disabled = vol < 0.01
|
||||
|
||||
for _, ply in ipairs(player.GetHumans()) do
|
||||
if not ply.wowozela_sampler then
|
||||
if not wowozela.Samplers[ply:UserID()] then
|
||||
wowozela.CreateSampler(ply)
|
||||
end
|
||||
end
|
||||
|
@ -988,7 +988,7 @@ if CLIENT then
|
||||
surface.SetDrawColor(Color(0, 255, 55, 120))
|
||||
surface.DrawLine(ScrW() - 18, center_y, ScrW(), center_y)
|
||||
draw.TextShadow({
|
||||
text = ("%0.01f"):format(curr_pitch),
|
||||
text = ("%0.1f"):format(curr_pitch),
|
||||
color = Color(255, 255, 255, 255),
|
||||
pos = {ScrW() - 19, center_y},
|
||||
xalign = TEXT_ALIGN_RIGHT,
|
||||
|
Loading…
Reference in New Issue
Block a user