- changed handling of DF_NO_COOP_WEAPON_SPAWN dmflag so that weapons are not determined by class type but by a newly added flag WEAPONSPAWN, to allow CustomInventory replacements to act like weapons when being spawned.

This commit is contained in:
Christoph Oelckers 2014-07-27 10:07:37 +02:00
commit 6d4eb7f62d
4 changed files with 8 additions and 2 deletions

View file

@ -4724,7 +4724,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
// [RH] don't spawn extra weapons in coop if so desired
if (multiplayer && !deathmatch && (dmflags & DF_NO_COOP_WEAPON_SPAWN))
{
if (i->IsDescendantOf (RUNTIME_CLASS(AWeapon)))
if (GetDefaultByType(i)->flags7 & MF7_WEAPONSPAWN)
{
if ((mthing->flags & (MTF_DEATHMATCH|MTF_SINGLE)) == MTF_DEATHMATCH)
return NULL;