- Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.

- Added a check for PUFFGETSOWNER to A_BFGSpray.
- Moved the PUFFGETSOWNER check into P_SpawnPuff and removed the limitation
  to players only.
- Fixed: P_SpawnMapThing still checked FMapThing::flags for the class bits 
  instead of FMapThing::ClassFilter.
- Fixed: A_CustomMissile must not let P_SpawnMissile call P_CheckMissileSpawn.
  It must do this itself after setting the proper owner.
- Fixed: CCMD(give) increased the total item count.
- Fixed: A_Stop didn't set the player specific variables to 0.


SVN r1066 (trunk)
This commit is contained in:
Christoph Oelckers 2008-07-05 10:17:10 +00:00
commit d2f1515aa6
13 changed files with 76 additions and 26 deletions

View file

@ -107,6 +107,23 @@ bool AWeapon::Use (bool pickup)
return false;
}
//===========================================================================
//
// AWeapon :: Destroy
//
//===========================================================================
FState *AWeapon::Destroy()
{
if (SisterWeapon != NULL)
{
// avoid recursion
SisterWeapon->SisterWeapon = NULL;
SisterWeapon->Destroy();
}
Super::Destroy();
}
//===========================================================================
//
// AWeapon :: HandlePickup
@ -197,6 +214,7 @@ AInventory *AWeapon::CreateTossable ()
// If this weapon has a sister, remove it from the inventory too.
if (SisterWeapon != NULL)
{
SisterWeapon->SisterWeapon = NULL;
SisterWeapon->Destroy ();
}
// To avoid exploits, the tossed weapon must not have any ammo.