fix npc aiming bad

This commit is contained in:
littlebabyman 2025-02-24 17:22:42 +02:00
parent afef8a94db
commit 402bf96bda
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ function SWEP:NPC_PrimaryAttack()
self:SetBaseSettings()
self:SetShouldHoldType()
self:DoShootSounds()
self:DoShootSounds(true)
self:DoEffects()
self:DoEject()

View File

@ -87,10 +87,10 @@ local soundtab6 = {
name = "shootdistantindoor"
}
function SWEP:DoShootSounds()
function SWEP:DoShootSounds(npc)
local randomChoice = self.RandomChoice
local pvar = swepGetProcessedValue(self, "ShootPitchVariation", true)
local pvrand = util.SharedRandom("ARC9_sshoot", -pvar, pvar)
local pvrand = npc and math.Rand(-pvar, pvar) or util.SharedRandom("ARC9_sshoot", -pvar, pvar)
local sstr = lsstr
local sslr = lsslr