Skip to content

Commit

Permalink
Fix wreckage not taking damage (FAForever#3807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas authored Apr 24, 2022
1 parent 1e312c2 commit 23bb5f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lua/wreckage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ Wreckage = Class(Prop) {
-- # Set state

self.IsWreckage = true
self.CanTakeDamage = true
end,

OnDamage = function(self, instigator, amount, vector, damageType)
if not self.CanTakeDamage then
return
if self.CanTakeDamage then
self.DoTakeDamage(self, instigator, amount, vector, damageType)
end

self.DoTakeDamage(self, instigator, amount, vector, damageType)
end,

DoTakeDamage = function(self, instigator, amount, vector, damageType)
Expand Down

0 comments on commit 23bb5f4

Please sign in to comment.