HaodongMo / ARC-9

The nineth weapon base for Gmod by Arctic
90 stars 51 forks source link

VisualRecoil calculation inconsistency #238

Closed senspooky closed 4 months ago

senspooky commented 5 months ago

VisualRecoilSide is multiplied by a SWEP's RecoilSide, but VisualRecoilUp is not multiplied by the equivalent RecoilUp.

https://github.com/HaodongMo/ARC-9/blob/0f78cd9e6568b2fc1f2fdaf4d94547610ef8c7f9/lua/weapons/arc9_base/sh_recoil.lua#L319-L330

My thoughts on the matter are that the RecoilSide multiplier should be removed, as it obfuscates recoil behaviour that should be customizable.

        local up = self:GetProcessedValue("VisualRecoilUp") * mult

        if self:GetProcessedValue("RecoilLookupTable", true) then
            -- blah blah blah
        end

        local side = self:GetProcessedValue("VisualRecoilSide") * mult
        local roll = self:GetProcessedValue("VisualRecoilRoll") * mult
        local punch = self:GetProcessedValue("VisualRecoilPunch") * mult

If a user wants to retain this functionality, they can implement it in VisualRecoilDoingFunc. This could also be applied to VisualRecoilRoll.