mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
- Fixed: A_JumpIf(InTarget)Inventory jumped if the check amount was greater
than the item's max amount and the item was maxed. SVN r1783 (trunk)
This commit is contained in:
parent
78902b2009
commit
6c6ce41b7e
2 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
|||
September 1, 2009
|
||||
- Fixed: A_JumpIf(InTarget)Inventory jumped if the check amount was greater
|
||||
than the item's max amount and the item was maxed.
|
||||
- Fixed: Some dmadds wads used zero-length sprites as placeholders. When you
|
||||
ran dmadds to combine it with the IWAD's sprites, they would be replaced by
|
||||
the IWAD's sprites, so when loading such wads, we should ignore those as
|
||||
|
|
|
@ -506,12 +506,19 @@ void DoJumpIfInventory(AActor * owner, DECLARE_PARAMINFO)
|
|||
|
||||
if (!Type || owner == NULL) return;
|
||||
|
||||
AInventory * Item=owner->FindInventory(Type);
|
||||
AInventory *Item = owner->FindInventory(Type);
|
||||
|
||||
if (Item)
|
||||
{
|
||||
if (ItemAmount>0 && Item->Amount>=ItemAmount) ACTION_JUMP(JumpOffset);
|
||||
else if (Item->Amount>=Item->MaxAmount) ACTION_JUMP(JumpOffset);
|
||||
if (ItemAmount > 0)
|
||||
{
|
||||
if (Item->Amount >= ItemAmount)
|
||||
ACTION_JUMP(JumpOffset);
|
||||
}
|
||||
else if (Item->Amount >= Item->MaxAmount)
|
||||
{
|
||||
ACTION_JUMP(JumpOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue