by _mental_ » Sat Jan 05, 2019 5:03 am
Cooke is right, the problem is in rewritten loops.
To fix this particular issue it's enough to replace
Actor invp = self; with
Actor invp = item.Owner; here.
Item's owner in needed because we are trying to remove it from normal player pawn, not morphed one, and this breaks inventory linked list.
Without this,
for loop does nothing, and the inventory list is cut after the removed item.
Cooke is right, the problem is in rewritten loops.
To fix this particular issue it's enough to replace [b]Actor invp = self;[/b] with [b]Actor invp = item.Owner;[/b] [url=https://github.com/coelckers/gzdoom/blob/a0ad4ea1935406863c12e220606ab349fc809423/wadsrc/static/zscript/actor_inventory.txt#L118]here[/url].
Item's owner in needed because we are trying to remove it from normal player pawn, not morphed one, and this breaks inventory linked list.
Without this, [b]for[/b] loop does nothing, and the inventory list is cut after the removed item.