- 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
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);
}
//===========================================================================