- Fixed: Item tossing did not work anymore.

SVN r1502 (trunk)
This commit is contained in:
Christoph Oelckers 2009-03-24 07:51:15 +00:00
parent e4da63e9f3
commit 218fc5018e
3 changed files with 21 additions and 14 deletions

View file

@ -1,4 +1,7 @@
March 23, 2009 (Changes by Graf Zahl)
March 24, 2009 (Changes by Graf Zahl)
- Fixed: Item tossing did not work anymore.
March 23, 2009 (Changes by Graf Zahl)
- Changed: Making the gameinfo customizable by MAPINFO requires different
checks for map specific border flats.

View file

@ -507,6 +507,7 @@ add_executable( zdoom WIN32
nodebuild_extract.cpp
nodebuild_gl.cpp
nodebuild_utility.cpp
p_3dfloors.cpp
p_3dmidtex.cpp
p_acs.cpp
p_buildmap.cpp

View file

@ -2507,8 +2507,14 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int
}
}
mo = Spawn (type, source->x, source->y, spawnz, ALLOW_REPLACE);
if (mo != NULL)
{
mo->flags |= MF_DROPPED;
mo->flags &= ~MF_NOGRAVITY; // [RH] Make sure it is affected by gravity
if (!(i_compatflags & COMPATF_NOTOSSDROPS))
{
P_TossItem (mo);
}
if (mo->IsKindOf (RUNTIME_CLASS(AInventory)))
{
AInventory * inv = static_cast<AInventory *>(mo);
@ -2519,12 +2525,9 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int
}
return inv;
}
if (!(i_compatflags & COMPATF_NOTOSSDROPS))
{
P_TossItem (mo);
}
// we can't really return an AInventory pointer to a non-inventory item here, can we?
}
}
return NULL;
}