- fixed: Clearing a pickup message for inventory items was not possible. Changed it so that "You got a pickup" is AInventory's pickup message and not a default returned when nothing valid is set.

SVN r2625 (trunk)
This commit is contained in:
Christoph Oelckers 2010-08-28 19:20:14 +00:00
parent 56cc0569bb
commit eb3340e872
3 changed files with 4 additions and 4 deletions

View file

@ -890,7 +890,7 @@ void AInventory::Touch (AActor *toucher)
{
const char * message = PickupMessage ();
if (toucher->CheckLocalView (consoleplayer)
if (message != NULL && *message != 0 && toucher->CheckLocalView (consoleplayer)
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
{
StaticLastMessageTic = gametic;
@ -960,9 +960,7 @@ void AInventory::DoPickupSpecial (AActor *toucher)
const char *AInventory::PickupMessage ()
{
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
return message != NULL? message : "You got a pickup";
return GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
}
//===========================================================================

View file

@ -5,6 +5,7 @@ ACTOR Inventory native
Inventory.InterHubAmount 1
Inventory.UseSound "misc/invuse"
Inventory.PickupSound "misc/i_pkup"
Inventory.PickupMessage "$TXT_DEFAULTPICKUPMSG"
action native A_JumpIfNoAmmo(state label);
action native A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class<Actor> pufftype = "BulletPuff", float range = 0, float lifesteal = 0);

View file

@ -286,6 +286,7 @@ STSTR_CHOPPERS = "... doesn't suck - GM";
STSTR_CLEV = "Changing Level...\n";
TXT_BUDDHAON = "Buddha mode ON";
TXT_BUDDHAOFF = "Buddha mode OFF";
TXT_DEFAULTPICKUPMSG = "You got a pickup";
E1TEXT =
"Once you beat the big badasses and\n"