Skip to content

Commit

Permalink
Make unbuilt structures and experimentals not spawn a wreck (#5947)
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 authored Mar 14, 2024
1 parent 4f83466 commit 56ca6d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,9 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent) {
if overkillRatio and overkillRatio > 1.0 then
return
end
if self:GetFractionComplete() < 0.5 then
local bp = self.Blueprint
local fractionComplete = self:GetFractionComplete()
if fractionComplete < 0.5 or (bp.TechCategory == 'EXPERIMENTAL' or bp.CategoriesHash["STRUCTURE"] and fractionComplete < 1) then
return
end
return self:CreateWreckageProp(overkillRatio)
Expand Down

0 comments on commit 56ca6d6

Please sign in to comment.