mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Added Inventory UNCLEARABLE flag.
- Allows prevention of ClearInventory without stopping it from being dropped.
This commit is contained in:
parent
5e9001e7bc
commit
695eced81a
3 changed files with 3 additions and 2 deletions
|
@ -336,7 +336,7 @@ extend class Actor
|
||||||
while (last.inv != NULL)
|
while (last.inv != NULL)
|
||||||
{
|
{
|
||||||
let inv = last.inv;
|
let inv = last.inv;
|
||||||
if (!inv.bUndroppable)
|
if (!inv.bUndroppable && !inv.bUnclearable)
|
||||||
{
|
{
|
||||||
inv.DepleteOrDestroy();
|
inv.DepleteOrDestroy();
|
||||||
if (!inv.bDestroyed) last = inv; // was only depleted so advance the pointer manually.
|
if (!inv.bDestroyed) last = inv; // was only depleted so advance the pointer manually.
|
||||||
|
|
|
@ -64,6 +64,7 @@ class Inventory : Actor
|
||||||
flagdef IsArmor: ItemFlags, 21;
|
flagdef IsArmor: ItemFlags, 21;
|
||||||
flagdef IsHealth: ItemFlags, 22;
|
flagdef IsHealth: ItemFlags, 22;
|
||||||
flagdef AlwaysPickup: ItemFlags, 23;
|
flagdef AlwaysPickup: ItemFlags, 23;
|
||||||
|
flagdef Unclearable: ItemFlags, 24;
|
||||||
|
|
||||||
flagdef ForceRespawnInSurvival: none, 0;
|
flagdef ForceRespawnInSurvival: none, 0;
|
||||||
flagdef PickupFlash: none, 6;
|
flagdef PickupFlash: none, 6;
|
||||||
|
|
|
@ -2042,7 +2042,7 @@ class PlayerPawn : Actor
|
||||||
if (item.bINVBAR && item.Amount > item.InterHubAmount)
|
if (item.bINVBAR && item.Amount > item.InterHubAmount)
|
||||||
{
|
{
|
||||||
item.Amount = item.InterHubAmount;
|
item.Amount = item.InterHubAmount;
|
||||||
if (level.REMOVEITEMS && !item.bUNDROPPABLE)
|
if (level.REMOVEITEMS && !item.bUNDROPPABLE && !item.bUNCLEARABLE)
|
||||||
{
|
{
|
||||||
todelete.Push(item);
|
todelete.Push(item);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue