forked from HaodongMo/ArcCW
Sights won't become unusable while strafing
This commit is contained in:
parent
c0adb7cfee
commit
907cd3c068
@ -74,7 +74,7 @@ function ArcCW:GetProsCons(att, toggle)
|
||||
for i, v in pairs(cons) do cons[i] = ArcCW.TryTranslation(v) end
|
||||
for i, v in pairs(infos) do infos[i] = ArcCW.TryTranslation(v) end
|
||||
|
||||
if !att.AutoStats then return pros, cons, neutrals end
|
||||
if !att.AutoStats then return pros, cons, infos end
|
||||
|
||||
local simple = GetConVar("arccw_attinv_simpleproscons"):GetBool()
|
||||
local dmgboth = false
|
||||
@ -158,5 +158,5 @@ function ArcCW:GetProsCons(att, toggle)
|
||||
end
|
||||
end
|
||||
|
||||
return pros, cons, neutrals
|
||||
return pros, cons, infos
|
||||
end
|
@ -210,7 +210,7 @@ function ArcCW_Regen(full)
|
||||
ArcCW.InvHUD:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
cvars.AddChangeCallback("arccw_dev_cust2beta", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_hud_deadzone_x", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_hud_deadzone_y", function() ArcCW_Regen(true) end)
|
||||
|
@ -164,7 +164,7 @@ function SWEP:CreateCustomize2HUD()
|
||||
|
||||
local col_bad = Color(255, 50, 50, 255)
|
||||
local col_good = Color(100, 255, 100, 255)
|
||||
local col_info = Color(75, 75, 255, 255)
|
||||
local col_info = Color(150, 150, 255, 255)
|
||||
|
||||
ArcCW.Inv_ShownAtt = nil
|
||||
|
||||
@ -216,7 +216,7 @@ function SWEP:CreateCustomize2HUD()
|
||||
ArcCW.Inv_Fade = 0
|
||||
|
||||
ArcCW.InvHUD:SetPos(0, 0)
|
||||
ArcCW.InvHUD:SetSize(scrw, scrh)
|
||||
ArcCW.InvHUD:SetSize(ScrW(), ScrH())
|
||||
ArcCW.InvHUD:Center()
|
||||
ArcCW.InvHUD:SetDraggable(false)
|
||||
ArcCW.InvHUD:SetText("")
|
||||
@ -296,7 +296,7 @@ function SWEP:CreateCustomize2HUD()
|
||||
local closebutton = vgui.Create("DButton", ArcCW.InvHUD)
|
||||
closebutton:SetText("")
|
||||
closebutton:SetPos(scrw - smallbuttonheight - airgap_x, smallgap)
|
||||
closebutton:SetSize(smallbuttonheight * 1, bigbuttonheight)
|
||||
closebutton:SetSize(rss * 24, bigbuttonheight)
|
||||
closebutton.Paint = function(self2, w, h)
|
||||
local col = col_fg
|
||||
|
||||
@ -1032,6 +1032,8 @@ function SWEP:CreateCustomize2HUD()
|
||||
|
||||
if #infos > 0 then
|
||||
pan_infos = vgui.Create("DPanel", scroll_pros)
|
||||
pan_infos.Paint = function()
|
||||
end
|
||||
pan_infos:SetPos(menu3_w * 1 / 3, 0)
|
||||
pan_cons:SetPos(menu3_w * 2 / 3, 0)
|
||||
|
||||
|
@ -48,7 +48,7 @@ function SWEP:Move_Process(EyePos, EyeAng, velocity)
|
||||
local VMPosOffset, VMAngOffset = self.VMPosOffset, self.VMAngOffset
|
||||
local VMPosOffset_Lerp, VMAngOffset_Lerp = self.VMPosOffset_Lerp, self.VMAngOffset_Lerp
|
||||
local FT = (game.SinglePlayer() and FrameTime()) or RealFrameTime()*0.5308
|
||||
local sightedmult = (self:GetState() == ArcCW.STATE_SIGHTS and 0.25) or 1
|
||||
local sightedmult = (self:GetState() == ArcCW.STATE_SIGHTS and 0.1) or 1
|
||||
|
||||
VMPos:Set(EyePos)
|
||||
VMAng:Set(EyeAng)
|
||||
@ -82,7 +82,7 @@ function SWEP:Step_Process(EyePos,EyeAng, velocity)
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local VMPos, VMAng = self.VMPos, self.VMAng
|
||||
local VMPosOffset, VMAngOffset = self.VMPosOffset, self.VMAngOffset
|
||||
local VMPosOffset_Lerp, VMAngOffset_Lerp = self.VMPosOffset_Lerp, self.VMAngOffset_Lerp
|
||||
@ -199,7 +199,7 @@ function SWEP:GetVMPosition(EyePos, EyeAng)
|
||||
self:Step_Process(EyePos, EyeAng, velocity)
|
||||
self:Breath_Process(EyePos, EyeAng)
|
||||
self:Look_Process(EyePos, EyeAng)
|
||||
|
||||
|
||||
self.LastEyeAng = EyeAng
|
||||
self.LastEyePos = EyePos
|
||||
self.LastVelocity = velocity
|
||||
@ -511,7 +511,7 @@ function SWEP:GetViewModelPosition(pos, ang)
|
||||
swayymult = GetConVar("arccw_vm_sway_xmult"):GetFloat() or 1
|
||||
swayzmult = GetConVar("arccw_vm_sway_ymult"):GetFloat() or 1
|
||||
swayspeed = GetConVar("arccw_vm_sway_speedmult"):GetFloat() or 1
|
||||
|
||||
|
||||
lookxmult = GetConVar("arccw_vm_look_xmult"):GetFloat() or 1
|
||||
lookymult = GetConVar("arccw_vm_look_ymult"):GetFloat() or 1
|
||||
local npos, nang = self:GetVMPosition(oldpos, oldang)
|
||||
|
Loading…
Reference in New Issue
Block a user