Skip to content

Commit

Permalink
Terrible, ugly, hackish fix that I hate horribly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Putnam3145 committed Jun 20, 2014
1 parent 9488194 commit 70aaf64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/lua/fantastic/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ hiddenEventInfo.UNIT_SPAWNED.func=function()
local lowestUnitToCheck = info.prevNumUnits-1>-1 and info.prevNumUnits-1 or 0
if curNumUnits>info.prevNumUnits then
for i=curNumUnits-1,info.prevNumUnits-1,-1 do
onUnitSpawned(df.global.world.units.all[i].id)
if i>-1 then
onUnitSpawned(df.global.world.units.all[i].id)
end
end
info.prevNumUnits=curNumUnits
end
Expand Down

0 comments on commit 70aaf64

Please sign in to comment.