mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
Fix invalid (S)WEP causing issues
This commit is contained in:
parent
5723dbed10
commit
cfdf6fedac
1 changed files with 15 additions and 11 deletions
|
@ -378,20 +378,24 @@ function PLAYER:CalcView(view)
|
||||||
|
|
||||||
local fov = GetConVar("Beatrun_FOV"):GetInt()
|
local fov = GetConVar("Beatrun_FOV"):GetInt()
|
||||||
|
|
||||||
if lframeswepclass != LocalPlayer():GetActiveWeapon():GetClass() then
|
if IsValid(LocalPlayer():GetActiveWeapon()) then
|
||||||
-- SP clientside weapon swap detection
|
if lframeswepclass != LocalPlayer():GetActiveWeapon():GetClass() then
|
||||||
FOVModifierBlock = true
|
-- SP clientside weapon swap detection
|
||||||
timer.Simple(1, function() FOVModifierBlock = false end)
|
FOVModifierBlock = true
|
||||||
end
|
timer.Simple(1, function() FOVModifierBlock = false end)
|
||||||
|
end
|
||||||
|
|
||||||
if !FOVModifierBlock and !LocalPlayer():GetActiveWeapon().ARC9 then
|
if !FOVModifierBlock and !LocalPlayer():GetActiveWeapon().ARC9 then
|
||||||
fixfovmult = view.fov / fov
|
fixfovmult = view.fov / fov
|
||||||
|
else
|
||||||
|
fixfovmult = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
view.fov = fov * mult * fixfovmult
|
||||||
|
lframeswepclass = LocalPlayer():GetActiveWeapon():GetClass()
|
||||||
else
|
else
|
||||||
fixfovmult = 1
|
view.fov = fov * mult
|
||||||
end
|
end
|
||||||
|
|
||||||
view.fov = GetConVar("Beatrun_FOV"):GetInt() * mult * fixfovmult
|
|
||||||
lframeswepclass = LocalPlayer():GetActiveWeapon():GetClass()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.TauntCam:CalcView(view, self.Player, self.Player:IsPlayingTaunt()) then return true end
|
if self.TauntCam:CalcView(view, self.Player, self.Player:IsPlayingTaunt()) then return true end
|
||||||
|
|
Loading…
Reference in a new issue