- fixed: Items spawned internally by ADehackedPickup::TryPickup must not count towards item statistics.

SVN r2204 (trunk)
This commit is contained in:
Christoph Oelckers 2010-03-07 11:13:57 +00:00
parent 88269d5d60
commit 593a050778

View file

@ -2894,6 +2894,12 @@ bool ADehackedPickup::TryPickup (AActor *&toucher)
RealPickup = static_cast<AInventory *>(Spawn (type, x, y, z, NO_REPLACE)); RealPickup = static_cast<AInventory *>(Spawn (type, x, y, z, NO_REPLACE));
if (RealPickup != NULL) if (RealPickup != NULL)
{ {
// The internally spawned item should never count towards statistics.
if (RealPickup->flags & MF_COUNTITEM)
{
RealPickup->flags &= ~MF_COUNTITEM;
level.total_items--;
}
if (!(flags & MF_DROPPED)) if (!(flags & MF_DROPPED))
{ {
RealPickup->flags &= ~MF_DROPPED; RealPickup->flags &= ~MF_DROPPED;