mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-04-07 11:26:34 +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,6 +378,7 @@ function PLAYER:CalcView(view)
|
||||||
|
|
||||||
local fov = GetConVar("Beatrun_FOV"):GetInt()
|
local fov = GetConVar("Beatrun_FOV"):GetInt()
|
||||||
|
|
||||||
|
if IsValid(LocalPlayer():GetActiveWeapon()) then
|
||||||
if lframeswepclass != LocalPlayer():GetActiveWeapon():GetClass() then
|
if lframeswepclass != LocalPlayer():GetActiveWeapon():GetClass() then
|
||||||
-- SP clientside weapon swap detection
|
-- SP clientside weapon swap detection
|
||||||
FOVModifierBlock = true
|
FOVModifierBlock = true
|
||||||
|
@ -390,8 +391,11 @@ function PLAYER:CalcView(view)
|
||||||
fixfovmult = 1
|
fixfovmult = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
view.fov = GetConVar("Beatrun_FOV"):GetInt() * mult * fixfovmult
|
view.fov = fov * mult * fixfovmult
|
||||||
lframeswepclass = LocalPlayer():GetActiveWeapon():GetClass()
|
lframeswepclass = LocalPlayer():GetActiveWeapon():GetClass()
|
||||||
|
else
|
||||||
|
view.fov = fov * mult
|
||||||
|
end
|
||||||
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…
Add table
Reference in a new issue