From 61d75b7caebfbb395b4a5de5fd684f5a4754872d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 26 Mar 2010 08:38:57 +0000 Subject: [PATCH] - fixed: Handling of empty pickup messages was wrong. The old metadata code made a distinction between an empty string and no string. To restore the original behavior the default initialization of the pickup message is now done in the DECORATE definition of Inventory. SVN r2244 (scripting) --- src/g_shared/a_pickups.cpp | 4 +--- wadsrc/static/actors/shared/inventory.txt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index b64eaafea..8d895bb68 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -1005,9 +1005,7 @@ void AInventory::DoPickupSpecial (AActor *toucher) const char *AInventory::PickupMessage () { - FString message = GetClass()->PickupMessage; - - return message.IsNotEmpty() ? message : "You got a pickup"; + return GetClass()->PickupMessage; } //=========================================================================== diff --git a/wadsrc/static/actors/shared/inventory.txt b/wadsrc/static/actors/shared/inventory.txt index 6aa43a55f..c527db26b 100644 --- a/wadsrc/static/actors/shared/inventory.txt +++ b/wadsrc/static/actors/shared/inventory.txt @@ -5,6 +5,7 @@ ACTOR Inventory native Inventory.InterHubAmount 1 Inventory.UseSound "misc/invuse" Inventory.PickupSound "misc/i_pkup" + Inventory.PickupMessage "You got a pickup." action native A_JumpIfNoAmmo(state label); action native A_CustomPunch(int damage, bool norandom = false, bool useammo = true, class pufftype = "BulletPuff", float range = 0);