Fix of backstab not being disabled

This commit is contained in:
Filipão 2025-01-06 16:13:23 -03:00 committed by GitHub
parent abd78c010f
commit 2ab3c11778
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,9 +45,11 @@ function SWEP:MeleeAttack(bypass, bash2)
if tr.Entity:IsPlayer() or tr.Entity:IsNPC() or tr.Entity:IsNextBot() then
self:SetLungeEntity(tr.Entity)
local dot = owner:EyeAngles():Forward():Dot(tr.Entity:EyeAngles():Forward())
if self:GetProcessedValue("Backstab") then
local dot = owner:EyeAngles():Forward():Dot(tr.Entity:EyeAngles():Forward())
backstab = dot > 0
backstab = dot > 0
end
end
end
@ -254,4 +256,4 @@ function SWEP:ThinkMelee()
if self:GetInMeleeAttack() and self:GetLastMeleeTime() + prebash <= CurTime() then
self:MeleeAttackShoot(self:GetBash2(), false)
end
end
end