From aa03609b69406c0742a0c7ff174272df2584d931 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 12 Aug 2013 21:00:23 +0200 Subject: [PATCH] - added IF_TOSSED inventory flag. --- src/g_shared/a_pickups.h | 2 ++ src/p_enemy.cpp | 1 + src/thingdef/thingdef_data.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index 6c68990d1..22d1e009f 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -134,6 +134,8 @@ enum IF_RESTRICTABSOLUTELY = 1<<19, // RestrictedTo and ForbiddenTo do not allow pickup in any form by other classes IF_NEVERRESPAWN = 1<<20, // Never, ever respawns IF_NOSCREENFLASH = 1<<21, // No pickup flash on the player's screen + IF_TOSSED = 1<<22, // Was spawned by P_DropItem (i.e. as a monster drop) + }; diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 5df2b4b5e..437940d03 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -3088,6 +3088,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int { AInventory * inv = static_cast(mo); ModifyDropAmount(inv, dropamount); + inv->ItemFlags |= IF_TOSSED; if (inv->SpecialDropAction (source)) { // The special action indicates that the item should not spawn diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 1f1c6ec00..57dd363c8 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -308,6 +308,7 @@ static FFlagDef InventoryFlags[] = DEFINE_FLAG(IF, RESTRICTABSOLUTELY, AInventory, ItemFlags), DEFINE_FLAG(IF, NEVERRESPAWN, AInventory, ItemFlags), DEFINE_FLAG(IF, NOSCREENFLASH, AInventory, ItemFlags), + DEFINE_FLAG(IF, TOSSED, AInventory, ItemFlags), DEFINE_DEPRECATED_FLAG(PICKUPFLASH), DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),};