mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-03-05 00:10:54 +00:00
- Added: hasweaponpiece command to check for custom weapon pieces. - Added: usessecondaryammo command to check if the current weapon has a second ammo type. - Most of SBarInfo's mugshot scripting can be used with the default Doom status bar. - Fixed: By default drawmugshot would never come out of normal god mode state. In addition the state change to and from god mode was not quite as responsive as the original code. SVN r980 (trunk)
35 lines
846 B
C++
35 lines
846 B
C++
|
|
class AWeaponPiece : public AInventory
|
|
{
|
|
DECLARE_CLASS (AWeaponPiece, AInventory)
|
|
HAS_OBJECT_POINTERS
|
|
protected:
|
|
bool PrivateShouldStay ();
|
|
public:
|
|
void Serialize (FArchive &arc);
|
|
bool TryPickup (AActor *toucher);
|
|
bool ShouldStay ();
|
|
virtual const char *PickupMessage ();
|
|
virtual void PlayPickupSound (AActor *toucher);
|
|
|
|
int PieceValue;
|
|
const PClass * WeaponClass;
|
|
TObjPtr<AWeapon> FullWeapon;
|
|
};
|
|
|
|
// an internal class to hold the information for player class independent weapon piece handling
|
|
// [BL] Needs to be available for SBarInfo to check weaponpieces
|
|
class AWeaponHolder : public AInventory
|
|
{
|
|
DECLARE_ACTOR(AWeaponHolder, AInventory)
|
|
|
|
public:
|
|
int PieceMask;
|
|
const PClass * PieceWeapon;
|
|
|
|
void Serialize (FArchive &arc)
|
|
{
|
|
Super::Serialize(arc);
|
|
arc << PieceMask << PieceWeapon;
|
|
}
|
|
};
|