diff --git a/docs/rh-log.txt b/docs/rh-log.txt index c278a4fe36..24a83251cd 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2f9177614..8e6a008a39 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 9a1bb0e19c..44c1a381dd 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2507,23 +2507,26 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int } } mo = Spawn (type, source->x, source->y, spawnz, ALLOW_REPLACE); - mo->flags |= MF_DROPPED; - mo->flags &= ~MF_NOGRAVITY; // [RH] Make sure it is affected by gravity - if (mo->IsKindOf (RUNTIME_CLASS(AInventory))) + if (mo != NULL) { - AInventory * inv = static_cast(mo); - ModifyDropAmount(inv, dropamount); - if (inv->SpecialDropAction (source)) + mo->flags |= MF_DROPPED; + mo->flags &= ~MF_NOGRAVITY; // [RH] Make sure it is affected by gravity + if (!(i_compatflags & COMPATF_NOTOSSDROPS)) { - return NULL; + P_TossItem (mo); } - return inv; + if (mo->IsKindOf (RUNTIME_CLASS(AInventory))) + { + AInventory * inv = static_cast(mo); + ModifyDropAmount(inv, dropamount); + if (inv->SpecialDropAction (source)) + { + return NULL; + } + return inv; + } + // we can't really return an AInventory pointer to a non-inventory item here, can we? } - 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; }