mirror of
https://github.com/CapsAdmin/wowozela.git
synced 2025-03-04 03:13:27 -05:00
More small optimizations
This commit is contained in:
parent
467cf9ab25
commit
e140d01c4f
@ -364,9 +364,6 @@ if CLIENT then -- sample meta
|
||||
|
||||
function META:GetAngles()
|
||||
local ang = self.Player:GetAimVector():Angle()
|
||||
|
||||
ang.p = math.NormalizeAngle(ang.p)
|
||||
ang.y = math.NormalizeAngle(ang.y)
|
||||
ang.r = 0
|
||||
|
||||
return ang
|
||||
|
@ -129,12 +129,6 @@ if CLIENT then
|
||||
local upsidedown = false
|
||||
local function HandleMouse(cmd, x, y, ang)
|
||||
local ply = LocalPlayer()
|
||||
local wep = ply:GetActiveWeapon()
|
||||
if not wep:IsValid() or wep:GetClass() ~= "wowozela" then
|
||||
DisableUnlimitedPitch(ply)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local m_pitch = GetConVar("m_pitch") and GetConVar("m_pitch"):GetFloat() or 0.022
|
||||
local m_yaw = GetConVar("m_yaw") and GetConVar("m_yaw"):GetFloat() or 0.022
|
||||
@ -998,10 +992,10 @@ if CLIENT then
|
||||
end
|
||||
end
|
||||
|
||||
timer.Create("wowozela_head_turn", 0.1, 0, function()
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
timer.Create("wowozela_head_turn", 0.2, 0, function()
|
||||
for _, ply in ipairs(player.GetHumans()) do
|
||||
local wep = ply:GetActiveWeapon()
|
||||
if not wep:IsValid() or wep:GetClass() ~= "wowozela" then
|
||||
if not IsValid(wep) or wep:GetClass() ~= "wowozela" then
|
||||
DisableUnlimitedPitch(ply)
|
||||
else
|
||||
EnableUnlimitedPitch(ply)
|
||||
|
Loading…
Reference in New Issue
Block a user