Skip to content
Snippets Groups Projects
Commit 95306c5b authored by dg's avatar dg
Browse files

fix silent blade

git-svn-id: http://svn.net-core.org/repos/t-engine4@1530 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1b40dd4a
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ function _M:attackTarget(target, damtype, mult, noenergy)
mult = (mult or 1) * (target.dominatedDamMult or 1)
end
local dont_break_stealth = false
local break_stealth = false
if not self:attr("disarmed") then
-- All weapons in main hands
if self:getInven(self.INVEN_MAINHAND) then
......@@ -100,7 +100,7 @@ function _M:attackTarget(target, damtype, mult, noenergy)
hit = hit or h
if hit and not sound then sound = o.combat.sound
elseif not hit and not sound_miss then sound_miss = o.combat.sound_miss end
if o.combat.no_stealth_break then dont_break_stealth = true end
if not o.combat.no_stealth_break then break_stealth = true end
end
end
end
......@@ -121,7 +121,7 @@ function _M:attackTarget(target, damtype, mult, noenergy)
hit = hit or h
if hit and not sound then sound = o.combat.sound
elseif not hit and not sound_miss then sound_miss = o.combat.sound_miss end
if o.combat.no_stealth_break then dont_break_stealth = true end
if not o.combat.no_stealth_break then break_stealth = true end
end
end
end
......@@ -135,7 +135,7 @@ function _M:attackTarget(target, damtype, mult, noenergy)
hit = hit or h
if hit and not sound then sound = self.combat.sound
elseif not hit and not sound_miss then sound_miss = self.combat.sound_miss end
if self.combat.no_stealth_break then dont_break_stealth = true end
if not self.combat.no_stealth_break then break_stealth = true end
end
-- Mount attack ?
......@@ -160,7 +160,7 @@ function _M:attackTarget(target, damtype, mult, noenergy)
end
-- Cancel stealth!
if not dont_break_stealth then self:breakStealth() end
if break_stealth then self:breakStealth() end
return hit
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment