• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Removing items with 0 life is bugged

Status
Not open for further replies.
Level 9
Joined
Jul 20, 2018
Messages
177
If an item has 0 life and then is removed, it is still can be picked with EnumItemsInRect. If the life is not zero, then an item removes properly. This affects both 1.26 and 1.32.9.

But there is a difference if one changes the life of an item to some non-zero value after the item is removed with 0 life:
1.26: item still can be picked with EnumItemsInRect till removed.
1.32.9: item cannot be picked.

Test map.

I suggest such fix to the function in Lua:
Lua:
do
  local RealRemoveItem = RemoveItem
  RemoveItem = function(itm)
    SetWidgetLife(itm, 1.)
    RealRemoveItem(itm)
  end
end

How to make Lua code block?
 

Attachments

  • TestRemoveItemWith0Life.w3x
    8.6 KB · Views: 37
Last edited:
Status
Not open for further replies.
Top