- Converted a_doomhealth.cpp to DECORATE.

- Added a PickupMessage property to the internal actor parser, replaced
  most of the virtual PickupMessages with it and placed the code that
  reads the metadata into AInventory::PickupMessage. Now the
  PickupMessage method is truly virtual and I can do:
   Added a Health.LowMessage property to define double message items like
   Doom's medikit in DECORATE.
- Since defining Mana3 as an ammo type and then overriding the TryPickup
  method means that this item defeats all ammo checks in the game it might
  as well be defined as a CustomInventory item. At least this fixes the
  amount given in easy and very hard skills.
- Converted all ammo items to DECORATE.
- Changed internal property setting of ammo types and sister weapons
  to use fuglyname as for DECORATE definitions. This allows to export
  the ammo definitions into DECORATE definitions without doing it for
  the weapons themselves.
- Replaced obituary methods with actor properties.
- Fixed: The secret map check didn't work for maps inside Zips.



SVN r196 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-17 20:29:41 +00:00
parent 9338c7360b
commit 1bd6ac028b
86 changed files with 2431 additions and 3339 deletions

View file

@ -1,4 +1,21 @@
June 17, 2006 (Changes by Graf Zahl) June 17, 2006 (Changes by Graf Zahl)
- Converted a_doomhealth.cpp to DECORATE.
- Added a PickupMessage property to the internal actor parser, replaced
most of the virtual PickupMessages with it and placed the code that
reads the metadata into AInventory::PickupMessage. Now the
PickupMessage method is truly virtual and I can do:
Added a Health.LowMessage property to define double message items like
Doom's medikit in DECORATE.
- Since defining Mana3 as an ammo type and then overriding the TryPickup
method means that this item defeats all ammo checks in the game it might
as well be defined as a CustomInventory item. At least this fixes the
amount given in easy and very hard skills.
- Converted all ammo items to DECORATE.
- Changed internal property setting of ammo types and sister weapons
to use fuglyname as for DECORATE definitions. This allows to export
the ammo definitions into DECORATE definitions without doing it for
the weapons themselves.
- Replaced obituary methods with actor properties.
- Fixed: The secret map check didn't work for maps inside Zips. - Fixed: The secret map check didn't work for maps inside Zips.
June 14, 2006 June 14, 2006

View file

@ -442,12 +442,6 @@ public:
// Smallest yaw interval for a mapthing to be spawned with // Smallest yaw interval for a mapthing to be spawned with
virtual angle_t AngleIncrements (); virtual angle_t AngleIncrements ();
// Normal/ranged obituary if this actor is the attacker
virtual const char *GetObituary ();
// Melee obituary if this actor is the attacker
virtual const char *GetHitObituary ();
// Return true if the monster should use a missile attack, false for melee // Return true if the monster should use a missile attack, false for melee
virtual bool SuggestMissileAttack (fixed_t dist); virtual bool SuggestMissileAttack (fixed_t dist);

View file

@ -333,7 +333,7 @@ void DCajunMaster::WhatToGet (AActor *actor, AActor *item)
// if (item->IsKindOf (RUNTIME_CLASS(AArtifact))) // if (item->IsKindOf (RUNTIME_CLASS(AArtifact)))
// return; // don't know how to use artifacts // return; // don't know how to use artifacts
if (item->IsKindOf (RUNTIME_CLASS(AWeapon))) if (item->IsKindOf (RUNTIME_CLASS(AWeapon)))
{ {
// FIXME // FIXME
AWeapon *weapon = static_cast<AWeapon *> (item); AWeapon *weapon = static_cast<AWeapon *> (item);
AWeapon *heldWeapon; AWeapon *heldWeapon;

View file

@ -2639,9 +2639,6 @@ bool ADehackedPickup::TryPickup (AActor *toucher)
const char *ADehackedPickup::PickupMessage () const char *ADehackedPickup::PickupMessage ()
{ {
const char *message = RealPickup->GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
if (message != NULL) return message;
return RealPickup->PickupMessage (); return RealPickup->PickupMessage ();
} }

View file

@ -14,8 +14,6 @@ void A_SpidRefire (AActor *self);
class AArachnotron : public AActor class AArachnotron : public AActor
{ {
DECLARE_ACTOR (AArachnotron, AActor) DECLARE_ACTOR (AArachnotron, AActor)
public:
const char *GetObituary () { return GStrings("OB_BABY"); }
}; };
FState AArachnotron::States[] = FState AArachnotron::States[] =
@ -92,6 +90,8 @@ IMPLEMENT_ACTOR (AArachnotron, Doom, 68, 6)
PROP_PainSound ("baby/pain") PROP_PainSound ("baby/pain")
PROP_DeathSound ("baby/death") PROP_DeathSound ("baby/death")
PROP_ActiveSound ("baby/active") PROP_ActiveSound ("baby/active")
PROP_Obituary("$OB_BABY")
END_DEFAULTS END_DEFAULTS
class AArachnotronPlasma : public APlasmaBall class AArachnotronPlasma : public APlasmaBall

View file

@ -92,12 +92,9 @@ IMPLEMENT_ACTOR (AArchvile, Doom, 64, 111)
PROP_PainSound ("vile/pain") PROP_PainSound ("vile/pain")
PROP_DeathSound ("vile/death") PROP_DeathSound ("vile/death")
PROP_ActiveSound ("vile/active") PROP_ActiveSound ("vile/active")
END_DEFAULTS PROP_Obituary("$OB_VILE")
const char *AArchvile::GetObituary () END_DEFAULTS
{
return GStrings("OB_VILE");
}
class AArchvileFire : public AActor class AArchvileFire : public AActor
{ {

View file

@ -15,9 +15,6 @@ void A_BruisAttack (AActor *);
class ABaronOfHell : public AActor class ABaronOfHell : public AActor
{ {
DECLARE_ACTOR (ABaronOfHell, AActor) DECLARE_ACTOR (ABaronOfHell, AActor)
public:
const char *GetObituary () { return GStrings("OB_BARON"); }
const char *GetHitObituary () { return GStrings("OB_BARONHIT"); }
}; };
FState ABaronOfHell::States[] = FState ABaronOfHell::States[] =
@ -87,6 +84,9 @@ IMPLEMENT_ACTOR (ABaronOfHell, Doom, 3003, 3)
PROP_PainSound ("baron/pain") PROP_PainSound ("baron/pain")
PROP_DeathSound ("baron/death") PROP_DeathSound ("baron/death")
PROP_ActiveSound ("baron/active") PROP_ActiveSound ("baron/active")
PROP_Obituary("$OB_BARON")
PROP_HitObituary("$OB_BARONHIT")
END_DEFAULTS END_DEFAULTS
class ABaronBall : public AActor class ABaronBall : public AActor
@ -131,9 +131,6 @@ AT_SPEED_SET (BaronBall, speed)
class AHellKnight : public ABaronOfHell class AHellKnight : public ABaronOfHell
{ {
DECLARE_ACTOR (AHellKnight, ABaronOfHell) DECLARE_ACTOR (AHellKnight, ABaronOfHell)
public:
const char *GetObituary () { return GStrings("OB_KNIGHT"); }
const char *GetHitObituary () { return GStrings("OB_KNIGHTHIT"); }
}; };
FState AHellKnight::States[] = FState AHellKnight::States[] =
@ -203,6 +200,8 @@ IMPLEMENT_ACTOR (AHellKnight, Doom, 69, 113)
PROP_PainSound ("knight/pain") PROP_PainSound ("knight/pain")
PROP_DeathSound ("knight/death") PROP_DeathSound ("knight/death")
PROP_ActiveSound ("knight/active") PROP_ActiveSound ("knight/active")
PROP_Obituary("$OB_KNIGHT")
PROP_HitObituary("$OB_KNIGHTHIT")
END_DEFAULTS END_DEFAULTS
void A_BruisAttack (AActor *self) void A_BruisAttack (AActor *self)

View file

@ -14,9 +14,6 @@ void A_HeadAttack (AActor *);
class ACacodemon : public AActor class ACacodemon : public AActor
{ {
DECLARE_ACTOR (ACacodemon, AActor) DECLARE_ACTOR (ACacodemon, AActor)
public:
const char *GetObituary () { return GStrings("OB_CACO"); }
const char *GetHitObituary () { return GStrings("OB_CACOHIT"); }
}; };
FState ACacodemon::States[] = FState ACacodemon::States[] =
@ -76,6 +73,8 @@ IMPLEMENT_ACTOR (ACacodemon, Doom, 3005, 19)
PROP_DeathSound ("caco/death") PROP_DeathSound ("caco/death")
PROP_ActiveSound ("caco/active") PROP_ActiveSound ("caco/active")
PROP_AttackSound ("caco/melee") PROP_AttackSound ("caco/melee")
PROP_Obituary("$OB_CACO")
PROP_HitObituary("$OB_CACOHIT")
END_DEFAULTS END_DEFAULTS
class ACacodemonBall : public AActor class ACacodemonBall : public AActor

View file

@ -16,8 +16,6 @@ void A_Metal (AActor *);
class ACyberdemon : public AActor class ACyberdemon : public AActor
{ {
DECLARE_ACTOR (ACyberdemon, AActor) DECLARE_ACTOR (ACyberdemon, AActor)
public:
const char *GetObituary () { return GStrings("OB_CYBORG"); }
}; };
FState ACyberdemon::States[] = FState ACyberdemon::States[] =
@ -83,6 +81,7 @@ IMPLEMENT_ACTOR (ACyberdemon, Doom, 16, 114)
PROP_PainSound ("cyber/pain") PROP_PainSound ("cyber/pain")
PROP_DeathSound ("cyber/death") PROP_DeathSound ("cyber/death")
PROP_ActiveSound ("cyber/active") PROP_ActiveSound ("cyber/active")
PROP_Obituary("$OB_CYBORG")
END_DEFAULTS END_DEFAULTS
void A_CyberAttack (AActor *self) void A_CyberAttack (AActor *self)

View file

@ -13,8 +13,6 @@ void A_SargAttack (AActor *);
class ADemon : public AActor class ADemon : public AActor
{ {
DECLARE_ACTOR (ADemon, AActor) DECLARE_ACTOR (ADemon, AActor)
public:
const char *GetHitObituary () { return GStrings("OB_DEMONHIT"); }
}; };
FState ADemon::States[] = FState ADemon::States[] =
@ -82,13 +80,12 @@ IMPLEMENT_ACTOR (ADemon, Doom, 3002, 8)
PROP_PainSound ("demon/pain") PROP_PainSound ("demon/pain")
PROP_DeathSound ("demon/death") PROP_DeathSound ("demon/death")
PROP_ActiveSound ("demon/active") PROP_ActiveSound ("demon/active")
PROP_HitObituary("$OB_DEMONHIT")
END_DEFAULTS END_DEFAULTS
class ASpectre : public ADemon class ASpectre : public ADemon
{ {
DECLARE_STATELESS_ACTOR (ASpectre, ADemon) DECLARE_STATELESS_ACTOR (ASpectre, ADemon)
public:
const char *GetHitObituary () { return GStrings("OB_SPECTREHIT"); }
}; };
IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9) IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9)
@ -101,6 +98,7 @@ IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9)
PROP_PainSound ("spectre/pain") PROP_PainSound ("spectre/pain")
PROP_DeathSound ("spectre/death") PROP_DeathSound ("spectre/death")
PROP_ActiveSound ("spectre/active") PROP_ActiveSound ("spectre/active")
PROP_HitObituary("$OB_SPECTREHIT")
END_DEFAULTS END_DEFAULTS
void A_SargAttack (AActor *self) void A_SargAttack (AActor *self)

View file

@ -34,11 +34,6 @@ public:
} }
return true; return true;
} }
protected:
virtual const char *PickupMessage ()
{
return GStrings("GOTMSPHERE");
}
}; };
FState AMegasphere::States[] = FState AMegasphere::States[] =
@ -54,6 +49,7 @@ IMPLEMENT_ACTOR (AMegasphere, Doom, 83, 132)
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP) PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
PROP_Inventory_MaxAmount (0) PROP_Inventory_MaxAmount (0)
PROP_SpawnState (0) PROP_SpawnState (0)
PROP_Inventory_PickupMessage("$GOTMSPHERE")
END_DEFAULTS END_DEFAULTS
// Berserk ------------------------------------------------------------------ // Berserk ------------------------------------------------------------------
@ -81,11 +77,6 @@ public:
} }
return false; return false;
} }
protected:
virtual const char *PickupMessage ()
{
return GStrings("GOTBERSERK");
}
}; };
FState ABerserk::States[] = FState ABerserk::States[] =
@ -99,5 +90,6 @@ IMPLEMENT_ACTOR (ABerserk, Doom, 2023, 134)
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP) PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
PROP_Inventory_MaxAmount (0) PROP_Inventory_MaxAmount (0)
PROP_PowerupGiver_Powerup ("PowerStrength") PROP_PowerupGiver_Powerup ("PowerStrength")
PROP_Inventory_PickupMessage("$GOTBERSERK")
END_DEFAULTS END_DEFAULTS

View file

@ -13,8 +13,6 @@ class ABossBrain : public AActor
class AExplosiveBarrel : public AActor class AExplosiveBarrel : public AActor
{ {
DECLARE_ACTOR (AExplosiveBarrel, AActor) DECLARE_ACTOR (AExplosiveBarrel, AActor)
public:
const char *GetObituary ();
}; };
class ABulletPuff : public AActor class ABulletPuff : public AActor
@ -29,34 +27,26 @@ class ARocket : public AActor
DECLARE_ACTOR (ARocket, AActor) DECLARE_ACTOR (ARocket, AActor)
public: public:
void BeginPlay (); void BeginPlay ();
const char *GetObituary ();
}; };
class AArchvile : public AActor class AArchvile : public AActor
{ {
DECLARE_ACTOR (AArchvile, AActor) DECLARE_ACTOR (AArchvile, AActor)
public:
const char *GetObituary ();
}; };
class ALostSoul : public AActor class ALostSoul : public AActor
{ {
DECLARE_ACTOR (ALostSoul, AActor) DECLARE_ACTOR (ALostSoul, AActor)
public:
const char *GetObituary ();
}; };
class APlasmaBall : public AActor class APlasmaBall : public AActor
{ {
DECLARE_ACTOR (APlasmaBall, AActor) DECLARE_ACTOR (APlasmaBall, AActor)
const char *GetObituary ();
}; };
class ABFGBall : public AActor class ABFGBall : public AActor
{ {
DECLARE_ACTOR (ABFGBall, AActor) DECLARE_ACTOR (ABFGBall, AActor)
public:
const char *GetObituary ();
}; };
class AScriptedMarine : public AActor class AScriptedMarine : public AActor

View file

@ -1,94 +0,0 @@
#include "info.h"
#include "a_pickups.h"
#include "d_player.h"
#include "gstrings.h"
#include "p_local.h"
// Health bonus -------------------------------------------------------------
class AHealthBonus : public AHealth
{
DECLARE_ACTOR (AHealthBonus, AHealth)
protected:
virtual const char *PickupMessage ()
{
return GStrings("GOTHTHBONUS");
}
};
FState AHealthBonus::States[] =
{
S_NORMAL (BON1, 'A', 6, NULL , &States[1]),
S_NORMAL (BON1, 'B', 6, NULL , &States[2]),
S_NORMAL (BON1, 'C', 6, NULL , &States[3]),
S_NORMAL (BON1, 'D', 6, NULL , &States[4]),
S_NORMAL (BON1, 'C', 6, NULL , &States[5]),
S_NORMAL (BON1, 'B', 6, NULL , &States[0])
};
IMPLEMENT_ACTOR (AHealthBonus, Doom, 2014, 152)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL|MF_COUNTITEM)
PROP_Inventory_Amount (1)
PROP_Inventory_MaxAmount (200) // deh.MaxSoulsphere
PROP_Inventory_FlagsSet (IF_ALWAYSPICKUP)
PROP_SpawnState (0)
END_DEFAULTS
// Stimpack -----------------------------------------------------------------
class AStimpack : public AHealth
{
DECLARE_ACTOR (AStimpack, AHealth)
protected:
virtual const char *PickupMessage ()
{
return GStrings("GOTSTIM");
}
};
FState AStimpack::States[] =
{
S_NORMAL (STIM, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AStimpack, Doom, 2011, 23)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (10)
PROP_SpawnState (0)
END_DEFAULTS
// Medikit ------------------------------------------------------------------
class AMedikit : public AHealth
{
DECLARE_ACTOR (AMedikit, AHealth)
public:
virtual bool TryPickup (AActor *toucher)
{
PrevHealth = toucher->player->health;
return Super::TryPickup (toucher);
}
protected:
virtual const char *PickupMessage ()
{
return GStrings((PrevHealth < 25) ? "GOTMEDINEED" : "GOTMEDIKIT");
}
int PrevHealth;
};
FState AMedikit::States[] =
{
S_NORMAL (MEDI, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AMedikit, Doom, 2012, 24)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (25)
PROP_SpawnState (0)
END_DEFAULTS

View file

@ -14,9 +14,6 @@ void A_TroopAttack (AActor *);
class ADoomImp : public AActor class ADoomImp : public AActor
{ {
DECLARE_ACTOR (ADoomImp, AActor) DECLARE_ACTOR (ADoomImp, AActor)
public:
const char *GetObituary () { return GStrings("OB_IMP"); }
const char *GetHitObituary () { return GStrings("OB_IMPHIT"); }
}; };
FState ADoomImp::States[] = FState ADoomImp::States[] =
@ -92,6 +89,8 @@ IMPLEMENT_ACTOR (ADoomImp, Doom, 3001, 5)
PROP_PainSound ("imp/pain") PROP_PainSound ("imp/pain")
PROP_DeathSound ("imp/death") PROP_DeathSound ("imp/death")
PROP_ActiveSound ("imp/active") PROP_ActiveSound ("imp/active")
PROP_Obituary("$OB_IMP")
PROP_HitObituary("$OB_IMPHIT")
END_DEFAULTS END_DEFAULTS
class ADoomImpBall : public AActor class ADoomImpBall : public AActor

View file

@ -45,13 +45,9 @@ IMPLEMENT_ACTOR (AExplosiveBarrel, Doom, 2035, 125)
PROP_DeathState (S_BEXP) PROP_DeathState (S_BEXP)
PROP_DeathSound ("world/barrelx") PROP_DeathSound ("world/barrelx")
PROP_Obituary("$OB_BARREL")
END_DEFAULTS END_DEFAULTS
const char *AExplosiveBarrel::GetObituary ()
{
return GStrings("OB_BARREL");
}
void A_BarrelDestroy (AActor *actor) void A_BarrelDestroy (AActor *actor)
{ {
if ((dmflags2 & DF2_BARRELS_RESPAWN) && if ((dmflags2 & DF2_BARRELS_RESPAWN) &&

View file

@ -20,226 +20,6 @@ static FRandom pr_fireplasma ("FirePlasma");
static FRandom pr_firerail ("FireRail"); static FRandom pr_firerail ("FireRail");
static FRandom pr_bfgspray ("BFGSpray"); static FRandom pr_bfgspray ("BFGSpray");
/* ammo ********************************************************************/
// Clip --------------------------------------------------------------------
class AClip : public AAmmo
{
DECLARE_ACTOR (AClip, AAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTCLIP");
}
};
FState AClip::States[] =
{
S_NORMAL (CLIP, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AClip, Doom, 2007, 11)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (10)
PROP_Inventory_MaxAmount (200)
PROP_Ammo_BackpackAmount (10)
PROP_Ammo_BackpackMaxAmount (400)
PROP_SpawnState (0)
PROP_Inventory_Icon ("CLIPA0")
END_DEFAULTS
// Clip box ----------------------------------------------------------------
class AClipBox : public AClip
{
DECLARE_ACTOR (AClipBox, AClip)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTCLIPBOX");
}
};
FState AClipBox::States[] =
{
S_NORMAL (AMMO, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AClipBox, Doom, 2048, 139)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (50)
PROP_SpawnState (0)
END_DEFAULTS
// Rocket ------------------------------------------------------------------
class ARocketAmmo : public AAmmo
{
DECLARE_ACTOR (ARocketAmmo, AAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTROCKET");
}
};
FState ARocketAmmo::States[] =
{
S_NORMAL (ROCK, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (ARocketAmmo, Doom, 2010, 140)
PROP_RadiusFixed (20)
PROP_HeightFixed (26)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (1)
PROP_Inventory_MaxAmount (50)
PROP_Ammo_BackpackAmount (1)
PROP_Ammo_BackpackMaxAmount (100)
PROP_SpawnState (0)
PROP_Inventory_Icon ("ROCKA0")
END_DEFAULTS
// Rocket box --------------------------------------------------------------
class ARocketBox : public ARocketAmmo
{
DECLARE_ACTOR (ARocketBox, ARocketAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTROCKBOX");
}
};
FState ARocketBox::States[] =
{
S_NORMAL (BROK, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (ARocketBox, Doom, 2046, 141)
PROP_RadiusFixed (20)
PROP_HeightFixed (16)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (5)
PROP_SpawnState (0)
END_DEFAULTS
// Cell --------------------------------------------------------------------
class ACell : public AAmmo
{
DECLARE_ACTOR (ACell, AAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTCELL");
}
};
FState ACell::States[] =
{
S_NORMAL (CELL, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (ACell, Doom, 2047, 75)
PROP_RadiusFixed (20)
PROP_HeightFixed (10)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (20)
PROP_Inventory_MaxAmount (300)
PROP_Ammo_BackpackAmount (20)
PROP_Ammo_BackpackMaxAmount (600)
PROP_SpawnState (0)
PROP_Inventory_Icon ("CELLA0")
END_DEFAULTS
// Cell pack ---------------------------------------------------------------
class ACellPack : public ACell
{
DECLARE_ACTOR (ACellPack, ACell)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTCELLBOX");
}
};
FState ACellPack::States[] =
{
S_NORMAL (CELP, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (ACellPack, Doom, 17, 142)
PROP_RadiusFixed (20)
PROP_HeightFixed (18)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (100)
PROP_SpawnState (0)
END_DEFAULTS
// Shells ------------------------------------------------------------------
class AShell : public AAmmo
{
DECLARE_ACTOR (AShell, AAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTSHELLS");
}
};
FState AShell::States[] =
{
S_NORMAL (SHEL, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AShell, Doom, 2008, 12)
PROP_RadiusFixed (20)
PROP_HeightFixed (8)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (4)
PROP_Inventory_MaxAmount (50)
PROP_Ammo_BackpackAmount (4)
PROP_Ammo_BackpackMaxAmount (100)
PROP_SpawnState (0)
PROP_Inventory_Icon ("SHELA0")
END_DEFAULTS
// Shell box ---------------------------------------------------------------
class AShellBox : public AShell
{
DECLARE_ACTOR (AShellBox, AShell)
public:
virtual const char *PickupMessage ()
{
return GStrings("GOTSHELLBOX");
}
};
FState AShellBox::States[] =
{
S_NORMAL (SBOX, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AShellBox, Doom, 2049, 143)
PROP_RadiusFixed (20)
PROP_HeightFixed (10)
PROP_Flags (MF_SPECIAL)
PROP_Inventory_Amount (20)
PROP_SpawnState (0)
END_DEFAULTS
/* the weapons that use the ammo above *************************************/
// Fist --------------------------------------------------------------------- // Fist ---------------------------------------------------------------------
void A_Punch (AActor *); void A_Punch (AActor *);
@ -247,8 +27,6 @@ void A_Punch (AActor *);
class AFist : public AWeapon class AFist : public AWeapon
{ {
DECLARE_ACTOR (AFist, AWeapon) DECLARE_ACTOR (AFist, AWeapon)
public:
const char *GetObituary ();
}; };
FState AFist::States[] = FState AFist::States[] =
@ -279,12 +57,9 @@ IMPLEMENT_ACTOR (AFist, Doom, -1, 0)
PROP_Weapon_AtkState (S_PUNCH1) PROP_Weapon_AtkState (S_PUNCH1)
PROP_Weapon_HoldAtkState (S_PUNCH1) PROP_Weapon_HoldAtkState (S_PUNCH1)
PROP_Weapon_Kickback (100) PROP_Weapon_Kickback (100)
END_DEFAULTS PROP_Obituary("$OB_MPFIST")
const char *AFist::GetObituary () END_DEFAULTS
{
return GStrings("OB_MPFIST");
}
// //
// A_Punch // A_Punch
@ -334,8 +109,6 @@ void A_FirePistol (AActor *);
class APistol : public AWeapon class APistol : public AWeapon
{ {
DECLARE_ACTOR (APistol, AWeapon) DECLARE_ACTOR (APistol, AWeapon)
public:
const char *GetObituary ();
}; };
FState APistol::States[] = FState APistol::States[] =
@ -378,13 +151,9 @@ IMPLEMENT_ACTOR (APistol, Doom, -1, 0)
PROP_Weapon_Kickback (100) PROP_Weapon_Kickback (100)
PROP_Weapon_MoveCombatDist (25000000) PROP_Weapon_MoveCombatDist (25000000)
PROP_Weapon_AmmoType1 ("Clip") PROP_Weapon_AmmoType1 ("Clip")
PROP_Obituary("$OB_MPPISTOL")
END_DEFAULTS END_DEFAULTS
const char *APistol::GetObituary ()
{
return GStrings("OB_MPPISTOL");
}
// //
// A_FirePistol // A_FirePistol
// //
@ -424,9 +193,6 @@ void A_Saw (AActor *);
class AChainsaw : public AWeapon class AChainsaw : public AWeapon
{ {
DECLARE_ACTOR (AChainsaw, AWeapon) DECLARE_ACTOR (AChainsaw, AWeapon)
public:
const char *PickupMessage ();
const char *GetObituary ();
}; };
FState AChainsaw::States[] = FState AChainsaw::States[] =
@ -465,18 +231,10 @@ IMPLEMENT_ACTOR (AChainsaw, Doom, 2005, 32)
PROP_Weapon_HoldAtkState (S_SAW1) PROP_Weapon_HoldAtkState (S_SAW1)
PROP_Weapon_UpSound ("weapons/sawup") PROP_Weapon_UpSound ("weapons/sawup")
PROP_Weapon_ReadySound ("weapons/sawidle") PROP_Weapon_ReadySound ("weapons/sawidle")
PROP_Obituary("$OB_MPCHAINSAW")
PROP_Inventory_PickupMessage("$GOTCHAINSAW")
END_DEFAULTS END_DEFAULTS
const char *AChainsaw::PickupMessage ()
{
return GStrings("GOTCHAINSAW");
}
const char *AChainsaw::GetObituary ()
{
return GStrings("OB_MPCHAINSAW");
}
// //
// A_Saw // A_Saw
// //
@ -545,9 +303,6 @@ void A_FireShotgun (AActor *);
class AShotgun : public AWeapon class AShotgun : public AWeapon
{ {
DECLARE_ACTOR (AShotgun, AWeapon) DECLARE_ACTOR (AShotgun, AWeapon)
public:
const char *PickupMessage ();
const char *GetObituary ();
}; };
FState AShotgun::States[] = FState AShotgun::States[] =
@ -598,18 +353,10 @@ IMPLEMENT_ACTOR (AShotgun, Doom, 2001, 27)
PROP_Weapon_Kickback (100) PROP_Weapon_Kickback (100)
PROP_Weapon_MoveCombatDist (24000000) PROP_Weapon_MoveCombatDist (24000000)
PROP_Weapon_AmmoType1 ("Shell") PROP_Weapon_AmmoType1 ("Shell")
PROP_Obituary("$OB_MPSHOTGUN")
PROP_Inventory_PickupMessage("$GOTSHOTGUN")
END_DEFAULTS END_DEFAULTS
const char *AShotgun::PickupMessage ()
{
return GStrings("GOTSHOTGUN");
}
const char *AShotgun::GetObituary ()
{
return GStrings("OB_MPSHOTGUN");
}
// //
// A_FireShotgun // A_FireShotgun
// //
@ -649,9 +396,6 @@ void A_CloseShotgun2 (AActor *actor);
class ASuperShotgun : public AWeapon class ASuperShotgun : public AWeapon
{ {
DECLARE_ACTOR (ASuperShotgun, AWeapon) DECLARE_ACTOR (ASuperShotgun, AWeapon)
public:
const char *PickupMessage ();
const char *GetObituary ();
}; };
FState ASuperShotgun::States[] = FState ASuperShotgun::States[] =
@ -707,18 +451,10 @@ IMPLEMENT_ACTOR (ASuperShotgun, Doom, 82, 33)
PROP_Weapon_Kickback (100) PROP_Weapon_Kickback (100)
PROP_Weapon_MoveCombatDist (15000000) PROP_Weapon_MoveCombatDist (15000000)
PROP_Weapon_AmmoType1 ("Shell") PROP_Weapon_AmmoType1 ("Shell")
PROP_Obituary("$OB_MPSSHOTGUN")
PROP_Inventory_PickupMessage("$GOTSHOTGUN2")
END_DEFAULTS END_DEFAULTS
const char *ASuperShotgun::PickupMessage ()
{
return GStrings("GOTSHOTGUN2");
}
const char *ASuperShotgun::GetObituary ()
{
return GStrings("OB_MPSSHOTGUN");
}
// //
// A_FireShotgun2 // A_FireShotgun2
// //
@ -790,9 +526,6 @@ void A_FireCGun (AActor *);
class AChaingun : public AWeapon class AChaingun : public AWeapon
{ {
DECLARE_ACTOR (AChaingun, AWeapon) DECLARE_ACTOR (AChaingun, AWeapon)
public:
const char *PickupMessage ();
const char *GetObituary ();
}; };
FState AChaingun::States[] = FState AChaingun::States[] =
@ -837,18 +570,10 @@ IMPLEMENT_ACTOR (AChaingun, Doom, 2002, 28)
PROP_Weapon_Kickback (100) PROP_Weapon_Kickback (100)
PROP_Weapon_MoveCombatDist (27000000) PROP_Weapon_MoveCombatDist (27000000)
PROP_Weapon_AmmoType1 ("Clip") PROP_Weapon_AmmoType1 ("Clip")
PROP_Obituary("$OB_MPCHAINGUN")
PROP_Inventory_PickupMessage("$GOTCHAINGUN")
END_DEFAULTS END_DEFAULTS
const char *AChaingun::PickupMessage ()
{
return GStrings("GOTCHAINGUN");
}
const char *AChaingun::GetObituary ()
{
return GStrings("OB_MPCHAINGUN");
}
// //
// A_FireCGun // A_FireCGun
// //
@ -895,8 +620,6 @@ void A_Explode (AActor *);
class ARocketLauncher : public AWeapon class ARocketLauncher : public AWeapon
{ {
DECLARE_ACTOR (ARocketLauncher, AWeapon) DECLARE_ACTOR (ARocketLauncher, AWeapon)
public:
const char *PickupMessage ();
}; };
FState ARocketLauncher::States[] = FState ARocketLauncher::States[] =
@ -945,13 +668,9 @@ IMPLEMENT_ACTOR (ARocketLauncher, Doom, 2003, 29)
PROP_Weapon_MoveCombatDist (18350080) PROP_Weapon_MoveCombatDist (18350080)
PROP_Weapon_AmmoType1 ("RocketAmmo") PROP_Weapon_AmmoType1 ("RocketAmmo")
PROP_Weapon_ProjectileType ("Rocket") PROP_Weapon_ProjectileType ("Rocket")
PROP_Inventory_PickupMessage("$GOTLAUNCHER")
END_DEFAULTS END_DEFAULTS
const char *ARocketLauncher::PickupMessage ()
{
return GStrings("GOTLAUNCHER");
}
FState ARocket::States[] = FState ARocket::States[] =
{ {
#define S_ROCKET 0 #define S_ROCKET 0
@ -977,6 +696,7 @@ IMPLEMENT_ACTOR (ARocket, Doom, -1, 127)
PROP_SeeSound ("weapons/rocklf") PROP_SeeSound ("weapons/rocklf")
PROP_DeathSound ("weapons/rocklx") PROP_DeathSound ("weapons/rocklx")
PROP_Obituary("$OB_MPROCKET")
END_DEFAULTS END_DEFAULTS
void ARocket::BeginPlay () void ARocket::BeginPlay ()
@ -985,11 +705,6 @@ void ARocket::BeginPlay ()
effects |= FX_ROCKET; effects |= FX_ROCKET;
} }
const char *ARocket::GetObituary ()
{
return GStrings("OB_MPROCKET");
}
// //
// A_FireMissile // A_FireMissile
// //
@ -1017,8 +732,6 @@ void A_FirePlasma (AActor *);
class APlasmaRifle : public AWeapon class APlasmaRifle : public AWeapon
{ {
DECLARE_ACTOR (APlasmaRifle, AWeapon) DECLARE_ACTOR (APlasmaRifle, AWeapon)
public:
const char *PickupMessage ();
}; };
FState APlasmaRifle::States[] = FState APlasmaRifle::States[] =
@ -1063,13 +776,9 @@ IMPLEMENT_ACTOR (APlasmaRifle, Doom, 2004, 30)
PROP_Weapon_MoveCombatDist (27000000) PROP_Weapon_MoveCombatDist (27000000)
PROP_Weapon_ProjectileType ("PlasmaBall") PROP_Weapon_ProjectileType ("PlasmaBall")
PROP_Weapon_AmmoType1 ("Cell") PROP_Weapon_AmmoType1 ("Cell")
PROP_Inventory_PickupMessage("$GOTPLASMA")
END_DEFAULTS END_DEFAULTS
const char *APlasmaRifle::PickupMessage ()
{
return GStrings("GOTPLASMA");
}
FState APlasmaBall::States[] = FState APlasmaBall::States[] =
{ {
#define S_PLASBALL 0 #define S_PLASBALL 0
@ -1101,13 +810,9 @@ IMPLEMENT_ACTOR (APlasmaBall, Doom, -1, 51)
PROP_SeeSound ("weapons/plasmaf") PROP_SeeSound ("weapons/plasmaf")
PROP_DeathSound ("weapons/plasmax") PROP_DeathSound ("weapons/plasmax")
PROP_Obituary("$OB_MPPLASMARIFLE")
END_DEFAULTS END_DEFAULTS
const char *APlasmaBall::GetObituary ()
{
return GStrings("OB_MPPLASMARIFLE");
}
// //
// A_FirePlasma // A_FirePlasma
// //
@ -1191,8 +896,6 @@ void A_BFGsound (AActor *);
class ABFG9000 : public AWeapon class ABFG9000 : public AWeapon
{ {
DECLARE_ACTOR (ABFG9000, AWeapon) DECLARE_ACTOR (ABFG9000, AWeapon)
public:
const char *PickupMessage ();
}; };
class ABFGExtra : public AActor class ABFGExtra : public AActor
@ -1245,13 +948,9 @@ IMPLEMENT_ACTOR (ABFG9000, Doom, 2006, 31)
PROP_Weapon_MoveCombatDist (10000000) PROP_Weapon_MoveCombatDist (10000000)
PROP_Weapon_AmmoType1 ("Cell") PROP_Weapon_AmmoType1 ("Cell")
PROP_Weapon_ProjectileType ("BFGBall") PROP_Weapon_ProjectileType ("BFGBall")
PROP_Inventory_PickupMessage("$GOTBFG9000")
END_DEFAULTS END_DEFAULTS
const char *ABFG9000::PickupMessage ()
{
return GStrings("GOTBFG9000");
}
FState ABFGBall::States[] = FState ABFGBall::States[] =
{ {
#define S_BFGSHOT 0 #define S_BFGSHOT 0
@ -1282,13 +981,9 @@ IMPLEMENT_ACTOR (ABFGBall, Doom, -1, 128)
PROP_DeathState (S_BFGLAND) PROP_DeathState (S_BFGLAND)
PROP_DeathSound ("weapons/bfgx") PROP_DeathSound ("weapons/bfgx")
PROP_Obituary("$OB_MPBFG_BOOM")
END_DEFAULTS END_DEFAULTS
const char *ABFGBall::GetObituary ()
{
return GStrings("OB_MPBFG_BOOM");
}
FState ABFGExtra::States[] = FState ABFGExtra::States[] =
{ {
S_BRIGHT (BFE2, 'A', 8, NULL , &States[1]), S_BRIGHT (BFE2, 'A', 8, NULL , &States[1]),

View file

@ -16,8 +16,6 @@ void A_FatAttack3 (AActor *);
class AFatso : public AActor class AFatso : public AActor
{ {
DECLARE_ACTOR (AFatso, AActor) DECLARE_ACTOR (AFatso, AActor)
public:
const char *GetObituary () { return GStrings("OB_FATSO"); }
}; };
FState AFatso::States[] = FState AFatso::States[] =
@ -101,6 +99,7 @@ IMPLEMENT_ACTOR (AFatso, Doom, 67, 112)
PROP_PainSound ("fatso/pain") PROP_PainSound ("fatso/pain")
PROP_DeathSound ("fatso/death") PROP_DeathSound ("fatso/death")
PROP_ActiveSound ("fatso/active") PROP_ActiveSound ("fatso/active")
PROP_Obituary("$OB_FATSO")
END_DEFAULTS END_DEFAULTS
class AFatShot : public AActor class AFatShot : public AActor

View file

@ -66,13 +66,9 @@ IMPLEMENT_ACTOR (ALostSoul, Doom, 3006, 110)
PROP_PainSound ("skull/pain") PROP_PainSound ("skull/pain")
PROP_DeathSound ("skull/death") PROP_DeathSound ("skull/death")
PROP_ActiveSound ("skull/active") PROP_ActiveSound ("skull/active")
PROP_Obituary("$OB_SKULL")
END_DEFAULTS END_DEFAULTS
const char *ALostSoul::GetObituary ()
{
return GStrings("OB_SKULL");
}
// //
// SkullAttack // SkullAttack
// Fly at the player like a missile. // Fly at the player like a missile.

View file

@ -25,7 +25,6 @@ class AZombieMan : public AActor
DECLARE_ACTOR (AZombieMan, AActor) DECLARE_ACTOR (AZombieMan, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary () { return GStrings("OB_ZOMBIE"); }
}; };
FState AZombieMan::States[] = FState AZombieMan::States[] =
@ -101,6 +100,7 @@ IMPLEMENT_ACTOR (AZombieMan, Doom, 3004, 4)
PROP_PainSound ("grunt/pain") PROP_PainSound ("grunt/pain")
PROP_DeathSound ("grunt/death") PROP_DeathSound ("grunt/death")
PROP_ActiveSound ("grunt/active") PROP_ActiveSound ("grunt/active")
PROP_Obituary("$OB_ZOMBIE")
END_DEFAULTS END_DEFAULTS
void AZombieMan::NoBlockingSet () void AZombieMan::NoBlockingSet ()
@ -137,7 +137,6 @@ class AShotgunGuy : public AActor
DECLARE_ACTOR (AShotgunGuy, AActor) DECLARE_ACTOR (AShotgunGuy, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary () { return GStrings("OB_SHOTGUY"); }
}; };
FState AShotgunGuy::States[] = FState AShotgunGuy::States[] =
@ -215,6 +214,7 @@ IMPLEMENT_ACTOR (AShotgunGuy, Doom, 9, 1)
PROP_PainSound ("shotguy/pain") PROP_PainSound ("shotguy/pain")
PROP_DeathSound ("shotguy/death") PROP_DeathSound ("shotguy/death")
PROP_ActiveSound ("shotguy/active") PROP_ActiveSound ("shotguy/active")
PROP_Obituary("$OB_SHOTGUY")
END_DEFAULTS END_DEFAULTS
void AShotgunGuy::NoBlockingSet () void AShotgunGuy::NoBlockingSet ()
@ -267,7 +267,6 @@ class AChaingunGuy : public AActor
DECLARE_ACTOR (AChaingunGuy, AActor) DECLARE_ACTOR (AChaingunGuy, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary () { return GStrings("OB_CHAINGUY"); }
}; };
FState AChaingunGuy::States[] = FState AChaingunGuy::States[] =
@ -346,6 +345,7 @@ IMPLEMENT_ACTOR (AChaingunGuy, Doom, 65, 2)
PROP_DeathSound ("chainguy/death") PROP_DeathSound ("chainguy/death")
PROP_ActiveSound ("chainguy/active") PROP_ActiveSound ("chainguy/active")
PROP_AttackSound ("chainguy/attack") PROP_AttackSound ("chainguy/attack")
PROP_Obituary("$OB_CHAINGUY")
END_DEFAULTS END_DEFAULTS
void AChaingunGuy::NoBlockingSet () void AChaingunGuy::NoBlockingSet ()
@ -359,7 +359,6 @@ class AWolfensteinSS : public AActor
{ {
DECLARE_ACTOR (AWolfensteinSS, AActor) DECLARE_ACTOR (AWolfensteinSS, AActor)
public: public:
const char *GetObituary () { return GStrings("OB_WOLFSS"); }
void NoBlockingSet (); void NoBlockingSet ();
}; };
@ -440,6 +439,7 @@ IMPLEMENT_ACTOR (AWolfensteinSS, Doom, 84, 116)
PROP_DeathSound ("wolfss/death") PROP_DeathSound ("wolfss/death")
PROP_ActiveSound ("wolfss/active") PROP_ActiveSound ("wolfss/active")
PROP_AttackSound ("wolfss/attack") PROP_AttackSound ("wolfss/attack")
PROP_Obituary("$OB_WOLFSS")
END_DEFAULTS END_DEFAULTS
void AWolfensteinSS::NoBlockingSet () void AWolfensteinSS::NoBlockingSet ()

View file

@ -20,9 +20,6 @@ void A_SkelFist (AActor *);
class ARevenant : public AActor class ARevenant : public AActor
{ {
DECLARE_ACTOR (ARevenant, AActor) DECLARE_ACTOR (ARevenant, AActor)
public:
const char *GetObituary () { return GStrings("OB_UNDEAD"); }
const char *GetHitObituary () { return GStrings("OB_UNDEADHIT"); }
}; };
FState ARevenant::States[] = FState ARevenant::States[] =
@ -101,6 +98,8 @@ IMPLEMENT_ACTOR (ARevenant, Doom, 66, 20)
PROP_PainSound ("skeleton/pain") PROP_PainSound ("skeleton/pain")
PROP_DeathSound ("skeleton/death") PROP_DeathSound ("skeleton/death")
PROP_ActiveSound ("skeleton/active") PROP_ActiveSound ("skeleton/active")
PROP_Obituary("$OB_UNDEAD")
PROP_HitObituary("$OB_UNDEADHIT")
END_DEFAULTS END_DEFAULTS

View file

@ -17,8 +17,6 @@ void A_SPosAttackUseAtkSound (AActor *);
class ASpiderMastermind : public AActor class ASpiderMastermind : public AActor
{ {
DECLARE_ACTOR (ASpiderMastermind, AActor) DECLARE_ACTOR (ASpiderMastermind, AActor)
public:
const char *GetObituary () { return GStrings("OB_SPIDER"); }
}; };
FState ASpiderMastermind::States[] = FState ASpiderMastermind::States[] =
@ -88,6 +86,7 @@ IMPLEMENT_ACTOR (ASpiderMastermind, Doom, 7, 7)
PROP_PainSound ("spider/pain") PROP_PainSound ("spider/pain")
PROP_DeathSound ("spider/death") PROP_DeathSound ("spider/death")
PROP_ActiveSound ("spider/active") PROP_ActiveSound ("spider/active")
PROP_Obituary("$OB_SPIDER")
END_DEFAULTS END_DEFAULTS
void A_SpidRefire (AActor *self) void A_SpidRefire (AActor *self)

View file

@ -20,7 +20,6 @@ class ABeast : public AActor
DECLARE_ACTOR (ABeast, AActor) DECLARE_ACTOR (ABeast, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
}; };
FState ABeast::States[] = FState ABeast::States[] =
@ -89,6 +88,7 @@ IMPLEMENT_ACTOR (ABeast, Heretic, 70, 3)
PROP_PainSound ("beast/pain") PROP_PainSound ("beast/pain")
PROP_DeathSound ("beast/death") PROP_DeathSound ("beast/death")
PROP_ActiveSound ("beast/active") PROP_ActiveSound ("beast/active")
PROP_Obituary("$OB_BEAST")
END_DEFAULTS END_DEFAULTS
void ABeast::NoBlockingSet () void ABeast::NoBlockingSet ()
@ -96,11 +96,6 @@ void ABeast::NoBlockingSet ()
P_DropItem (this, "CrossbowAmmo", 10, 84); P_DropItem (this, "CrossbowAmmo", 10, 84);
} }
const char *ABeast::GetObituary ()
{
return GStrings("OB_BEAST");
}
// Beast ball --------------------------------------------------------------- // Beast ball ---------------------------------------------------------------
// Heretic also had a MT_BURNBALL and MT_BURNBALLFB based on the beast ball, // Heretic also had a MT_BURNBALL and MT_BURNBALLFB based on the beast ball,

View file

@ -220,7 +220,6 @@ class AChicken : public AActor
DECLARE_ACTOR (AChicken, AActor) DECLARE_ACTOR (AChicken, AActor)
public: public:
void Destroy (); void Destroy ();
const char *GetObituary ();
void Die (AActor *source, AActor *inflictor); void Die (AActor *source, AActor *inflictor);
}; };
@ -275,6 +274,7 @@ IMPLEMENT_ACTOR (AChicken, Heretic, -1, 122)
PROP_PainSound ("chicken/pain") PROP_PainSound ("chicken/pain")
PROP_DeathSound ("chicken/death") PROP_DeathSound ("chicken/death")
PROP_ActiveSound ("chicken/active") PROP_ActiveSound ("chicken/active")
PROP_Obituary("$OB_CHICKEN")
END_DEFAULTS END_DEFAULTS
void AChicken::Destroy () void AChicken::Destroy ()
@ -286,11 +286,6 @@ void AChicken::Destroy ()
Super::Destroy (); Super::Destroy ();
} }
const char *AChicken::GetObituary ()
{
return GStrings("OB_CHICKEN");
}
void AChicken::Die (AActor *source, AActor *inflictor) void AChicken::Die (AActor *source, AActor *inflictor)
{ {
Super::Die (source, inflictor); Super::Die (source, inflictor);

View file

@ -18,7 +18,6 @@ class AClink : public AActor
DECLARE_ACTOR (AClink, AActor) DECLARE_ACTOR (AClink, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
}; };
FState AClink::States[] = FState AClink::States[] =
@ -73,6 +72,7 @@ IMPLEMENT_ACTOR (AClink, Heretic, 90, 1)
PROP_PainSound ("clink/pain") PROP_PainSound ("clink/pain")
PROP_DeathSound ("clink/death") PROP_DeathSound ("clink/death")
PROP_ActiveSound ("clink/active") PROP_ActiveSound ("clink/active")
PROP_Obituary("$OB_CLINK")
END_DEFAULTS END_DEFAULTS
void AClink::NoBlockingSet () void AClink::NoBlockingSet ()
@ -80,11 +80,6 @@ void AClink::NoBlockingSet ()
P_DropItem (this, "SkullRodAmmo", 20, 84); P_DropItem (this, "SkullRodAmmo", 20, 84);
} }
const char *AClink::GetObituary ()
{
return GStrings("OB_CLINK");
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// //
// PROC A_ClinkAttack // PROC A_ClinkAttack

View file

@ -65,9 +65,6 @@ void ABossSpot::BeginPlay ()
class ASorcerer1 : public AActor class ASorcerer1 : public AActor
{ {
DECLARE_ACTOR (ASorcerer1, AActor) DECLARE_ACTOR (ASorcerer1, AActor)
public:
const char *GetObituary ();
const char *GetHitObituary ();
}; };
FState ASorcerer1::States[] = FState ASorcerer1::States[] =
@ -137,18 +134,10 @@ IMPLEMENT_ACTOR (ASorcerer1, Heretic, 7, 142)
PROP_PainSound ("dsparilserpent/pain") PROP_PainSound ("dsparilserpent/pain")
PROP_DeathSound ("dsparilserpent/death") PROP_DeathSound ("dsparilserpent/death")
PROP_ActiveSound ("dsparilserpent/active") PROP_ActiveSound ("dsparilserpent/active")
PROP_Obituary("$OB_DSPARIL1")
PROP_HitObituary("$OB_DSPARIL1HIT")
END_DEFAULTS END_DEFAULTS
const char *ASorcerer1::GetObituary ()
{
return GStrings("OB_DSPARIL1");
}
const char *ASorcerer1::GetHitObituary ()
{
return GStrings("OB_DSPARIL1HIT");
}
// Sorcerer FX 1 ------------------------------------------------------------ // Sorcerer FX 1 ------------------------------------------------------------
class ASorcererFX1 : public AActor class ASorcererFX1 : public AActor
@ -270,6 +259,8 @@ IMPLEMENT_ACTOR (ASorcerer2, Heretic, -1, 143)
PROP_AttackSound ("dsparil/attack") PROP_AttackSound ("dsparil/attack")
PROP_PainSound ("dsparil/pain") PROP_PainSound ("dsparil/pain")
PROP_ActiveSound ("dsparil/active") PROP_ActiveSound ("dsparil/active")
PROP_Obituary("$OB_DSPARIL2")
PROP_HitObituary("$OB_DSPARIL2HIT")
END_DEFAULTS END_DEFAULTS
void ASorcerer2::Serialize (FArchive &arc) void ASorcerer2::Serialize (FArchive &arc)
@ -295,16 +286,6 @@ void ASorcerer2::BeginPlay ()
} }
} }
const char *ASorcerer2::GetObituary ()
{
return GStrings("OB_DSPARIL2");
}
const char *ASorcerer2::GetHitObituary ()
{
return GStrings("OB_DSPARIL2HIT");
}
// Sorcerer 2 FX 1 ---------------------------------------------------------- // Sorcerer 2 FX 1 ----------------------------------------------------------
class ASorcerer2FX1 : public AActor class ASorcerer2FX1 : public AActor

View file

@ -13,7 +13,6 @@ class AArtiTomeOfPower : public APowerupGiver
DECLARE_ACTOR (AArtiTomeOfPower, APowerupGiver) DECLARE_ACTOR (AArtiTomeOfPower, APowerupGiver)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiTomeOfPower::States[] = FState AArtiTomeOfPower::States[] =
@ -28,6 +27,7 @@ IMPLEMENT_ACTOR (AArtiTomeOfPower, Heretic, 86, 134)
PROP_Inventory_FlagsSet (IF_PICKUPFLASH) PROP_Inventory_FlagsSet (IF_PICKUPFLASH)
PROP_Inventory_Icon ("ARTIPWBK") PROP_Inventory_Icon ("ARTIPWBK")
PROP_PowerupGiver_Powerup ("PowerWeaponLevel2") PROP_PowerupGiver_Powerup ("PowerWeaponLevel2")
PROP_Inventory_PickupMessage("$TXT_ARTITOMEOFPOWER")
END_DEFAULTS END_DEFAULTS
bool AArtiTomeOfPower::Use (bool pickup) bool AArtiTomeOfPower::Use (bool pickup)
@ -51,11 +51,6 @@ bool AArtiTomeOfPower::Use (bool pickup)
} }
} }
const char *AArtiTomeOfPower::PickupMessage ()
{
return GStrings("TXT_ARTITOMEOFPOWER");
}
// Time bomb ---------------------------------------------------------------- // Time bomb ----------------------------------------------------------------
class AActivatedTimeBomb : public AActor class AActivatedTimeBomb : public AActor
@ -99,7 +94,6 @@ class AArtiTimeBomb : public AInventory
DECLARE_ACTOR (AArtiTimeBomb, AInventory) DECLARE_ACTOR (AArtiTimeBomb, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiTimeBomb::States[] = FState AArtiTimeBomb::States[] =
@ -115,6 +109,7 @@ IMPLEMENT_ACTOR (AArtiTimeBomb, Heretic, 34, 72)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIFBMB") PROP_Inventory_Icon ("ARTIFBMB")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIFIREBOMB")
END_DEFAULTS END_DEFAULTS
bool AArtiTimeBomb::Use (bool pickup) bool AArtiTimeBomb::Use (bool pickup)
@ -128,7 +123,3 @@ bool AArtiTimeBomb::Use (bool pickup)
return true; return true;
} }
const char *AArtiTimeBomb::PickupMessage ()
{
return GStrings("TXT_ARTIFIREBOMB");
}

View file

@ -27,8 +27,6 @@ class ASorcerer2 : public AActor
public: public:
void Serialize (FArchive &arc); void Serialize (FArchive &arc);
void BeginPlay (); void BeginPlay ();
const char *GetObituary ();
const char *GetHitObituary ();
int NumBossSpots; int NumBossSpots;
AActor *FirstBossSpot; AActor *FirstBossSpot;
@ -39,8 +37,6 @@ class AWizard : public AActor
DECLARE_ACTOR (AWizard, AActor) DECLARE_ACTOR (AWizard, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
const char *GetHitObituary ();
}; };
void P_DSparilTeleport (AActor *actor); void P_DSparilTeleport (AActor *actor);

View file

@ -25,9 +25,6 @@ void A_ImpXDeath2 (AActor *);
class AHereticImp : public AActor class AHereticImp : public AActor
{ {
DECLARE_ACTOR (AHereticImp, AActor) DECLARE_ACTOR (AHereticImp, AActor)
public:
const char *GetObituary ();
const char *GetHitObituary ();
}; };
FState AHereticImp::States[] = FState AHereticImp::States[] =
@ -114,18 +111,10 @@ IMPLEMENT_ACTOR (AHereticImp, Heretic, 66, 5)
PROP_PainSound ("himp/pain") PROP_PainSound ("himp/pain")
PROP_DeathSound ("himp/death") PROP_DeathSound ("himp/death")
PROP_ActiveSound ("himp/active") PROP_ActiveSound ("himp/active")
PROP_Obituary("$OB_HERETICIMP")
PROP_HitObituary("$OB_HERETICIMPHIT")
END_DEFAULTS END_DEFAULTS
const char *AHereticImp::GetObituary ()
{
return GStrings("OB_HERETICIMP");
}
const char *AHereticImp::GetHitObituary ()
{
return GStrings("OB_HERETICIMPHIT");
}
// Heretic imp leader ------------------------------------------------------- // Heretic imp leader -------------------------------------------------------
class AHereticImpLeader : public AHereticImp class AHereticImpLeader : public AHereticImp

View file

@ -38,18 +38,6 @@ static FRandom pr_fp2 ("FirePhoenixPL2");
#define FLAME_THROWER_TICS (10*TICRATE) #define FLAME_THROWER_TICS (10*TICRATE)
#define AMMO_GWND_WIMPY 10
#define AMMO_GWND_HEFTY 50
#define AMMO_CBOW_WIMPY 5
#define AMMO_CBOW_HEFTY 20
#define AMMO_BLSR_WIMPY 10
#define AMMO_BLSR_HEFTY 25
#define AMMO_SKRD_WIMPY 20
#define AMMO_SKRD_HEFTY 100
#define AMMO_PHRD_WIMPY 1
#define AMMO_PHRD_HEFTY 10
#define AMMO_MACE_WIMPY 20
#define AMMO_MACE_HEFTY 100
#define USE_GWND_AMMO_1 1 #define USE_GWND_AMMO_1 1
#define USE_GWND_AMMO_2 1 #define USE_GWND_AMMO_2 1
@ -284,58 +272,6 @@ void A_StaffAttackPL2 (AActor *actor)
void A_FireGoldWandPL1 (AActor *); void A_FireGoldWandPL1 (AActor *);
void A_FireGoldWandPL2 (AActor *); void A_FireGoldWandPL2 (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class AGoldWandAmmo : public AAmmo
{
DECLARE_ACTOR (AGoldWandAmmo, AAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("TXT_AMMOGOLDWAND1");
}
};
FState AGoldWandAmmo::States[] =
{
S_NORMAL (AMG1, 'A', -1, NULL , NULL),
};
IMPLEMENT_ACTOR (AGoldWandAmmo, Heretic, 10, 11)
PROP_Inventory_Amount (AMMO_GWND_WIMPY)
PROP_Inventory_MaxAmount (100)
PROP_Ammo_BackpackAmount (AMMO_GWND_WIMPY)
PROP_Ammo_BackpackMaxAmount (200)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMGLD")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class AGoldWandHefty : public AGoldWandAmmo
{
DECLARE_ACTOR (AGoldWandHefty, AGoldWandAmmo)
public:
virtual const char *PickupMessage ()
{
return GStrings("TXT_AMMOGOLDWAND2");
}
};
FState AGoldWandHefty::States[] =
{
S_NORMAL (AMG2, 'A', 4, NULL , &States[1]),
S_NORMAL (AMG2, 'B', 4, NULL , &States[2]),
S_NORMAL (AMG2, 'C', 4, NULL , &States[0])
};
IMPLEMENT_ACTOR (AGoldWandHefty, Heretic, 12, 12)
PROP_Inventory_Amount (AMMO_GWND_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// Gold wand ---------------------------------------------------------------- // Gold wand ----------------------------------------------------------------
class AGoldWand : public AHereticWeapon class AGoldWand : public AHereticWeapon
@ -573,68 +509,11 @@ void A_FireCrossbowPL1 (AActor *);
void A_FireCrossbowPL2 (AActor *); void A_FireCrossbowPL2 (AActor *);
void A_BoltSpark (AActor *); void A_BoltSpark (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class ACrossbowAmmo : public AAmmo
{
DECLARE_ACTOR (ACrossbowAmmo, AAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOCROSSBOW1");
}
};
FState ACrossbowAmmo::States[] =
{
S_NORMAL (AMC1, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (ACrossbowAmmo, Heretic, 18, 33)
PROP_Inventory_Amount (AMMO_CBOW_WIMPY)
PROP_Inventory_MaxAmount (50)
PROP_Ammo_BackpackAmount (AMMO_CBOW_WIMPY)
PROP_Ammo_BackpackMaxAmount (100)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMBOW")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class ACrossbowHefty : public ACrossbowAmmo
{
DECLARE_ACTOR (ACrossbowHefty, ACrossbowAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOCROSSBOW2");
}
};
FState ACrossbowHefty::States[] =
{
S_NORMAL (AMC2, 'A', 5, NULL , &States[1]),
S_NORMAL (AMC2, 'B', 5, NULL , &States[2]),
S_NORMAL (AMC2, 'C', 5, NULL , &States[0])
};
IMPLEMENT_ACTOR (ACrossbowHefty, Heretic, 19, 34)
PROP_Inventory_Amount (AMMO_CBOW_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// Crossbow ----------------------------------------------------------------- // Crossbow -----------------------------------------------------------------
class ACrossbow : public AHereticWeapon class ACrossbow : public AHereticWeapon
{ {
DECLARE_ACTOR (ACrossbow, AHereticWeapon) DECLARE_ACTOR (ACrossbow, AHereticWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WPNCROSSBOW");
}
}; };
class ACrossbowPowered : public ACrossbow class ACrossbowPowered : public ACrossbow
@ -711,6 +590,7 @@ IMPLEMENT_ACTOR (ACrossbow, Heretic, 2001, 27)
PROP_Weapon_AmmoType1 ("CrossbowAmmo") PROP_Weapon_AmmoType1 ("CrossbowAmmo")
PROP_Weapon_SisterType ("CrossbowPowered") PROP_Weapon_SisterType ("CrossbowPowered")
PROP_Weapon_ProjectileType ("CrossbowFX1") PROP_Weapon_ProjectileType ("CrossbowFX1")
PROP_Inventory_PickupMessage("$TXT_WPNCROSSBOW")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (ACrossbowPowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (ACrossbowPowered, Heretic, -1, 0)
@ -917,56 +797,6 @@ void A_MaceBallImpact2 (AActor *);
void A_FireMacePL2 (AActor *); void A_FireMacePL2 (AActor *);
void A_DeathBallImpact (AActor *); void A_DeathBallImpact (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class AMaceAmmo : public AAmmo
{
DECLARE_ACTOR (AMaceAmmo, AAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOMACE1");
}
};
FState AMaceAmmo::States[] =
{
S_NORMAL (AMM1, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AMaceAmmo, Heretic, 13, 35)
PROP_Inventory_Amount (AMMO_MACE_WIMPY)
PROP_Inventory_MaxAmount (150)
PROP_Ammo_BackpackAmount (AMMO_MACE_WIMPY)
PROP_Ammo_BackpackMaxAmount (300)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMLOB")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class AMaceHefty : public AMaceAmmo
{
DECLARE_ACTOR (AMaceHefty, AMaceAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOMACE1");
}
};
FState AMaceHefty::States[] =
{
S_NORMAL (AMM2, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AMaceHefty, Heretic, 16, 36)
PROP_Inventory_Amount (AMMO_MACE_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// The mace itself ---------------------------------------------------------- // The mace itself ----------------------------------------------------------
class AMace : public AHereticWeapon class AMace : public AHereticWeapon
@ -975,11 +805,6 @@ class AMace : public AHereticWeapon
HAS_OBJECT_POINTERS HAS_OBJECT_POINTERS
public: public:
void Serialize (FArchive &arc); void Serialize (FArchive &arc);
public:
const char *PickupMessage ()
{
return GStrings("TXT_WPNMACE");
}
protected: protected:
bool DoRespawn (); bool DoRespawn ();
int NumMaceSpots; int NumMaceSpots;
@ -1055,6 +880,7 @@ BEGIN_DEFAULTS (AMace, Heretic, -1, 0)
PROP_Weapon_AmmoType1 ("MaceAmmo") PROP_Weapon_AmmoType1 ("MaceAmmo")
PROP_Weapon_SisterType ("MacePowered") PROP_Weapon_SisterType ("MacePowered")
PROP_Weapon_ProjectileType ("MaceFX2") PROP_Weapon_ProjectileType ("MaceFX2")
PROP_Inventory_PickupMessage("$TXT_WPNMACE")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (AMacePowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (AMacePowered, Heretic, -1, 0)
@ -1639,11 +1465,6 @@ void A_GauntletSound (AActor *);
class AGauntlets : public AHereticWeapon class AGauntlets : public AHereticWeapon
{ {
DECLARE_ACTOR (AGauntlets, AHereticWeapon) DECLARE_ACTOR (AGauntlets, AHereticWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WPNGAUNTLETS");
}
}; };
class AGauntletsPowered : public AGauntlets class AGauntletsPowered : public AGauntlets
@ -1711,6 +1532,7 @@ IMPLEMENT_ACTOR (AGauntlets, Heretic, 2005, 32)
PROP_Weapon_YAdjust (15) PROP_Weapon_YAdjust (15)
PROP_Weapon_UpSound ("weapons/gauntletsactivate") PROP_Weapon_UpSound ("weapons/gauntletsactivate")
PROP_Weapon_SisterType ("GauntletsPowered") PROP_Weapon_SisterType ("GauntletsPowered")
PROP_Inventory_PickupMessage("$TXT_WPNGAUNTLETS")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (AGauntletsPowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (AGauntletsPowered, Heretic, -1, 0)
@ -1887,70 +1709,11 @@ void A_FireBlasterPL1 (AActor *);
void A_FireBlasterPL2 (AActor *); void A_FireBlasterPL2 (AActor *);
void A_SpawnRippers (AActor *); void A_SpawnRippers (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class ABlasterAmmo : public AAmmo
{
DECLARE_ACTOR (ABlasterAmmo, AAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOBLASTER1");
}
};
FState ABlasterAmmo::States[] =
{
S_NORMAL (AMB1, 'A', 4, NULL , &States[1]),
S_NORMAL (AMB1, 'B', 4, NULL , &States[2]),
S_NORMAL (AMB1, 'C', 4, NULL , &States[0])
};
IMPLEMENT_ACTOR (ABlasterAmmo, Heretic, 54, 37)
PROP_Inventory_Amount (AMMO_BLSR_WIMPY)
PROP_Inventory_MaxAmount (200)
PROP_Ammo_BackpackAmount (AMMO_BLSR_WIMPY)
PROP_Ammo_BackpackMaxAmount (400)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMBST")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class ABlasterHefty : public ABlasterAmmo
{
DECLARE_ACTOR (ABlasterHefty, ABlasterAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOBLASTER2");
}
};
FState ABlasterHefty::States[] =
{
S_NORMAL (AMB2, 'A', 4, NULL , &States[1]),
S_NORMAL (AMB2, 'B', 4, NULL , &States[2]),
S_NORMAL (AMB2, 'C', 4, NULL , &States[0])
};
IMPLEMENT_ACTOR (ABlasterHefty, Heretic, 55, 38)
PROP_Inventory_Amount (AMMO_BLSR_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// Blaster ------------------------------------------------------------------ // Blaster ------------------------------------------------------------------
class ABlaster : public AHereticWeapon class ABlaster : public AHereticWeapon
{ {
DECLARE_ACTOR (ABlaster, AHereticWeapon) DECLARE_ACTOR (ABlaster, AHereticWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WPNBLASTER");
}
}; };
class ABlasterPowered : public ABlaster class ABlasterPowered : public ABlaster
@ -2006,6 +1769,7 @@ IMPLEMENT_ACTOR (ABlaster, Heretic, 53, 28)
PROP_Weapon_MoveCombatDist (27000000) PROP_Weapon_MoveCombatDist (27000000)
PROP_Weapon_AmmoType1 ("BlasterAmmo") PROP_Weapon_AmmoType1 ("BlasterAmmo")
PROP_Weapon_SisterType ("BlasterPowered") PROP_Weapon_SisterType ("BlasterPowered")
PROP_Inventory_PickupMessage("$TXT_WPNBLASTER")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (ABlasterPowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (ABlasterPowered, Heretic, -1, 0)
@ -2348,68 +2112,11 @@ void A_HideInCeiling (AActor *);
void A_SkullRodStorm (AActor *); void A_SkullRodStorm (AActor *);
void A_RainImpact (AActor *); void A_RainImpact (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class ASkullRodAmmo : public AAmmo
{
DECLARE_ACTOR (ASkullRodAmmo, AAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOSKULLROD1");
}
};
FState ASkullRodAmmo::States[] =
{
S_NORMAL (AMS1, 'A', 5, NULL , &States[1]),
S_NORMAL (AMS1, 'B', 5, NULL , &States[0])
};
IMPLEMENT_ACTOR (ASkullRodAmmo, Heretic, 20, 158)
PROP_Inventory_Amount (AMMO_SKRD_WIMPY)
PROP_Inventory_MaxAmount (200)
PROP_Ammo_BackpackAmount (AMMO_SKRD_WIMPY)
PROP_Ammo_BackpackMaxAmount (400)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMRAM")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class ASkullRodHefty : public ASkullRodAmmo
{
DECLARE_ACTOR (ASkullRodHefty, ASkullRodAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOSKULLROD2");
}
};
FState ASkullRodHefty::States[] =
{
S_NORMAL (AMS2, 'A', 5, NULL , &States[1]),
S_NORMAL (AMS2, 'B', 5, NULL , &States[0])
};
IMPLEMENT_ACTOR (ASkullRodHefty, Heretic, 21, 159)
PROP_Inventory_Amount (AMMO_SKRD_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// Skull (Horn) Rod --------------------------------------------------------- // Skull (Horn) Rod ---------------------------------------------------------
class ASkullRod : public AHereticWeapon class ASkullRod : public AHereticWeapon
{ {
DECLARE_ACTOR (ASkullRod, AHereticWeapon) DECLARE_ACTOR (ASkullRod, AHereticWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WPNSKULLROD");
}
}; };
class ASkullRodPowered : public ASkullRod class ASkullRodPowered : public ASkullRod
@ -2465,6 +2172,7 @@ IMPLEMENT_ACTOR (ASkullRod, Heretic, 2004, 30)
PROP_Weapon_AmmoType1 ("SkullRodAmmo") PROP_Weapon_AmmoType1 ("SkullRodAmmo")
PROP_Weapon_SisterType ("SkullRodPowered") PROP_Weapon_SisterType ("SkullRodPowered")
PROP_Weapon_ProjectileType ("HornRodFX1") PROP_Weapon_ProjectileType ("HornRodFX1")
PROP_Inventory_PickupMessage("$TXT_WPNSKULLROD")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (ASkullRodPowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (ASkullRodPowered, Heretic, -1, 0)
@ -2871,60 +2579,6 @@ void A_PhoenixPuff (AActor *);
void A_FlameEnd (AActor *); void A_FlameEnd (AActor *);
void A_FloatPuff (AActor *); void A_FloatPuff (AActor *);
// Wimpy ammo ---------------------------------------------------------------
class APhoenixRodAmmo : public AAmmo
{
DECLARE_ACTOR (APhoenixRodAmmo, AAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOPHOENIXROD1");
}
};
FState APhoenixRodAmmo::States[] =
{
S_NORMAL (AMP1, 'A', 4, NULL , &States[1]),
S_NORMAL (AMP1, 'B', 4, NULL , &States[2]),
S_NORMAL (AMP1, 'C', 4, NULL , &States[0])
};
IMPLEMENT_ACTOR (APhoenixRodAmmo, Heretic, 22, 161)
PROP_Inventory_Amount (AMMO_PHRD_WIMPY)
PROP_Inventory_MaxAmount (20)
PROP_Ammo_BackpackAmount (AMMO_PHRD_WIMPY)
PROP_Ammo_BackpackMaxAmount (40)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
PROP_Inventory_Icon ("INAMPNX")
END_DEFAULTS
// Hefty ammo ---------------------------------------------------------------
class APhoenixRodHefty : public APhoenixRodAmmo
{
DECLARE_ACTOR (APhoenixRodHefty, APhoenixRodAmmo)
public:
const char *PickupMessage ()
{
return GStrings("TXT_AMMOPHOENIXROD2");
}
};
FState APhoenixRodHefty::States[] =
{
S_NORMAL (AMP2, 'A', 4, NULL , &States[1]),
S_NORMAL (AMP2, 'B', 4, NULL , &States[2]),
S_NORMAL (AMP2, 'C', 4, NULL , &States[0])
};
IMPLEMENT_ACTOR (APhoenixRodHefty, Heretic, 23, 162)
PROP_Inventory_Amount (AMMO_PHRD_HEFTY)
PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0)
END_DEFAULTS
// Phoenix Rod -------------------------------------------------------------- // Phoenix Rod --------------------------------------------------------------
class APhoenixRod : public AHereticWeapon class APhoenixRod : public AHereticWeapon
@ -2936,10 +2590,6 @@ public:
Super::Serialize (arc); Super::Serialize (arc);
arc << FlameCount; arc << FlameCount;
} }
const char *PickupMessage ()
{
return GStrings("TXT_WPNPHOENIXROD");
}
int FlameCount; // for flamethrower duration int FlameCount; // for flamethrower duration
}; };
@ -2996,6 +2646,7 @@ IMPLEMENT_ACTOR (APhoenixRod, Heretic, 2003, 29)
PROP_Weapon_AmmoType1 ("PhoenixRodAmmo") PROP_Weapon_AmmoType1 ("PhoenixRodAmmo")
PROP_Weapon_SisterType ("PhoenixRodPowered") PROP_Weapon_SisterType ("PhoenixRodPowered")
PROP_Weapon_ProjectileType ("PhoenixFX1") PROP_Weapon_ProjectileType ("PhoenixFX1")
PROP_Inventory_PickupMessage("$TXT_WPNPHOENIXROD")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_STATELESS_ACTOR (APhoenixRodPowered, Heretic, -1, 0) IMPLEMENT_STATELESS_ACTOR (APhoenixRodPowered, Heretic, -1, 0)
@ -3310,25 +2961,3 @@ void A_FloatPuff (AActor *puff)
puff->momz += FRACUNIT*18/10; puff->momz += FRACUNIT*18/10;
} }
// --- Bag of holding -------------------------------------------------------
class ABagOfHolding : public ABackpack
{
DECLARE_ACTOR (ABagOfHolding, ABackpack)
protected:
const char *PickupMessage ()
{
return GStrings("TXT_ITEMBAGOFHOLDING");
}
};
FState ABagOfHolding::States[] =
{
S_NORMAL (BAGH, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (ABagOfHolding, Heretic, 8, 136)
PROP_Flags (MF_SPECIAL|MF_COUNTITEM)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (0)
END_DEFAULTS

View file

@ -23,8 +23,6 @@ class AIronlich : public AActor
DECLARE_ACTOR (AIronlich, AActor) DECLARE_ACTOR (AIronlich, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
const char *GetHitObituary ();
}; };
FState AIronlich::States[] = FState AIronlich::States[] =
@ -76,6 +74,8 @@ IMPLEMENT_ACTOR (AIronlich, Heretic, 6, 20)
PROP_PainSound ("ironlich/pain") PROP_PainSound ("ironlich/pain")
PROP_DeathSound ("ironlich/death") PROP_DeathSound ("ironlich/death")
PROP_ActiveSound ("ironlich/active") PROP_ActiveSound ("ironlich/active")
PROP_Obituary("$OB_IRONLICH")
PROP_HitObituary("$OB_IRONLICHHIT")
END_DEFAULTS END_DEFAULTS
void AIronlich::NoBlockingSet () void AIronlich::NoBlockingSet ()
@ -84,16 +84,6 @@ void AIronlich::NoBlockingSet ()
P_DropItem (this, "ArtiEgg", 0, 51); P_DropItem (this, "ArtiEgg", 0, 51);
} }
const char *AIronlich::GetObituary ()
{
return GStrings("OB_IRONLICH");
}
const char *AIronlich::GetHitObituary ()
{
return GStrings("OB_IRONLICHHIT");
}
// Head FX 1 ---------------------------------------------------------------- // Head FX 1 ----------------------------------------------------------------
class AHeadFX1 : public AActor class AHeadFX1 : public AActor

View file

@ -22,8 +22,6 @@ class AKnight : public AActor
DECLARE_ACTOR (AKnight, AActor) DECLARE_ACTOR (AKnight, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
const char *GetHitObituary ();
}; };
FState AKnight::States[] = FState AKnight::States[] =
@ -82,6 +80,8 @@ IMPLEMENT_ACTOR (AKnight, Heretic, 64, 6)
PROP_PainSound ("hknight/pain") PROP_PainSound ("hknight/pain")
PROP_DeathSound ("hknight/death") PROP_DeathSound ("hknight/death")
PROP_ActiveSound ("hknight/active") PROP_ActiveSound ("hknight/active")
PROP_Obituary("$OB_BONEKNIGHT")
PROP_HitObituary("$OB_BONEKNIGHTHIT")
END_DEFAULTS END_DEFAULTS
void AKnight::NoBlockingSet () void AKnight::NoBlockingSet ()
@ -89,16 +89,6 @@ void AKnight::NoBlockingSet ()
P_DropItem (this, "CrossbowAmmo", 5, 84); P_DropItem (this, "CrossbowAmmo", 5, 84);
} }
const char *AKnight::GetObituary ()
{
return GStrings("OB_BONEKNIGHT");
}
const char *AKnight::GetHitObituary ()
{
return GStrings("OB_BONEKNIGHTHIT");
}
// Knight ghost ------------------------------------------------------------- // Knight ghost -------------------------------------------------------------
class AKnightGhost : public AKnight class AKnightGhost : public AKnight

View file

@ -23,7 +23,6 @@ class AMummy : public AActor
DECLARE_ACTOR (AMummy, AActor) DECLARE_ACTOR (AMummy, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetHitObituary ();
}; };
FState AMummy::States[] = FState AMummy::States[] =
@ -79,6 +78,7 @@ IMPLEMENT_ACTOR (AMummy, Heretic, 68, 4)
PROP_PainSound ("mummy/pain") PROP_PainSound ("mummy/pain")
PROP_DeathSound ("mummy/death") PROP_DeathSound ("mummy/death")
PROP_ActiveSound ("mummy/active") PROP_ActiveSound ("mummy/active")
PROP_HitObituary("$OB_MUMMY")
END_DEFAULTS END_DEFAULTS
void AMummy::NoBlockingSet () void AMummy::NoBlockingSet ()
@ -86,18 +86,11 @@ void AMummy::NoBlockingSet ()
P_DropItem (this, "GoldWandAmmo", 3, 84); P_DropItem (this, "GoldWandAmmo", 3, 84);
} }
const char *AMummy::GetHitObituary ()
{
return GStrings("OB_MUMMY");
}
// Mummy leader ------------------------------------------------------------- // Mummy leader -------------------------------------------------------------
class AMummyLeader : public AMummy class AMummyLeader : public AMummy
{ {
DECLARE_ACTOR (AMummyLeader, AMummy) DECLARE_ACTOR (AMummyLeader, AMummy)
public:
const char *GetObituary ();
}; };
FState AMummyLeader::States[] = FState AMummyLeader::States[] =
@ -116,13 +109,9 @@ IMPLEMENT_ACTOR (AMummyLeader, Heretic, 45, 2)
PROP_SpawnHealth (100) PROP_SpawnHealth (100)
PROP_PainChance (64) PROP_PainChance (64)
PROP_MissileState (S_MUMMYL_ATK) PROP_MissileState (S_MUMMYL_ATK)
PROP_Obituary("$OB_MUMMYLEADER")
END_DEFAULTS END_DEFAULTS
const char *AMummyLeader::GetObituary ()
{
return GStrings("OB_MUMMYLEADER");
}
// Mummy ghost -------------------------------------------------------------- // Mummy ghost --------------------------------------------------------------
class AMummyGhost : public AMummy class AMummyGhost : public AMummy

View file

@ -17,7 +17,6 @@ class ASnake : public AActor
DECLARE_ACTOR (ASnake, AActor) DECLARE_ACTOR (ASnake, AActor)
public: public:
void NoBlockingSet (); void NoBlockingSet ();
const char *GetObituary ();
}; };
FState ASnake::States[] = FState ASnake::States[] =
@ -80,13 +79,9 @@ IMPLEMENT_ACTOR (ASnake, Heretic, 92, 132)
PROP_PainSound ("snake/pain") PROP_PainSound ("snake/pain")
PROP_DeathSound ("snake/death") PROP_DeathSound ("snake/death")
PROP_ActiveSound ("snake/active") PROP_ActiveSound ("snake/active")
PROP_Obituary("$OB_SNAKE")
END_DEFAULTS END_DEFAULTS
const char *ASnake::GetObituary ()
{
return GStrings("OB_SNAKE");
}
// Snake projectile A ------------------------------------------------------- // Snake projectile A -------------------------------------------------------
class ASnakeProjA : public AActor class ASnakeProjA : public AActor

View file

@ -81,6 +81,8 @@ IMPLEMENT_ACTOR (AWizard, Heretic, 15, 19)
PROP_PainSound ("wizard/pain") PROP_PainSound ("wizard/pain")
PROP_DeathSound ("wizard/death") PROP_DeathSound ("wizard/death")
PROP_ActiveSound ("wizard/active") PROP_ActiveSound ("wizard/active")
PROP_Obituary("$OB_WIZARD")
PROP_HitObituary("$OB_WIZARDHIT")
END_DEFAULTS END_DEFAULTS
void AWizard::NoBlockingSet () void AWizard::NoBlockingSet ()
@ -89,16 +91,6 @@ void AWizard::NoBlockingSet ()
P_DropItem (this, "ArtiTomeOfPower", 0, 4); P_DropItem (this, "ArtiTomeOfPower", 0, 4);
} }
const char *AWizard::GetObituary ()
{
return GStrings("OB_WIZARD");
}
const char *AWizard::GetHitObituary ()
{
return GStrings("OB_WIZARDHIT");
}
class AWizardFX1 : public AActor class AWizardFX1 : public AActor
{ {
DECLARE_ACTOR (AWizardFX1, AActor) DECLARE_ACTOR (AWizardFX1, AActor)

View file

@ -17,7 +17,6 @@ class AArtiBlastRadius : public AInventory
DECLARE_ACTOR (AArtiBlastRadius, AInventory) DECLARE_ACTOR (AArtiBlastRadius, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
protected: protected:
void BlastActor (AActor *victim, fixed_t strength); void BlastActor (AActor *victim, fixed_t strength);
}; };
@ -41,13 +40,9 @@ IMPLEMENT_ACTOR (AArtiBlastRadius, Hexen, 10110, 74)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIBLST") PROP_Inventory_Icon ("ARTIBLST")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIBLASTRADIUS")
END_DEFAULTS END_DEFAULTS
const char *AArtiBlastRadius::PickupMessage ()
{
return GStrings("TXT_ARTIBLASTRADIUS");
}
// Blast Effect ------------------------------------------------------------- // Blast Effect -------------------------------------------------------------
class ABlastEffect : public AActor class ABlastEffect : public AActor

View file

@ -13,7 +13,6 @@ class AArtiBoostArmor : public AInventory
DECLARE_ACTOR (AArtiBoostArmor, AInventory) DECLARE_ACTOR (AArtiBoostArmor, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiBoostArmor::States[] = FState AArtiBoostArmor::States[] =
@ -37,6 +36,7 @@ IMPLEMENT_ACTOR (AArtiBoostArmor, Hexen, 8041, 22)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIBRAC") PROP_Inventory_Icon ("ARTIBRAC")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIBOOSTARMOR")
END_DEFAULTS END_DEFAULTS
bool AArtiBoostArmor::Use (bool pickup) bool AArtiBoostArmor::Use (bool pickup)
@ -82,7 +82,3 @@ bool AArtiBoostArmor::Use (bool pickup)
} }
} }
const char *AArtiBoostArmor::PickupMessage ()
{
return GStrings("TXT_ARTIBOOSTARMOR");
}

View file

@ -27,11 +27,6 @@ void A_CFlameMissile (AActor *);
class ACWeapFlame : public AClericWeapon class ACWeapFlame : public AClericWeapon
{ {
DECLARE_ACTOR (ACWeapFlame, AClericWeapon) DECLARE_ACTOR (ACWeapFlame, AClericWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_C3");
}
}; };
FState ACWeapFlame::States[] = FState ACWeapFlame::States[] =
@ -94,6 +89,7 @@ IMPLEMENT_ACTOR (ACWeapFlame, Hexen, 8009, 0)
PROP_Weapon_MoveCombatDist (27000000) PROP_Weapon_MoveCombatDist (27000000)
PROP_Weapon_AmmoType1 ("Mana2") PROP_Weapon_AmmoType1 ("Mana2")
PROP_Weapon_ProjectileType ("CFlameMissile") PROP_Weapon_ProjectileType ("CFlameMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_C3")
END_DEFAULTS END_DEFAULTS
// Floor Flame -------------------------------------------------------------- // Floor Flame --------------------------------------------------------------

View file

@ -29,7 +29,7 @@ void A_CHolyPalette (AActor *);
void SpawnSpiritTail (AActor *spirit); void SpawnSpiritTail (AActor *spirit);
//========================================================================== //==========================================================================
class AClericWeaponPiece : public AFourthWeaponPiece class AClericWeaponPiece : public AFourthWeaponPiece
{ {
@ -38,15 +38,11 @@ public:
void BeginPlay (); void BeginPlay ();
protected: protected:
bool MatchPlayerClass (AActor *toucher); bool MatchPlayerClass (AActor *toucher);
const char *PieceMessage ();
}; };
IMPLEMENT_ABSTRACT_ACTOR (AClericWeaponPiece) IMPLEMENT_STATELESS_ACTOR (AClericWeaponPiece, Hexen, -1, 0)
PROP_Inventory_PickupMessage("$TXT_WRAITHVERGE_PIECE")
const char *AClericWeaponPiece::PieceMessage () END_DEFAULTS
{
return GStrings("TXT_WRAITHVERGE_PIECE");
}
bool AClericWeaponPiece::MatchPlayerClass (AActor *toucher) bool AClericWeaponPiece::MatchPlayerClass (AActor *toucher)
{ {
@ -54,7 +50,7 @@ bool AClericWeaponPiece::MatchPlayerClass (AActor *toucher)
!toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer)); !toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer));
} }
//========================================================================== //==========================================================================
class ACWeaponPiece1 : public AClericWeaponPiece class ACWeaponPiece1 : public AClericWeaponPiece
{ {
@ -80,7 +76,7 @@ void ACWeaponPiece1::BeginPlay ()
PieceValue = WPIECE1<<3; PieceValue = WPIECE1<<3;
} }
//========================================================================== //==========================================================================
class ACWeaponPiece2 : public AClericWeaponPiece class ACWeaponPiece2 : public AClericWeaponPiece
{ {
@ -106,7 +102,7 @@ void ACWeaponPiece2::BeginPlay ()
PieceValue = WPIECE2<<3; PieceValue = WPIECE2<<3;
} }
//========================================================================== //==========================================================================
class ACWeaponPiece3 : public AClericWeaponPiece class ACWeaponPiece3 : public AClericWeaponPiece
{ {
@ -164,10 +160,6 @@ public:
Super::Serialize (arc); Super::Serialize (arc);
arc << CHolyCount; arc << CHolyCount;
} }
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_C4");
}
PalEntry GetBlend () PalEntry GetBlend ()
{ {
return PalEntry (CHolyCount * 128 / 3, 131, 131, 131); return PalEntry (CHolyCount * 128 / 3, 131, 131, 131);
@ -221,6 +213,7 @@ IMPLEMENT_ACTOR (ACWeapWraithverge, Hexen, -1, 0)
PROP_Weapon_AmmoType1 ("Mana1") PROP_Weapon_AmmoType1 ("Mana1")
PROP_Weapon_AmmoType2 ("Mana2") PROP_Weapon_AmmoType2 ("Mana2")
PROP_Weapon_ProjectileType ("HolyMissile") PROP_Weapon_ProjectileType ("HolyMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_C4")
END_DEFAULTS END_DEFAULTS
// Holy Missile ------------------------------------------------------------- // Holy Missile -------------------------------------------------------------

View file

@ -25,11 +25,6 @@ void A_CStaffMissileSlither (AActor *);
class ACWeapStaff : public AClericWeapon class ACWeapStaff : public AClericWeapon
{ {
DECLARE_ACTOR (ACWeapStaff, AClericWeapon) DECLARE_ACTOR (ACWeapStaff, AClericWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_C2");
}
}; };
FState ACWeapStaff::States[] = FState ACWeapStaff::States[] =
@ -99,6 +94,7 @@ IMPLEMENT_ACTOR (ACWeapStaff, Hexen, 10, 32)
PROP_Weapon_MoveCombatDist (25000000) PROP_Weapon_MoveCombatDist (25000000)
PROP_Weapon_AmmoType1 ("Mana1") PROP_Weapon_AmmoType1 ("Mana1")
PROP_Weapon_ProjectileType ("CStaffMissile") PROP_Weapon_ProjectileType ("CStaffMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_C2")
END_DEFAULTS END_DEFAULTS
// Serpent Staff Missile ---------------------------------------------------- // Serpent Staff Missile ----------------------------------------------------

View file

@ -39,11 +39,6 @@ public:
FState *GetReadyState (); FState *GetReadyState ();
FState *GetAtkState (); FState *GetAtkState ();
FState *GetHoldAtkState (); FState *GetHoldAtkState ();
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_F2");
}
}; };
FState AFWeapAxe::States[] = FState AFWeapAxe::States[] =
@ -175,6 +170,7 @@ IMPLEMENT_ACTOR (AAxePuff, Hexen, -1, 0)
PROP_SeeSound ("FighterAxeHitThing") PROP_SeeSound ("FighterAxeHitThing")
PROP_AttackSound ("FighterHammerHitWall") PROP_AttackSound ("FighterHammerHitWall")
PROP_ActiveSound ("FighterHammerMiss") PROP_ActiveSound ("FighterHammerMiss")
PROP_Inventory_PickupMessage("$TXT_WEAPON_F2")
END_DEFAULTS END_DEFAULTS
// Glowing Axe Puff --------------------------------------------------------- // Glowing Axe Puff ---------------------------------------------------------

View file

@ -27,11 +27,6 @@ void A_BeAdditive (AActor *);
class AFWeapHammer : public AFighterWeapon class AFWeapHammer : public AFighterWeapon
{ {
DECLARE_ACTOR (AFWeapHammer, AFighterWeapon) DECLARE_ACTOR (AFWeapHammer, AFighterWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_F3");
}
}; };
FState AFWeapHammer::States[] = FState AFWeapHammer::States[] =
@ -82,6 +77,7 @@ IMPLEMENT_ACTOR (AFWeapHammer, Hexen, 123, 28)
PROP_Weapon_MoveCombatDist (22000000) PROP_Weapon_MoveCombatDist (22000000)
PROP_Weapon_AmmoType1 ("Mana2") PROP_Weapon_AmmoType1 ("Mana2")
PROP_Weapon_ProjectileType ("HammerMissile") PROP_Weapon_ProjectileType ("HammerMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_F3")
END_DEFAULTS END_DEFAULTS
// Hammer Missile ----------------------------------------------------------- // Hammer Missile -----------------------------------------------------------

View file

@ -17,7 +17,7 @@ void A_FSwordAttack (AActor *actor);
void A_DropQuietusPieces (AActor *); void A_DropQuietusPieces (AActor *);
void A_FSwordFlames (AActor *); void A_FSwordFlames (AActor *);
//========================================================================== //==========================================================================
class AFighterWeaponPiece : public AFourthWeaponPiece class AFighterWeaponPiece : public AFourthWeaponPiece
{ {
@ -26,15 +26,11 @@ public:
void BeginPlay (); void BeginPlay ();
protected: protected:
bool MatchPlayerClass (AActor *toucher); bool MatchPlayerClass (AActor *toucher);
const char *PieceMessage ();
}; };
IMPLEMENT_ABSTRACT_ACTOR (AFighterWeaponPiece) IMPLEMENT_STATELESS_ACTOR (AFighterWeaponPiece, Hexen, -1, 0)
PROP_Inventory_PickupMessage("$TXT_QUIETUS_PIECE")
const char *AFighterWeaponPiece::PieceMessage () END_DEFAULTS
{
return GStrings("TXT_QUIETUS_PIECE");
}
bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher) bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher)
{ {
@ -42,8 +38,8 @@ bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher)
!toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer)); !toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer));
} }
//========================================================================== //==========================================================================
class AFWeaponPiece1 : public AFighterWeaponPiece class AFWeaponPiece1 : public AFighterWeaponPiece
{ {
DECLARE_ACTOR (AFWeaponPiece1, AFighterWeaponPiece) DECLARE_ACTOR (AFWeaponPiece1, AFighterWeaponPiece)
@ -68,7 +64,7 @@ void AFWeaponPiece1::BeginPlay ()
PieceValue = WPIECE1; PieceValue = WPIECE1;
} }
//========================================================================== //==========================================================================
class AFWeaponPiece2 : public AFighterWeaponPiece class AFWeaponPiece2 : public AFighterWeaponPiece
{ {
@ -94,7 +90,7 @@ void AFWeaponPiece2::BeginPlay ()
PieceValue = WPIECE2; PieceValue = WPIECE2;
} }
//========================================================================== //==========================================================================
class AFWeaponPiece3 : public AFighterWeaponPiece class AFWeaponPiece3 : public AFighterWeaponPiece
{ {
@ -145,11 +141,6 @@ END_DEFAULTS
class AFWeapQuietus : public AFighterWeapon class AFWeapQuietus : public AFighterWeapon
{ {
DECLARE_ACTOR (AFWeapQuietus, AFighterWeapon) DECLARE_ACTOR (AFWeapQuietus, AFighterWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_F4");
}
}; };
FState AFWeapQuietus::States[] = FState AFWeapQuietus::States[] =
@ -213,6 +204,7 @@ IMPLEMENT_ACTOR (AFWeapQuietus, Hexen, -1, 0)
PROP_Weapon_AmmoType1 ("Mana1") PROP_Weapon_AmmoType1 ("Mana1")
PROP_Weapon_AmmoType2 ("Mana2") PROP_Weapon_AmmoType2 ("Mana2")
PROP_Weapon_ProjectileType ("FSwordMissile") PROP_Weapon_ProjectileType ("FSwordMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_F4")
END_DEFAULTS END_DEFAULTS
// Fighter Sword Missile ---------------------------------------------------- // Fighter Sword Missile ----------------------------------------------------
@ -294,14 +286,14 @@ IMPLEMENT_ACTOR (AFSwordFlame, Hexen, -1, 0)
END_DEFAULTS END_DEFAULTS
//============================================================================ //============================================================================
// //
// A_FSwordAttack // A_FSwordAttack
// //
//============================================================================ //============================================================================
void A_FSwordAttack (AActor *actor) void A_FSwordAttack (AActor *actor)
{ {
player_t *player; player_t *player;
if (NULL == (player = actor->player)) if (NULL == (player = actor->player))
@ -314,13 +306,13 @@ void A_FSwordAttack (AActor *actor)
if (!weapon->DepleteAmmo (weapon->bAltFire)) if (!weapon->DepleteAmmo (weapon->bAltFire))
return; return;
} }
P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z-10*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle+ANGLE_45/4); P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z-10*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle+ANGLE_45/4);
P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z-5*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle+ANGLE_45/8); P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z-5*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle+ANGLE_45/8);
P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z, RUNTIME_CLASS(AFSwordMissile), actor->angle); P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z, RUNTIME_CLASS(AFSwordMissile), actor->angle);
P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z+5*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle-ANGLE_45/8); P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z+5*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle-ANGLE_45/8);
P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z+10*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle-ANGLE_45/4); P_SpawnPlayerMissile (actor, actor->x, actor->y, actor->z+10*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle-ANGLE_45/4);
S_Sound (actor, CHAN_WEAPON, "FighterSwordFire", 1, ATTN_NORM); S_Sound (actor, CHAN_WEAPON, "FighterSwordFire", 1, ATTN_NORM);
} }
//============================================================================ //============================================================================
// //

View file

@ -146,7 +146,6 @@ class AArtiPoisonBag : public AInventory
public: public:
bool HandlePickup (AInventory *item); bool HandlePickup (AInventory *item);
AInventory *CreateCopy (AActor *other); AInventory *CreateCopy (AActor *other);
const char *PickupMessage ();
void BeginPlay (); void BeginPlay ();
}; };
@ -163,6 +162,7 @@ IMPLEMENT_ACTOR (AArtiPoisonBag, Hexen, 8000, 72)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIPSBG") PROP_Inventory_Icon ("ARTIPSBG")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIPOISONBAG")
END_DEFAULTS END_DEFAULTS
// Poison Bag 1 (The Cleric's) ---------------------------------------------- // Poison Bag 1 (The Cleric's) ----------------------------------------------
@ -346,17 +346,6 @@ AInventory *AArtiPoisonBag::CreateCopy (AActor *other)
return copy; return copy;
} }
//============================================================================
//
// AArtiPoisonBag :: PickupMessage
//
//============================================================================
const char *AArtiPoisonBag::PickupMessage ()
{
return GStrings("TXT_ARTIPOISONBAG");
}
//============================================================================ //============================================================================
// //
// AArtiPoisonBag :: BeginPlay // AArtiPoisonBag :: BeginPlay

View file

@ -10,7 +10,7 @@
#include "a_hexenglobal.h" #include "a_hexenglobal.h"
#include "gi.h" #include "gi.h"
#define HEAL_RADIUS_DIST 255*FRACUNIT #define HEAL_RADIUS_DIST 255*FRACUNIT
// Healing Radius Artifact -------------------------------------------------- // Healing Radius Artifact --------------------------------------------------
@ -19,7 +19,6 @@ class AArtiHealingRadius : public AInventory
DECLARE_ACTOR (AArtiHealingRadius, AInventory) DECLARE_ACTOR (AArtiHealingRadius, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiHealingRadius::States[] = FState AArtiHealingRadius::States[] =
@ -50,6 +49,7 @@ IMPLEMENT_ACTOR (AArtiHealingRadius, Hexen, 10120, 0)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIHRAD") PROP_Inventory_Icon ("ARTIHRAD")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIHEALINGRADIUS")
END_DEFAULTS END_DEFAULTS
bool AArtiHealingRadius::Use (bool pickup) bool AArtiHealingRadius::Use (bool pickup)
@ -69,8 +69,3 @@ bool AArtiHealingRadius::Use (bool pickup)
return effective; return effective;
} }
const char *AArtiHealingRadius::PickupMessage ()
{
return GStrings("TXT_ARTIHEALINGRADIUS");
}

View file

@ -71,7 +71,6 @@ public:
void PlayPickupSound (AActor *toucher); void PlayPickupSound (AActor *toucher);
protected: protected:
virtual bool MatchPlayerClass (AActor *toucher); virtual bool MatchPlayerClass (AActor *toucher);
virtual const char *PieceMessage ();
const PClass *FourthWeaponClass; const PClass *FourthWeaponClass;
int PieceValue; int PieceValue;
AInventory *TempFourthWeapon; AInventory *TempFourthWeapon;
@ -135,20 +134,6 @@ public:
bool TryPickup (AActor *toucher); bool TryPickup (AActor *toucher);
}; };
class AMana1 : public AAmmo
{
DECLARE_ACTOR (AMana1, AAmmo)
public:
const char *PickupMessage ();
};
class AMana2 : public AAmmo
{
DECLARE_ACTOR (AMana2, AAmmo)
public:
const char *PickupMessage ();
};
class ASwitchableDecoration : public AActor class ASwitchableDecoration : public AActor
{ {
DECLARE_STATELESS_ACTOR (ASwitchableDecoration, AActor) DECLARE_STATELESS_ACTOR (ASwitchableDecoration, AActor)

View file

@ -26,11 +26,6 @@ void A_ShedShard (AActor *);
class AMWeapFrost : public AMageWeapon class AMWeapFrost : public AMageWeapon
{ {
DECLARE_ACTOR (AMWeapFrost, AMageWeapon) DECLARE_ACTOR (AMWeapFrost, AMageWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_M2");
}
}; };
FState AMWeapFrost::States[] = FState AMWeapFrost::States[] =
@ -78,6 +73,7 @@ IMPLEMENT_ACTOR (AMWeapFrost, Hexen, 53, 36)
PROP_Weapon_MoveCombatDist (19000000) PROP_Weapon_MoveCombatDist (19000000)
PROP_Weapon_AmmoType1 ("Mana1") PROP_Weapon_AmmoType1 ("Mana1")
PROP_Weapon_ProjectileType ("FrostMissile") PROP_Weapon_ProjectileType ("FrostMissile")
PROP_Inventory_PickupMessage("$TXT_WEAPON_M2")
END_DEFAULTS END_DEFAULTS
// Frost Missile ------------------------------------------------------------ // Frost Missile ------------------------------------------------------------

View file

@ -34,11 +34,6 @@ void A_FreeTargMobj (AActor *);
class AMWeapLightning : public AMageWeapon class AMWeapLightning : public AMageWeapon
{ {
DECLARE_ACTOR (AMWeapLightning, AMageWeapon) DECLARE_ACTOR (AMWeapLightning, AMageWeapon)
public:
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_M3");
}
}; };
FState AMWeapLightning::States[] = FState AMWeapLightning::States[] =
@ -116,6 +111,7 @@ IMPLEMENT_ACTOR (AMWeapLightning, Hexen, 8040, 0)
PROP_Weapon_MoveCombatDist (23000000) PROP_Weapon_MoveCombatDist (23000000)
PROP_Weapon_AmmoType1 ("Mana2") PROP_Weapon_AmmoType1 ("Mana2")
PROP_Weapon_ProjectileType ("LightningFloor") PROP_Weapon_ProjectileType ("LightningFloor")
PROP_Inventory_PickupMessage("$TXT_WEAPON_M3")
END_DEFAULTS END_DEFAULTS
// Lightning ---------------------------------------------------------------- // Lightning ----------------------------------------------------------------

View file

@ -165,8 +165,8 @@ bool AMagePlayer::DoHealingRadius (APlayerPawn *other)
{ {
int amount = 50 + (pr_manaradius() % 50); int amount = 50 + (pr_manaradius() % 50);
if (GiveAmmo (RUNTIME_CLASS(AMana1), amount) || if (GiveAmmo (PClass::FindClass("Mana1"), amount) ||
GiveAmmo (RUNTIME_CLASS(AMana2), amount)) GiveAmmo (PClass::FindClass("Mana2"), amount))
{ {
S_Sound (other, CHAN_AUTO, "MysticIncant", 1, ATTN_NORM); S_Sound (other, CHAN_AUTO, "MysticIncant", 1, ATTN_NORM);
return true; return true;

View file

@ -18,7 +18,7 @@ void A_MStaffPalette (AActor *actor);
static AActor *FrontBlockCheck (AActor *mo, int index); static AActor *FrontBlockCheck (AActor *mo, int index);
static divline_t BlockCheckLine; static divline_t BlockCheckLine;
//========================================================================== //==========================================================================
class AMageWeaponPiece : public AFourthWeaponPiece class AMageWeaponPiece : public AFourthWeaponPiece
{ {
@ -27,15 +27,11 @@ public:
void BeginPlay (); void BeginPlay ();
protected: protected:
bool MatchPlayerClass (AActor *toucher); bool MatchPlayerClass (AActor *toucher);
const char *PieceMessage ();
}; };
IMPLEMENT_ABSTRACT_ACTOR (AMageWeaponPiece) IMPLEMENT_STATELESS_ACTOR (AMageWeaponPiece, Hexen, -1, 0)
PROP_Inventory_PickupMessage("$TXT_BLOODSCOURGE_PIECE")
const char *AMageWeaponPiece::PieceMessage () END_DEFAULTS
{
return GStrings("TXT_BLOODSCOURGE_PIECE");
}
bool AMageWeaponPiece::MatchPlayerClass (AActor *toucher) bool AMageWeaponPiece::MatchPlayerClass (AActor *toucher)
{ {
@ -43,7 +39,7 @@ bool AMageWeaponPiece::MatchPlayerClass (AActor *toucher)
!toucher->IsKindOf (RUNTIME_CLASS(AClericPlayer)); !toucher->IsKindOf (RUNTIME_CLASS(AClericPlayer));
} }
//========================================================================== //==========================================================================
class AMWeaponPiece1 : public AMageWeaponPiece class AMWeaponPiece1 : public AMageWeaponPiece
{ {
@ -69,7 +65,7 @@ void AMWeaponPiece1::BeginPlay ()
PieceValue = WPIECE1<<6; PieceValue = WPIECE1<<6;
} }
//========================================================================== //==========================================================================
class AMWeaponPiece2 : public AMageWeaponPiece class AMWeaponPiece2 : public AMageWeaponPiece
{ {
@ -95,7 +91,7 @@ void AMWeaponPiece2::BeginPlay ()
PieceValue = WPIECE2<<6; PieceValue = WPIECE2<<6;
} }
//========================================================================== //==========================================================================
class AMWeaponPiece3 : public AMageWeaponPiece class AMWeaponPiece3 : public AMageWeaponPiece
{ {
@ -152,10 +148,6 @@ public:
Super::Serialize (arc); Super::Serialize (arc);
arc << MStaffCount; arc << MStaffCount;
} }
const char *PickupMessage ()
{
return GStrings("TXT_WEAPON_M4");
}
PalEntry GetBlend () PalEntry GetBlend ()
{ {
return PalEntry (MStaffCount * 128 / 3, 151, 110, 0); return PalEntry (MStaffCount * 128 / 3, 151, 110, 0);
@ -240,6 +232,7 @@ IMPLEMENT_ACTOR (AMWeapBloodscourge, Hexen, -1, 0)
PROP_Weapon_AmmoType1 ("Mana1") PROP_Weapon_AmmoType1 ("Mana1")
PROP_Weapon_AmmoType2 ("Mana2") PROP_Weapon_AmmoType2 ("Mana2")
PROP_Weapon_ProjectileType ("MageStaffFX2") PROP_Weapon_ProjectileType ("MageStaffFX2")
PROP_Inventory_PickupMessage("$TXT_WEAPON_M4")
END_DEFAULTS END_DEFAULTS
// Mage Staff FX2 (Bloodscourge) -------------------------------------------- // Mage Staff FX2 (Bloodscourge) --------------------------------------------
@ -404,30 +397,30 @@ void MStaffSpawn (AActor *pmo, angle_t angle)
} }
} }
//============================================================================ //============================================================================
// //
// A_MStaffAttack // A_MStaffAttack
// //
//============================================================================ //============================================================================
void A_MStaffAttack (AActor *actor) void A_MStaffAttack (AActor *actor)
{ {
angle_t angle; angle_t angle;
player_t *player; player_t *player;
if (NULL == (player = actor->player)) if (NULL == (player = actor->player))
{ {
return; return;
} }
AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon); AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon);
if (weapon != NULL) if (weapon != NULL)
{ {
if (!weapon->DepleteAmmo (weapon->bAltFire)) if (!weapon->DepleteAmmo (weapon->bAltFire))
return; return;
} }
angle = actor->angle; angle = actor->angle;
// [RH] Let's try and actually track what the player aimed at // [RH] Let's try and actually track what the player aimed at
P_AimLineAttack (actor, angle, PLAYERMISSILERANGE, ANGLE_1*32); P_AimLineAttack (actor, angle, PLAYERMISSILERANGE, ANGLE_1*32);
if (linetarget == NULL) if (linetarget == NULL)
@ -438,29 +431,29 @@ void A_MStaffAttack (AActor *actor)
BlockCheckLine.dy = -finecosine[angle >> ANGLETOFINESHIFT]; BlockCheckLine.dy = -finecosine[angle >> ANGLETOFINESHIFT];
linetarget = P_BlockmapSearch (actor, 10, FrontBlockCheck); linetarget = P_BlockmapSearch (actor, 10, FrontBlockCheck);
} }
MStaffSpawn (actor, angle); MStaffSpawn (actor, angle);
MStaffSpawn (actor, angle-ANGLE_1*5); MStaffSpawn (actor, angle-ANGLE_1*5);
MStaffSpawn (actor, angle+ANGLE_1*5); MStaffSpawn (actor, angle+ANGLE_1*5);
S_Sound (actor, CHAN_WEAPON, "MageStaffFire", 1, ATTN_NORM); S_Sound (actor, CHAN_WEAPON, "MageStaffFire", 1, ATTN_NORM);
weapon->MStaffCount = 3; weapon->MStaffCount = 3;
} }
//============================================================================ //============================================================================
// //
// A_MStaffPalette // A_MStaffPalette
// //
//============================================================================ //============================================================================
void A_MStaffPalette (AActor *actor) void A_MStaffPalette (AActor *actor)
{ {
if (actor->player != NULL) if (actor->player != NULL)
{ {
AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon); AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon);
if (weapon != NULL && weapon->MStaffCount != 0) if (weapon != NULL && weapon->MStaffCount != 0)
{ {
weapon->MStaffCount--; weapon->MStaffCount--;
} }
} }
} }
//============================================================================ //============================================================================

View file

@ -1,216 +0,0 @@
#include "a_pickups.h"
#include "a_hexenglobal.h"
#include "p_local.h"
#include "gstrings.h"
#include "s_sound.h"
// Blue mana ----------------------------------------------------------------
FState AMana1::States[] =
{
S_BRIGHT (MAN1, 'A', 4, NULL , &States[1]),
S_BRIGHT (MAN1, 'B', 4, NULL , &States[2]),
S_BRIGHT (MAN1, 'C', 4, NULL , &States[3]),
S_BRIGHT (MAN1, 'D', 4, NULL , &States[4]),
S_BRIGHT (MAN1, 'E', 4, NULL , &States[5]),
S_BRIGHT (MAN1, 'F', 4, NULL , &States[6]),
S_BRIGHT (MAN1, 'G', 4, NULL , &States[7]),
S_BRIGHT (MAN1, 'H', 4, NULL , &States[8]),
S_BRIGHT (MAN1, 'I', 4, NULL , &States[0]),
};
IMPLEMENT_ACTOR (AMana1, Hexen, 122, 11)
PROP_Inventory_Amount (15)
PROP_Inventory_MaxAmount (MAX_MANA)
PROP_Ammo_BackpackAmount (15)
PROP_Ammo_BackpackMaxAmount (MAX_MANA)
PROP_RadiusFixed (8)
PROP_HeightFixed (8)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (0)
PROP_Inventory_Icon ("MAN1I0")
END_DEFAULTS
const char *AMana1::PickupMessage ()
{
return GStrings("TXT_MANA_1");
}
// Green mana ---------------------------------------------------------------
FState AMana2::States[] =
{
S_BRIGHT (MAN2, 'A', 4, NULL , &States[1]),
S_BRIGHT (MAN2, 'B', 4, NULL , &States[2]),
S_BRIGHT (MAN2, 'C', 4, NULL , &States[3]),
S_BRIGHT (MAN2, 'D', 4, NULL , &States[4]),
S_BRIGHT (MAN2, 'E', 4, NULL , &States[5]),
S_BRIGHT (MAN2, 'F', 4, NULL , &States[6]),
S_BRIGHT (MAN2, 'G', 4, NULL , &States[7]),
S_BRIGHT (MAN2, 'H', 4, NULL , &States[8]),
S_BRIGHT (MAN2, 'I', 4, NULL , &States[9]),
S_BRIGHT (MAN2, 'J', 4, NULL , &States[10]),
S_BRIGHT (MAN2, 'K', 4, NULL , &States[11]),
S_BRIGHT (MAN2, 'L', 4, NULL , &States[12]),
S_BRIGHT (MAN2, 'M', 4, NULL , &States[13]),
S_BRIGHT (MAN2, 'N', 4, NULL , &States[14]),
S_BRIGHT (MAN2, 'O', 4, NULL , &States[15]),
S_BRIGHT (MAN2, 'P', 4, NULL , &States[0]),
};
IMPLEMENT_ACTOR (AMana2, Hexen, 124, 12)
PROP_Inventory_Amount (15)
PROP_Inventory_MaxAmount (MAX_MANA)
PROP_Ammo_BackpackAmount (15)
PROP_Ammo_BackpackMaxAmount (MAX_MANA)
PROP_RadiusFixed (8)
PROP_HeightFixed (8)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (0)
PROP_Inventory_Icon ("MAN2G0")
END_DEFAULTS
const char *AMana2::PickupMessage ()
{
return GStrings("TXT_MANA_2");
}
// Combined mana ------------------------------------------------------------
class AMana3 : public AAmmo
{
DECLARE_ACTOR (AMana3, AAmmo)
public:
bool TryPickup (AActor *other)
{
bool gave;
gave = GiveMana (other, RUNTIME_CLASS(AMana1));
gave |= GiveMana (other, RUNTIME_CLASS(AMana2));
if (gave)
{
GoAwayAndDie ();
}
return gave;
}
protected:
const char *PickupMessage ()
{
return GStrings("TXT_MANA_BOTH");
}
bool GiveMana (AActor *other, const PClass *type)
{
AInventory *mana = other->FindInventory (type);
if (mana == NULL)
{
mana = static_cast<AInventory *>(Spawn (type, 0, 0, 0));
mana->BecomeItem ();
mana->Amount = Amount;
other->AddInventory (mana);
return true;
}
else if (mana->Amount < mana->MaxAmount)
{
mana->Amount += Amount;
if (mana->Amount > mana->MaxAmount)
{
mana->Amount = mana->MaxAmount;
}
return true;
}
return false;
}
};
FState AMana3::States[] =
{
#define S_MANA3 0
S_BRIGHT (MAN3, 'A', 4, NULL , &States[S_MANA3+1]),
S_BRIGHT (MAN3, 'B', 4, NULL , &States[S_MANA3+2]),
S_BRIGHT (MAN3, 'C', 4, NULL , &States[S_MANA3+3]),
S_BRIGHT (MAN3, 'D', 4, NULL , &States[S_MANA3+4]),
S_BRIGHT (MAN3, 'E', 4, NULL , &States[S_MANA3+5]),
S_BRIGHT (MAN3, 'F', 4, NULL , &States[S_MANA3+6]),
S_BRIGHT (MAN3, 'G', 4, NULL , &States[S_MANA3+7]),
S_BRIGHT (MAN3, 'H', 4, NULL , &States[S_MANA3+8]),
S_BRIGHT (MAN3, 'I', 4, NULL , &States[S_MANA3+9]),
S_BRIGHT (MAN3, 'J', 4, NULL , &States[S_MANA3+10]),
S_BRIGHT (MAN3, 'K', 4, NULL , &States[S_MANA3+11]),
S_BRIGHT (MAN3, 'L', 4, NULL , &States[S_MANA3+12]),
S_BRIGHT (MAN3, 'M', 4, NULL , &States[S_MANA3+13]),
S_BRIGHT (MAN3, 'N', 4, NULL , &States[S_MANA3+14]),
S_BRIGHT (MAN3, 'O', 4, NULL , &States[S_MANA3+15]),
S_BRIGHT (MAN3, 'P', 4, NULL , &States[S_MANA3+0]),
};
IMPLEMENT_ACTOR (AMana3, Hexen, 8004, 75)
PROP_Inventory_Amount (20)
PROP_RadiusFixed (8)
PROP_HeightFixed (8)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (S_MANA3)
PROP_Inventory_Icon ("MAN3L0")
END_DEFAULTS
// Boost Mana Artifact (Krater of Might) ------------------------------------
class AArtiBoostMana : public AInventory
{
DECLARE_ACTOR (AArtiBoostMana, AInventory)
public:
bool Use (bool pickup);
const char *PickupMessage ();
protected:
bool FillMana (const PClass *type);
};
FState AArtiBoostMana::States[] =
{
S_BRIGHT (BMAN, 'A', -1, NULL , NULL),
};
IMPLEMENT_ACTOR (AArtiBoostMana, Hexen, 8003, 26)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (0)
PROP_Inventory_DefMaxAmount
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIBMAN")
PROP_Inventory_PickupSound ("misc/p_pkup")
END_DEFAULTS
bool AArtiBoostMana::Use (bool pickup)
{
bool success;
success = FillMana (RUNTIME_CLASS(AMana1));
success |= FillMana (RUNTIME_CLASS(AMana2));
return success;
}
bool AArtiBoostMana::FillMana (const PClass *type)
{
AInventory *mana = Owner->FindInventory (type);
if (mana == NULL)
{
mana = static_cast<AInventory *>(Spawn (type, 0, 0, 0));
mana->BecomeItem ();
mana->Amount = mana->MaxAmount;
Owner->AddInventory (mana);
return true;
}
else if (mana->Amount < mana->MaxAmount)
{
mana->Amount = mana->MaxAmount;
return true;
}
return false;
}
const char *AArtiBoostMana::PickupMessage ()
{
return GStrings("TXT_ARTIBOOSTMANA");
}

View file

@ -217,7 +217,6 @@ class APig : public AActor
DECLARE_ACTOR (APig, AActor) DECLARE_ACTOR (APig, AActor)
public: public:
void Destroy (); void Destroy ();
const char *GetObituary ();
void Die (AActor *source, AActor *inflictor); void Die (AActor *source, AActor *inflictor);
}; };
@ -288,12 +287,6 @@ void APig::Destroy ()
Super::Destroy (); Super::Destroy ();
} }
const char *APig::GetObituary ()
{
//return GStrings("OB_CHICKEN");
return Super::GetObituary ();
}
void APig::Die (AActor *source, AActor *inflictor) void APig::Die (AActor *source, AActor *inflictor)
{ {
Super::Die (source, inflictor); Super::Die (source, inflictor);
@ -303,104 +296,104 @@ void APig::Die (AActor *source, AActor *inflictor)
} }
} }
//============================================================================ //============================================================================
// //
// A_SnoutAttack // A_SnoutAttack
// //
//============================================================================ //============================================================================
void A_SnoutAttack (AActor *actor) void A_SnoutAttack (AActor *actor)
{ {
angle_t angle; angle_t angle;
int damage; int damage;
int slope; int slope;
player_t *player; player_t *player;
if (NULL == (player = actor->player)) if (NULL == (player = actor->player))
{ {
return; return;
} }
damage = 3+(pr_snoutattack()&3); damage = 3+(pr_snoutattack()&3);
angle = player->mo->angle; angle = player->mo->angle;
slope = P_AimLineAttack(player->mo, angle, MELEERANGE); slope = P_AimLineAttack(player->mo, angle, MELEERANGE);
PuffSpawned = NULL; PuffSpawned = NULL;
P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, MOD_HIT, RUNTIME_CLASS(ASnoutPuff)); P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, MOD_HIT, RUNTIME_CLASS(ASnoutPuff));
S_Sound(player->mo, CHAN_VOICE, "PigActive", 1, ATTN_NORM); S_Sound(player->mo, CHAN_VOICE, "PigActive", 1, ATTN_NORM);
if(linetarget) if(linetarget)
{ {
AdjustPlayerAngle(player->mo); AdjustPlayerAngle(player->mo);
if(PuffSpawned) if(PuffSpawned)
{ // Bit something { // Bit something
S_Sound(player->mo, CHAN_VOICE, "PigAttack", 1, ATTN_NORM); S_Sound(player->mo, CHAN_VOICE, "PigAttack", 1, ATTN_NORM);
} }
} }
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// //
// PROC A_PigLook // PROC A_PigLook
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void A_PigLook (AActor *actor) void A_PigLook (AActor *actor)
{ {
if (P_UpdateMorphedMonster (actor, 10)) if (P_UpdateMorphedMonster (actor, 10))
{ {
return; return;
} }
A_Look (actor); A_Look (actor);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// //
// PROC A_PigChase // PROC A_PigChase
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void A_PigChase (AActor *actor) void A_PigChase (AActor *actor)
{ {
if (P_UpdateMorphedMonster (actor, 3)) if (P_UpdateMorphedMonster (actor, 3))
{ {
return; return;
} }
A_Chase(actor); A_Chase(actor);
} }
//============================================================================ //============================================================================
// //
// A_PigAttack // A_PigAttack
// //
//============================================================================ //============================================================================
void A_PigAttack (AActor *actor) void A_PigAttack (AActor *actor)
{ {
if (P_UpdateMorphedMonster (actor, 18)) if (P_UpdateMorphedMonster (actor, 18))
{ {
return; return;
} }
if (!actor->target) if (!actor->target)
{ {
return; return;
} }
if (actor->CheckMeleeRange ()) if (actor->CheckMeleeRange ())
{ {
P_DamageMobj(actor->target, actor, actor, 2+(pr_pigattack()&1), MOD_HIT); P_DamageMobj(actor->target, actor, actor, 2+(pr_pigattack()&1), MOD_HIT);
S_Sound(actor, CHAN_WEAPON, "PigAttack", 1, ATTN_NORM); S_Sound(actor, CHAN_WEAPON, "PigAttack", 1, ATTN_NORM);
} }
} }
//============================================================================ //============================================================================
// //
// A_PigPain // A_PigPain
// //
//============================================================================ //============================================================================
void A_PigPain (AActor *actor) void A_PigPain (AActor *actor)
{ {
A_Pain (actor); A_Pain (actor);
if (actor->z <= actor->floorz) if (actor->z <= actor->floorz)
{ {
actor->momz = FRACUNIT*7/2; actor->momz = FRACUNIT*7/2;
} }
} }

View file

@ -16,7 +16,6 @@ class AArtiDarkServant : public AInventory
DECLARE_ACTOR (AArtiDarkServant, AInventory) DECLARE_ACTOR (AArtiDarkServant, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiDarkServant::States[] = FState AArtiDarkServant::States[] =
@ -34,13 +33,9 @@ IMPLEMENT_ACTOR (AArtiDarkServant, Hexen, 86, 16)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTISUMN") PROP_Inventory_Icon ("ARTISUMN")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTISUMMON")
END_DEFAULTS END_DEFAULTS
const char *AArtiDarkServant::PickupMessage ()
{
return GStrings("TXT_ARTISUMMON");
}
// Summoning Doll ----------------------------------------------------------- // Summoning Doll -----------------------------------------------------------
class ASummoningDoll : public AActor class ASummoningDoll : public AActor

View file

@ -28,7 +28,6 @@ class AArtiTeleportOther : public AInventory
DECLARE_ACTOR (AArtiTeleportOther, AInventory) DECLARE_ACTOR (AArtiTeleportOther, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiTeleportOther::States[] = FState AArtiTeleportOther::States[] =
@ -48,13 +47,9 @@ IMPLEMENT_ACTOR (AArtiTeleportOther, Hexen, 10040, 17)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTITELO") PROP_Inventory_Icon ("ARTITELO")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTITELEPORTOTHER")
END_DEFAULTS END_DEFAULTS
const char *AArtiTeleportOther::PickupMessage ()
{
return GStrings("TXT_ARTITELEPORTOTHER");
}
// Teleport Other FX -------------------------------------------------------- // Teleport Other FX --------------------------------------------------------
class ATelOtherFX1 : public AActor class ATelOtherFX1 : public AActor

View file

@ -18,6 +18,7 @@ END_POINTERS
BEGIN_STATELESS_DEFAULTS (AFourthWeaponPiece, Hexen, -1, 0) BEGIN_STATELESS_DEFAULTS (AFourthWeaponPiece, Hexen, -1, 0)
PROP_Inventory_PickupSound ("misc/w_pkup") PROP_Inventory_PickupSound ("misc/w_pkup")
PROP_Inventory_PickupMessage("$TXT_WEAPONPIECE")
END_DEFAULTS END_DEFAULTS
void AFourthWeaponPiece::Serialize (FArchive &arc) void AFourthWeaponPiece::Serialize (FArchive &arc)
@ -34,7 +35,7 @@ const char *AFourthWeaponPiece::PickupMessage ()
} }
else else
{ {
return PieceMessage (); return Super::PickupMessage ();
} }
} }
@ -43,16 +44,11 @@ bool AFourthWeaponPiece::MatchPlayerClass (AActor *toucher)
return true; return true;
} }
const char *AFourthWeaponPiece::PieceMessage ()
{
return "A weapon piece! This is your lucky day!";
}
void AFourthWeaponPiece::PlayPickupSound (AActor *toucher) void AFourthWeaponPiece::PlayPickupSound (AActor *toucher)
{ {
if (TempFourthWeapon != NULL) if (TempFourthWeapon != NULL)
{ {
// Play the build-sound full volume for all players // Play the build-sound full volume for all players
S_Sound (toucher, CHAN_ITEM, "WeaponBuild", 1, ATTN_SURROUND); S_Sound (toucher, CHAN_ITEM, "WeaponBuild", 1, ATTN_SURROUND);
} }
else else
@ -61,113 +57,115 @@ void AFourthWeaponPiece::PlayPickupSound (AActor *toucher)
} }
} }
//========================================================================== //==========================================================================
// //
// TryPickupWeaponPiece // TryPickupWeaponPiece
// //
//========================================================================== //==========================================================================
bool AFourthWeaponPiece::TryPickup (AActor *toucher) bool AFourthWeaponPiece::TryPickup (AActor *toucher)
{ {
bool shouldStay; bool shouldStay;
bool checkAssembled; bool checkAssembled;
bool gaveWeapon; bool gaveWeapon;
int gaveMana; int gaveMana;
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
checkAssembled = true; const PClass *mana2 = PClass::FindClass(NAME_Mana2);
gaveWeapon = false;
gaveMana = 0; checkAssembled = true;
shouldStay = PrivateShouldStay (); gaveWeapon = false;
if (!MatchPlayerClass (toucher)) gaveMana = 0;
{ // Wrong class, but try to pick up for mana shouldStay = PrivateShouldStay ();
if (shouldStay) if (!MatchPlayerClass (toucher))
{ // Can't pick up wrong-class weapons in coop netplay { // Wrong class, but try to pick up for mana
return false; if (shouldStay)
} { // Can't pick up wrong-class weapons in coop netplay
checkAssembled = false; return false;
gaveMana = toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20) + }
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20); checkAssembled = false;
if (!gaveMana) gaveMana = toucher->GiveAmmo (mana1, 20) +
{ // Didn't need the mana, so don't pick it up toucher->GiveAmmo (mana2, 20);
return false; if (!gaveMana)
} { // Didn't need the mana, so don't pick it up
} return false;
else if (shouldStay) }
{ // Cooperative net-game }
if (toucher->player->pieces & PieceValue) else if (shouldStay)
{ // Already has the piece { // Cooperative net-game
return false; if (toucher->player->pieces & PieceValue)
} { // Already has the piece
toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20); return false;
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20); }
} toucher->GiveAmmo (mana1, 20);
else toucher->GiveAmmo (mana2, 20);
{ // Deathmatch or singleplayer game }
gaveMana = toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20) + else
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20); { // Deathmatch or singleplayer game
if (toucher->player->pieces & PieceValue) gaveMana = toucher->GiveAmmo (mana1, 20) +
{ // Already has the piece, check if mana needed toucher->GiveAmmo (mana2, 20);
if (!gaveMana) if (toucher->player->pieces & PieceValue)
{ // Didn't need the mana, so don't pick it up { // Already has the piece, check if mana needed
return false; if (!gaveMana)
} { // Didn't need the mana, so don't pick it up
checkAssembled = false; return false;
} }
} checkAssembled = false;
}
// Check if fourth weapon assembled }
if (checkAssembled)
{ // Check if fourth weapon assembled
toucher->player->pieces |= PieceValue; if (checkAssembled)
for (int i = 0; i < 9; i += 3) {
{ toucher->player->pieces |= PieceValue;
int mask = (WPIECE1|WPIECE2|WPIECE3) << i; for (int i = 0; i < 9; i += 3)
{
if (PieceValue & mask) int mask = (WPIECE1|WPIECE2|WPIECE3) << i;
{
if (toucher->CheckLocalView (consoleplayer)) if (PieceValue & mask)
{ {
StatusBar->SetInteger (0, i); if (toucher->CheckLocalView (consoleplayer))
} {
if ((toucher->player->pieces & mask) == mask) StatusBar->SetInteger (0, i);
{ }
gaveWeapon = (FourthWeaponClass != NULL); if ((toucher->player->pieces & mask) == mask)
} {
break; gaveWeapon = (FourthWeaponClass != NULL);
} }
} break;
} }
}
if (gaveWeapon) }
{
TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z)); if (gaveWeapon)
if (TempFourthWeapon != NULL) {
{ TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z));
gaveWeapon = TempFourthWeapon->TryPickup (toucher); if (TempFourthWeapon != NULL)
if (!gaveWeapon) {
{ gaveWeapon = TempFourthWeapon->TryPickup (toucher);
TempFourthWeapon->GoAwayAndDie (); if (!gaveWeapon)
} {
} TempFourthWeapon->GoAwayAndDie ();
else }
{ }
gaveWeapon = false; else
} {
} gaveWeapon = false;
if (gaveWeapon || gaveMana || checkAssembled) }
{ }
GoAwayAndDie (); if (gaveWeapon || gaveMana || checkAssembled)
} {
return gaveWeapon || gaveMana || checkAssembled; GoAwayAndDie ();
} }
return gaveWeapon || gaveMana || checkAssembled;
bool AFourthWeaponPiece::ShouldStay () }
{
return PrivateShouldStay (); bool AFourthWeaponPiece::ShouldStay ()
} {
return PrivateShouldStay ();
bool AFourthWeaponPiece::PrivateShouldStay () }
{
bool AFourthWeaponPiece::PrivateShouldStay ()
{
// We want a weapon piece to behave like a weapon, so follow the exact // We want a weapon piece to behave like a weapon, so follow the exact
// same logic as weapons when deciding whether or not to stay. // same logic as weapons when deciding whether or not to stay.
if (((multiplayer && if (((multiplayer &&

View file

@ -228,7 +228,7 @@ public:
{ {
HealthMarker += clamp ((curHealth - HealthMarker) >> 2, 1, 6); HealthMarker += clamp ((curHealth - HealthMarker) >> 2, 1, 6);
} }
if (ArtifactFlash > 0) if (ArtifactFlash > 0)
{ {
if (--ArtifactFlash == 0) if (--ArtifactFlash == 0)
@ -359,8 +359,8 @@ private:
HealthRefresh = screen->GetPageCount (); HealthRefresh = screen->GetPageCount ();
} }
if (HealthRefresh) if (HealthRefresh)
{ {
int lifeClass = LifeBarClass; int lifeClass = LifeBarClass;
HealthRefresh--; HealthRefresh--;
healthPos = clamp (HealthMarker, 0, 100); healthPos = clamp (HealthMarker, 0, 100);
@ -442,65 +442,67 @@ private:
DrINumber (temp, 40, 14, temp >= 25 ? imgINumbers : NUM_BASESB_IMAGES); DrINumber (temp, 40, 14, temp >= 25 ? imgINumbers : NUM_BASESB_IMAGES);
} }
} }
// Mana // Mana
AAmmo *ammo1, *ammo2; AAmmo *ammo1, *ammo2;
int ammocount1, ammocount2; int ammocount1, ammocount2;
int drawbar; int drawbar;
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2); GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
if (ammo1==ammo2) if (ammo1==ammo2)
{ {
// Don't show the same ammo twice. // Don't show the same ammo twice.
ammo2=NULL; ammo2=NULL;
} }
// If the weapon uses some ammo that is not mana, do not draw // If the weapon uses some ammo that is not mana, do not draw
// the mana bars; draw the specific used ammo instead. // the mana bars; draw the specific used ammo instead.
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
drawbar = !((ammo1 != NULL && ammo1->GetClass() != RUNTIME_CLASS(AMana1) && ammo1->GetClass() != RUNTIME_CLASS(AMana2)) || const PClass *mana2 = PClass::FindClass(NAME_Mana2);
(ammo2 != NULL && ammo2->GetClass() != RUNTIME_CLASS(AMana1) && ammo2->GetClass() != RUNTIME_CLASS(AMana2)));
drawbar = !((ammo1 != NULL && ammo1->GetClass() != mana1 && ammo1->GetClass() != mana2) ||
if (drawbar != olddrawbars) (ammo2 != NULL && ammo2->GetClass() != mana1 && ammo2->GetClass() != mana2));
{
AmmoRefresh = screen->GetPageCount (); if (drawbar != olddrawbars)
olddrawbars = drawbar; {
oldmana1 = -1; AmmoRefresh = screen->GetPageCount ();
oldmana2 = -1; olddrawbars = drawbar;
} oldmana1 = -1;
if (drawbar && oldammo2 != ammo2) oldmana2 = -1;
{ }
AmmoRefresh = screen->GetPageCount (); if (drawbar && oldammo2 != ammo2)
} {
if (drawbar) AmmoRefresh = screen->GetPageCount ();
{ }
DrawManaBars (ammo1, ammo2); if (drawbar)
} {
else DrawManaBars (ammo1, ammo2, mana1, mana2);
{ }
DrawMainAltAmmo (ammo1, ammo2, ammocount1, ammocount2); else
} {
DrawMainAltAmmo (ammo1, ammo2, ammocount1, ammocount2);
// Armor }
temp = GetArmorPercent (NULL);
if (oldarmor != temp) // Armor
{ temp = GetArmorPercent (NULL);
oldarmor = temp; if (oldarmor != temp)
ArmorRefresh = screen->GetPageCount (); {
} oldarmor = temp;
if (ArmorRefresh) ArmorRefresh = screen->GetPageCount ();
{ }
ArmorRefresh--; if (ArmorRefresh)
DrawImage (Images[imgARMCLEAR], 255, 16); {
DrINumber (temp / (5*FRACUNIT), 250, 14); ArmorRefresh--;
} DrawImage (Images[imgARMCLEAR], 255, 16);
DrINumber (temp / (5*FRACUNIT), 250, 14);
// Weapon Pieces }
if (oldpieces != CPlayer->pieces)
{ // Weapon Pieces
DrawWeaponPieces(); if (oldpieces != CPlayer->pieces)
oldpieces = CPlayer->pieces; {
} DrawWeaponPieces();
oldpieces = CPlayer->pieces;
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -512,49 +514,49 @@ private:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void DrawMainAltAmmo (AAmmo *ammo1, AAmmo *ammo2, int ammocount1, int ammocount2) void DrawMainAltAmmo (AAmmo *ammo1, AAmmo *ammo2, int ammocount1, int ammocount2)
{ {
if (ammo1 != oldammo1 || ammocount1 != oldammocount1) if (ammo1 != oldammo1 || ammocount1 != oldammocount1)
{ {
AmmoRefresh = screen->GetPageCount (); AmmoRefresh = screen->GetPageCount ();
oldammo1 = ammo1; oldammo1 = ammo1;
oldammocount1 = ammocount1; oldammocount1 = ammocount1;
} }
if (ammo2 != oldammo2 || ammocount2 != oldammocount2) if (ammo2 != oldammo2 || ammocount2 != oldammocount2)
{ {
AmmoRefresh = screen->GetPageCount (); AmmoRefresh = screen->GetPageCount ();
oldammo2 = ammo2; oldammo2 = ammo2;
oldammocount2 = ammocount2; oldammocount2 = ammocount2;
} }
if (AmmoRefresh) if (AmmoRefresh)
{ {
AmmoRefresh--; AmmoRefresh--;
DrawImage (Images[imgAMMOBACK], 77, 2); DrawImage (Images[imgAMMOBACK], 77, 2);
if (ammo2 != NULL) if (ammo2 != NULL)
{ // Draw both ammos { // Draw both ammos
AmmoRefresh--; AmmoRefresh--;
screen->DrawTexture (TexMan[ammo1->Icon], 89+ST_X, 10+ST_Y, screen->DrawTexture (TexMan[ammo1->Icon], 89+ST_X, 10+ST_Y,
DTA_CenterOffset, true, DTA_CenterOffset, true,
DTA_320x200, true, DTA_320x200, true,
TAG_DONE); TAG_DONE);
DrSmallNumber (ammo1->Amount, 86, 20); DrSmallNumber (ammo1->Amount, 86, 20);
screen->DrawTexture (TexMan[ammo2->Icon], 113+ST_X, 10+ST_Y, screen->DrawTexture (TexMan[ammo2->Icon], 113+ST_X, 10+ST_Y,
DTA_CenterOffset, true, DTA_CenterOffset, true,
DTA_320x200, true, DTA_320x200, true,
TAG_DONE); TAG_DONE);
DrSmallNumber (ammo2->Amount, 110, 20); DrSmallNumber (ammo2->Amount, 110, 20);
} }
else else
{ // Draw one ammo { // Draw one ammo
screen->DrawTexture (TexMan[ammo1->Icon], 100+ST_X, 10+ST_Y, screen->DrawTexture (TexMan[ammo1->Icon], 100+ST_X, 10+ST_Y,
DTA_CenterOffset, true, DTA_CenterOffset, true,
DTA_320x200, true, DTA_320x200, true,
TAG_DONE); TAG_DONE);
DrSmallNumber (ammo1->Amount, 97, 20); DrSmallNumber (ammo1->Amount, 97, 20);
} }
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
@ -564,134 +566,134 @@ private:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void DrawManaBars (AAmmo *ammo1, AAmmo *ammo2) void DrawManaBars (AAmmo *ammo1, AAmmo *ammo2, const PClass *manatype1, const PClass *manatype2)
{ {
AAmmo *mana1 = NULL, *mana2 = NULL; AAmmo *mana1 = NULL, *mana2 = NULL;
int usemana1 = false, usemana2 = false; int usemana1 = false, usemana2 = false;
int manacount1, manacount2; int manacount1, manacount2;
int manaPatch1, manaPatch2; int manaPatch1, manaPatch2;
int manaVialPatch1, manaVialPatch2; int manaVialPatch1, manaVialPatch2;
manaPatch1 = 0; manaPatch1 = 0;
manaPatch2 = 0; manaPatch2 = 0;
manaVialPatch1 = 0; manaVialPatch1 = 0;
manaVialPatch2 = 0; manaVialPatch2 = 0;
if (AmmoRefresh) if (AmmoRefresh)
{ {
Mana1Refresh = MAX(AmmoRefresh, Mana1Refresh); Mana1Refresh = MAX(AmmoRefresh, Mana1Refresh);
Mana2Refresh = MAX(AmmoRefresh, Mana2Refresh); Mana2Refresh = MAX(AmmoRefresh, Mana2Refresh);
AmmoRefresh--; AmmoRefresh--;
screen->DrawTexture (Images[imgSTATBAR], ST_X+38, ST_Y, screen->DrawTexture (Images[imgSTATBAR], ST_X+38, ST_Y,
DTA_WindowLeft, 39, DTA_WindowLeft, 39,
DTA_WindowRight, 87, DTA_WindowRight, 87,
DTA_320x200, Scaled, DTA_320x200, Scaled,
TAG_DONE); TAG_DONE);
} }
// Locate Mana1 and Mana2 in the inventory, and decide which ones are used. // Locate Mana1 and Mana2 in the inventory, and decide which ones are used.
if (ammo1 == NULL) if (ammo1 == NULL)
{ {
} }
else if (ammo1->GetClass() == RUNTIME_CLASS(AMana1)) else if (ammo1->GetClass() == manatype1)
{ {
mana1 = ammo1; mana1 = ammo1;
usemana1 = true; usemana1 = true;
} }
else if (ammo1->GetClass() == RUNTIME_CLASS(AMana2)) else if (ammo1->GetClass() == manatype2)
{ {
mana2 = ammo1; mana2 = ammo1;
usemana2 = true; usemana2 = true;
} }
if (ammo2 == NULL) if (ammo2 == NULL)
{ {
} }
else if (ammo2->GetClass() == RUNTIME_CLASS(AMana1)) else if (ammo2->GetClass() == manatype1)
{ {
mana1 = ammo2; mana1 = ammo2;
usemana1 = true; usemana1 = true;
} }
else if (ammo2->GetClass() == RUNTIME_CLASS(AMana2)) else if (ammo2->GetClass() == manatype2)
{ {
mana2 = ammo2; mana2 = ammo2;
usemana2 = true; usemana2 = true;
} }
if (mana1 == NULL) if (mana1 == NULL)
{ {
mana1 = CPlayer->mo->FindInventory<AMana1> (); mana1 = static_cast<AAmmo*>(CPlayer->mo->FindInventory(manatype1));
} }
if (mana2 == NULL) if (mana2 == NULL)
{ {
mana2 = CPlayer->mo->FindInventory<AMana2> (); mana2 = static_cast<AAmmo*>(CPlayer->mo->FindInventory(manatype2));
} }
manacount1 = mana1 != NULL ? mana1->Amount : 0; manacount1 = mana1 != NULL ? mana1->Amount : 0;
manacount2 = mana2 != NULL ? mana2->Amount : 0; manacount2 = mana2 != NULL ? mana2->Amount : 0;
// Has Mana1 changed since last time? // Has Mana1 changed since last time?
if (oldmana1 != manacount1 || oldusemana1 != usemana1) if (oldmana1 != manacount1 || oldusemana1 != usemana1)
{ {
oldmana1 = manacount1; oldmana1 = manacount1;
oldusemana1 = usemana1; oldusemana1 = usemana1;
Mana1Refresh = screen->GetPageCount (); Mana1Refresh = screen->GetPageCount ();
} }
// Has Mana2 changed since last time? // Has Mana2 changed since last time?
if (oldmana2 != manacount2 || oldusemana2 != usemana2) if (oldmana2 != manacount2 || oldusemana2 != usemana2)
{ {
oldmana2 = manacount2; oldmana2 = manacount2;
oldusemana2 = usemana2; oldusemana2 = usemana2;
Mana2Refresh = screen->GetPageCount (); Mana2Refresh = screen->GetPageCount ();
} }
// Decide what to draw for vial 1 // Decide what to draw for vial 1
if (Mana1Refresh) if (Mana1Refresh)
{ {
Mana1Refresh--; Mana1Refresh--;
DrawImage (Images[imgMANACLEAR], 77, 16); DrawImage (Images[imgMANACLEAR], 77, 16);
DrSmallNumber (manacount1, 79, 19); DrSmallNumber (manacount1, 79, 19);
if (!usemana1) if (!usemana1)
{ // Draw Dim Mana icon { // Draw Dim Mana icon
manaPatch1 = imgMANADIM1; manaPatch1 = imgMANADIM1;
manaVialPatch1 = imgMANAVIALDIM1; manaVialPatch1 = imgMANAVIALDIM1;
} }
else else
{ {
manaPatch1 = imgMANABRIGHT1; manaPatch1 = imgMANABRIGHT1;
manaVialPatch1 = manacount1 ? imgMANAVIAL1 : imgMANAVIALDIM1; manaVialPatch1 = manacount1 ? imgMANAVIAL1 : imgMANAVIALDIM1;
} }
} }
// Decide what to draw for vial 2 // Decide what to draw for vial 2
if (Mana2Refresh) if (Mana2Refresh)
{ {
Mana2Refresh--; Mana2Refresh--;
DrawImage (Images[imgMANACLEAR], 109, 16); DrawImage (Images[imgMANACLEAR], 109, 16);
DrSmallNumber (manacount2, 111, 19); DrSmallNumber (manacount2, 111, 19);
if (!usemana2) if (!usemana2)
{ // Draw Dim Mana icon { // Draw Dim Mana icon
manaPatch2 = imgMANADIM2; manaPatch2 = imgMANADIM2;
manaVialPatch2 = imgMANAVIALDIM2; manaVialPatch2 = imgMANAVIALDIM2;
} }
else else
{ {
manaPatch2 = imgMANABRIGHT2; manaPatch2 = imgMANABRIGHT2;
manaVialPatch2 = manacount2 ? imgMANAVIAL2 : imgMANAVIALDIM2; manaVialPatch2 = manacount2 ? imgMANAVIAL2 : imgMANAVIALDIM2;
} }
} }
// Update mana graphics // Update mana graphics
if (manaPatch1 || manaPatch2 || manaVialPatch1) if (manaPatch1 || manaPatch2 || manaVialPatch1)
{ {
if (manaVialPatch1) if (manaVialPatch1)
{ {
DrawImage (Images[manaPatch1], 77, 2); DrawImage (Images[manaPatch1], 77, 2);
ManaVial1Pic.SetVial (Images[manaVialPatch1], CPlayer->mo, RUNTIME_CLASS(AMana1)); ManaVial1Pic.SetVial (Images[manaVialPatch1], CPlayer->mo, manatype1);
DrawImage (&ManaVial1Pic, 94, 2); DrawImage (&ManaVial1Pic, 94, 2);
} }
if (manaVialPatch2) if (manaVialPatch2)
{ {
DrawImage (Images[manaPatch2], 110, 2); DrawImage (Images[manaPatch2], 110, 2);
ManaVial2Pic.SetVial (Images[manaVialPatch2], CPlayer->mo, RUNTIME_CLASS(AMana2)); ManaVial2Pic.SetVial (Images[manaVialPatch2], CPlayer->mo, manatype2);
DrawImage (&ManaVial2Pic, 102, 2); DrawImage (&ManaVial2Pic, 102, 2);
} }
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -736,138 +738,138 @@ private:
} }
} }
//========================================================================== //==========================================================================
// //
// DrawKeyBar // DrawKeyBar
// //
//========================================================================== //==========================================================================
void DrawKeyBar () void DrawKeyBar ()
{ {
AInventory *item; AInventory *item;
AHexenArmor *armor; AHexenArmor *armor;
AKey *keys[5]; AKey *keys[5];
int i; int i;
int temp; int temp;
bool different; bool different;
keys[0] = keys[1] = keys[2] = keys[3] = keys[4] = NULL; keys[0] = keys[1] = keys[2] = keys[3] = keys[4] = NULL;
for (item = CPlayer->mo->Inventory, i = 0; for (item = CPlayer->mo->Inventory, i = 0;
item != NULL && i < 5; item != NULL && i < 5;
item = item->Inventory) item = item->Inventory)
{ {
if (item->Icon > 0 && if (item->Icon > 0 &&
item->IsKindOf (RUNTIME_CLASS(AKey)) && item->IsKindOf (RUNTIME_CLASS(AKey)) &&
item->GetClass() != RUNTIME_CLASS(AKey)) item->GetClass() != RUNTIME_CLASS(AKey))
{ {
keys[i++] = static_cast<AKey*>(item); keys[i++] = static_cast<AKey*>(item);
} }
} }
different = false; different = false;
for (i = 0; i < 5; ++i) for (i = 0; i < 5; ++i)
{ {
if (keys[i] != oldkeys[i]) if (keys[i] != oldkeys[i])
{ {
oldkeys[i] = keys[i]; oldkeys[i] = keys[i];
different = true; different = true;
} }
} }
if (different) if (different)
{ {
KeysRefresh = screen->GetPageCount (); KeysRefresh = screen->GetPageCount ();
} }
if (KeysRefresh) if (KeysRefresh)
{ {
KeysRefresh--; KeysRefresh--;
for (i = 0; i < 5 && keys[i] != NULL; i++) for (i = 0; i < 5 && keys[i] != NULL; i++)
{ {
DrawImage (TexMan[keys[i]->Icon], 46 + i*20, 2); DrawImage (TexMan[keys[i]->Icon], 46 + i*20, 2);
} }
} }
temp = GetArmorPercent (&armor); temp = GetArmorPercent (&armor);
if (oldarmor != temp && armor != NULL) if (oldarmor != temp && armor != NULL)
{ {
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
if (armor->Slots[i] > 0 && armor->SlotsIncrement[i] > 0) if (armor->Slots[i] > 0 && armor->SlotsIncrement[i] > 0)
{ {
DrawFadedImage (Images[imgARMSLOT1+i], 150+31*i, 2, DrawFadedImage (Images[imgARMSLOT1+i], 150+31*i, 2,
MIN<fixed_t> (OPAQUE, Scale (armor->Slots[i], OPAQUE, MIN<fixed_t> (OPAQUE, Scale (armor->Slots[i], OPAQUE,
armor->SlotsIncrement[i]))); armor->SlotsIncrement[i])));
} }
} }
oldarmor = temp; oldarmor = temp;
} }
} }
//========================================================================== //==========================================================================
// //
// GetArmorPercent // GetArmorPercent
// //
//========================================================================== //==========================================================================
fixed_t GetArmorPercent (AHexenArmor **armorp) fixed_t GetArmorPercent (AHexenArmor **armorp)
{ {
AHexenArmor *harmor = CPlayer->mo->FindInventory<AHexenArmor>(); AHexenArmor *harmor = CPlayer->mo->FindInventory<AHexenArmor>();
fixed_t amount = 0; fixed_t amount = 0;
if (harmor != NULL) if (harmor != NULL)
{ {
amount = harmor->Slots[0] amount = harmor->Slots[0]
+ harmor->Slots[1] + harmor->Slots[1]
+ harmor->Slots[2] + harmor->Slots[2]
+ harmor->Slots[3] + harmor->Slots[3]
+ harmor->Slots[4]; + harmor->Slots[4];
} }
// [RH] Count basic armor too. // [RH] Count basic armor too.
ABasicArmor *barmor = CPlayer->mo->FindInventory<ABasicArmor>(); ABasicArmor *barmor = CPlayer->mo->FindInventory<ABasicArmor>();
if (barmor != NULL) if (barmor != NULL)
{ {
amount += barmor->SavePercent; amount += barmor->SavePercent;
} }
if (armorp != NULL) if (armorp != NULL)
{ {
*armorp = harmor; *armorp = harmor;
} }
return amount; return amount;
} }
//========================================================================== //==========================================================================
// //
// DrawWeaponPieces // DrawWeaponPieces
// //
//========================================================================== //==========================================================================
void DrawWeaponPieces () void DrawWeaponPieces ()
{ {
static int PieceX[3][3] = static int PieceX[3][3] =
{ {
{ 190, 225, 234 }, { 190, 225, 234 },
{ 190, 212, 225 }, { 190, 212, 225 },
{ 190, 205, 224 }, { 190, 205, 224 },
}; };
int pieces = (CPlayer->pieces >> FourthWeaponShift) & 7; int pieces = (CPlayer->pieces >> FourthWeaponShift) & 7;
int weapClass = FourthWeaponClass; int weapClass = FourthWeaponClass;
if (pieces == 7) if (pieces == 7)
{ {
DrawImage (ClassImages[weapClass][imgWEAPONFULL], 190, 0); DrawImage (ClassImages[weapClass][imgWEAPONFULL], 190, 0);
return; return;
} }
DrawImage (ClassImages[weapClass][imgWEAPONSLOT], 190, 0); DrawImage (ClassImages[weapClass][imgWEAPONSLOT], 190, 0);
if (pieces & WPIECE1) if (pieces & WPIECE1)
{ {
DrawImage (ClassImages[weapClass][imgPIECE1], PieceX[weapClass][0], 0); DrawImage (ClassImages[weapClass][imgPIECE1], PieceX[weapClass][0], 0);
} }
if (pieces & WPIECE2) if (pieces & WPIECE2)
{ {
DrawImage (ClassImages[weapClass][imgPIECE2], PieceX[weapClass][1], 0); DrawImage (ClassImages[weapClass][imgPIECE2], PieceX[weapClass][1], 0);
} }
if (pieces & WPIECE3) if (pieces & WPIECE3)
{ {
DrawImage (ClassImages[weapClass][imgPIECE3], PieceX[weapClass][2], 0); DrawImage (ClassImages[weapClass][imgPIECE3], PieceX[weapClass][2], 0);
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
@ -968,17 +970,19 @@ private:
} }
// Mana // Mana
AAmmo *ammo1, *ammo2; AAmmo *ammo1, *ammo2;
int ammocount1, ammocount2; int ammocount1, ammocount2;
bool drawmana; bool drawmana;
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2); GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
// If the weapon uses some ammo that is not mana, do not draw // If the weapon uses some ammo that is not mana, do not draw
// the mana blocks; draw the specific used ammo instead. // the mana blocks; draw the specific used ammo instead.
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
drawmana = !((ammo1 != NULL && ammo1->GetClass() != RUNTIME_CLASS(AMana1) && ammo1->GetClass() != RUNTIME_CLASS(AMana2)) || const PClass *mana2 = PClass::FindClass(NAME_Mana2);
(ammo2 != NULL && ammo2->GetClass() != RUNTIME_CLASS(AMana1) && ammo2->GetClass() != RUNTIME_CLASS(AMana2)));
drawmana = !((ammo1 != NULL && ammo1->GetClass() != mana1 && ammo1->GetClass() != mana2) ||
(ammo2 != NULL && ammo2->GetClass() != mana1 && ammo2->GetClass() != mana2));
if (drawmana) if (drawmana)
{ {
@ -989,36 +993,36 @@ private:
{ {
if (CPlayer->ReadyWeapon->Ammo1 != NULL) if (CPlayer->ReadyWeapon->Ammo1 != NULL)
{ {
if (CPlayer->ReadyWeapon->Ammo1->GetClass() == RUNTIME_CLASS(AMana1)) if (CPlayer->ReadyWeapon->Ammo1->GetClass() == mana1)
{ {
ammo |= 1; ammo |= 1;
} }
else if (CPlayer->ReadyWeapon->Ammo1->GetClass() == RUNTIME_CLASS(AMana2)) else if (CPlayer->ReadyWeapon->Ammo1->GetClass() == mana2)
{ {
ammo |= 2; ammo |= 2;
} }
} }
if (CPlayer->ReadyWeapon->Ammo2 != NULL) if (CPlayer->ReadyWeapon->Ammo2 != NULL)
{ {
if (CPlayer->ReadyWeapon->Ammo2->GetClass() == RUNTIME_CLASS(AMana1)) if (CPlayer->ReadyWeapon->Ammo2->GetClass() == mana1)
{ {
ammo |= 1; ammo |= 1;
} }
else if (CPlayer->ReadyWeapon->Ammo2->GetClass() == RUNTIME_CLASS(AMana2)) else if (CPlayer->ReadyWeapon->Ammo2->GetClass() == mana2)
{ {
ammo |= 2; ammo |= 2;
} }
} }
} }
item = CPlayer->mo->FindInventory (RUNTIME_CLASS(AMana1)); item = CPlayer->mo->FindInventory (mana1);
i = item != NULL ? item->Amount : 0; i = item != NULL ? item->Amount : 0;
manaImage = ((ammo & 1) && i > 0) ? imgMANABRIGHT1 : imgMANADIM1; manaImage = ((ammo & 1) && i > 0) ? imgMANABRIGHT1 : imgMANADIM1;
screen->DrawTexture (Images[manaImage], -17, -30, screen->DrawTexture (Images[manaImage], -17, -30,
DTA_HUDRules, HUD_Normal, TAG_DONE); DTA_HUDRules, HUD_Normal, TAG_DONE);
DrINumberOuter (i, -47, -30); DrINumberOuter (i, -47, -30);
item = CPlayer->mo->FindInventory (RUNTIME_CLASS(AMana2)); item = CPlayer->mo->FindInventory (mana2);
i = item != NULL ? item->Amount : 0; i = item != NULL ? item->Amount : 0;
manaImage = ((ammo & 2) && i > 0) ? imgMANABRIGHT2 : imgMANADIM2; manaImage = ((ammo & 2) && i > 0) ? imgMANABRIGHT2 : imgMANADIM2;
screen->DrawTexture (Images[manaImage], -17, -15, screen->DrawTexture (Images[manaImage], -17, -15,

View file

@ -345,7 +345,6 @@ class AArtiEgg : public AInventory
DECLARE_ACTOR (AArtiEgg, AInventory) DECLARE_ACTOR (AArtiEgg, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiEgg::States[] = FState AArtiEgg::States[] =
@ -364,6 +363,7 @@ IMPLEMENT_ACTOR (AArtiEgg, Heretic, 30, 14)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIEGGC") PROP_Inventory_Icon ("ARTIEGGC")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIEGG")
END_DEFAULTS END_DEFAULTS
bool AArtiEgg::Use (bool pickup) bool AArtiEgg::Use (bool pickup)
@ -376,11 +376,6 @@ bool AArtiEgg::Use (bool pickup)
return true; return true;
} }
const char *AArtiEgg::PickupMessage ()
{
return GStrings("TXT_ARTIEGG");
}
// Pork missile -------------------------------------------------------------- // Pork missile --------------------------------------------------------------
class APorkFX : public AActor class APorkFX : public AActor
@ -438,7 +433,6 @@ class AArtiPork : public AInventory
DECLARE_ACTOR (AArtiPork, AInventory) DECLARE_ACTOR (AArtiPork, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiPork::States[] = FState AArtiPork::States[] =
@ -461,6 +455,7 @@ IMPLEMENT_ACTOR (AArtiPork, Hexen, 30, 14)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIPORK") PROP_Inventory_Icon ("ARTIPORK")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTIEGG2")
END_DEFAULTS END_DEFAULTS
bool AArtiPork::Use (bool pickup) bool AArtiPork::Use (bool pickup)
@ -473,7 +468,3 @@ bool AArtiPork::Use (bool pickup)
return true; return true;
} }
const char *AArtiPork::PickupMessage ()
{
return GStrings("TXT_ARTIEGG2");
}

View file

@ -16,7 +16,6 @@ class AArtiTeleport : public AInventory
DECLARE_ACTOR (AArtiTeleport, AInventory) DECLARE_ACTOR (AArtiTeleport, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState AArtiTeleport::States[] = FState AArtiTeleport::States[] =
@ -35,6 +34,7 @@ IMPLEMENT_ACTOR (AArtiTeleport, Raven, 36, 18)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIATLP") PROP_Inventory_Icon ("ARTIATLP")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTITELEPORT")
END_DEFAULTS END_DEFAULTS
bool AArtiTeleport::Use (bool pickup) bool AArtiTeleport::Use (bool pickup)
@ -69,11 +69,6 @@ bool AArtiTeleport::Use (bool pickup)
return true; return true;
} }
const char *AArtiTeleport::PickupMessage ()
{
return GStrings("TXT_ARTITELEPORT");
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// FUNC P_AutoUseChaosDevice // FUNC P_AutoUseChaosDevice

View file

@ -854,11 +854,7 @@ void AInventory::Touch (AActor *toucher)
if (!(ItemFlags & IF_QUIET)) if (!(ItemFlags & IF_QUIET))
{ {
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PickupMessage); const char * message = PickupMessage ();
if (message == NULL)
{
message = PickupMessage ();
}
if (toucher->CheckLocalView (consoleplayer) if (toucher->CheckLocalView (consoleplayer)
&& (StaticLastMessageTic != gametic || StaticLastMessage != message)) && (StaticLastMessageTic != gametic || StaticLastMessage != message))
@ -930,7 +926,9 @@ void AInventory::DoPickupSpecial (AActor *toucher)
const char *AInventory::PickupMessage () const char *AInventory::PickupMessage ()
{ {
return "You got a pickup"; const char *message = GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
return message != NULL? message : "You got a pickup";
} }
//=========================================================================== //===========================================================================
@ -1753,6 +1751,28 @@ IMPLEMENT_STATELESS_ACTOR (AHealth, Any, -1, 0)
PROP_Inventory_PickupSound ("misc/health_pkup") PROP_Inventory_PickupSound ("misc/health_pkup")
END_DEFAULTS END_DEFAULTS
//===========================================================================
//
// AHealth :: TryPickup
//
//===========================================================================
const char *AHealth::PickupMessage ()
{
int threshold = GetClass()->Meta.GetMetaInt(AIMETA_LowHealth, 0);
if (PrevHealth < threshold)
{
const char *message = GetClass()->Meta.GetMetaString (AIMETA_LowHealthMessage);
if (message != NULL)
{
return message;
}
}
return Super::PickupMessage();
}
//=========================================================================== //===========================================================================
// //
// AHealth :: TryPickup // AHealth :: TryPickup
@ -1766,6 +1786,7 @@ bool AHealth::TryPickup (AActor *other)
if (player != NULL) if (player != NULL)
{ {
PrevHealth = other->player->health;
if (max == 0) if (max == 0)
{ {
max = ((i_compatflags&COMPATF_DEHHEALTH)? 100 : deh.MaxHealth) + player->stamina; max = ((i_compatflags&COMPATF_DEHHEALTH)? 100 : deh.MaxHealth) + player->stamina;
@ -1794,6 +1815,7 @@ bool AHealth::TryPickup (AActor *other)
} }
else else
{ {
PrevHealth = INT_MAX;
if (P_GiveBody(other, Amount) || ItemFlags & IF_ALWAYSPICKUP) if (P_GiveBody(other, Amount) || ItemFlags & IF_ALWAYSPICKUP)
{ {
GoAwayAndDie (); GoAwayAndDie ();
@ -2020,15 +2042,10 @@ void ABackpack::DetachFromOwner ()
//=========================================================================== //===========================================================================
// //
// ABackpack :: PickupMessage // ABackpack
// //
//=========================================================================== //===========================================================================
const char *ABackpack::PickupMessage ()
{
return GStrings("GOTBACKPACK");
}
FState ABackpack::States[] = FState ABackpack::States[] =
{ {
S_NORMAL (BPAK, 'A', -1, NULL , NULL) S_NORMAL (BPAK, 'A', -1, NULL , NULL)
@ -2038,6 +2055,7 @@ IMPLEMENT_ACTOR (ABackpack, Doom, 8, 144)
PROP_HeightFixed (26) PROP_HeightFixed (26)
PROP_Flags (MF_SPECIAL) PROP_Flags (MF_SPECIAL)
PROP_SpawnState (0) PROP_SpawnState (0)
PROP_Inventory_PickupMessage("$GOTBACKPACK")
END_DEFAULTS END_DEFAULTS
IMPLEMENT_ABSTRACT_ACTOR (AMapRevealer) IMPLEMENT_ABSTRACT_ACTOR (AMapRevealer)
@ -2073,15 +2091,6 @@ IMPLEMENT_ACTOR (ACommunicator, Strife, 206, 0)
PROP_Inventory_Icon ("I_COMM") PROP_Inventory_Icon ("I_COMM")
PROP_Tag ("Communicator") PROP_Tag ("Communicator")
PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_COMMUNICATOR")
END_DEFAULTS END_DEFAULTS
//===========================================================================
//
// ACommunicator :: PickupMessage
//
//===========================================================================
const char *ACommunicator::PickupMessage ()
{
return "You picked up the Communicator";
}

View file

@ -74,6 +74,8 @@ enum
AIMETA_PickupMessage, // string AIMETA_PickupMessage, // string
AIMETA_GiveQuest, // optionally give one of the quest items. AIMETA_GiveQuest, // optionally give one of the quest items.
AIMETA_DropAmount, // specifies the amount for a dropped ammo item AIMETA_DropAmount, // specifies the amount for a dropped ammo item
AIMETA_LowHealth,
AIMETA_LowHealthMessage,
}; };
enum enum
@ -287,8 +289,11 @@ enum
class AHealth : public AInventory class AHealth : public AInventory
{ {
DECLARE_STATELESS_ACTOR (AHealth, AInventory) DECLARE_STATELESS_ACTOR (AHealth, AInventory)
int PrevHealth;
public: public:
virtual bool TryPickup (AActor *other); virtual bool TryPickup (AActor *other);
virtual const char *PickupMessage ();
}; };
// HealthPickup is some item that gives the player health when used. // HealthPickup is some item that gives the player health when used.
@ -401,7 +406,6 @@ public:
bool HandlePickup (AInventory *item); bool HandlePickup (AInventory *item);
AInventory *CreateCopy (AActor *other); AInventory *CreateCopy (AActor *other);
AInventory *CreateTossable (); AInventory *CreateTossable ();
const char *PickupMessage ();
void DetachFromOwner (); void DetachFromOwner ();
bool bDepleted; bool bDepleted;
@ -412,8 +416,6 @@ public:
class ACommunicator : public AInventory class ACommunicator : public AInventory
{ {
DECLARE_ACTOR (ACommunicator, AInventory) DECLARE_ACTOR (ACommunicator, AInventory)
public:
const char *PickupMessage ();
}; };
#endif //__A_PICKUPS_H__ #endif //__A_PICKUPS_H__

View file

@ -148,8 +148,14 @@ bool AWeaponPiece::PrivateShouldStay ()
const char *AWeaponPiece::PickupMessage () const char *AWeaponPiece::PickupMessage ()
{ {
if (FullWeapon) return FullWeapon->PickupMessage(); if (FullWeapon)
return Super::PickupMessage(); {
return FullWeapon->PickupMessage();
}
else
{
return Super::PickupMessage();
}
} }
//=========================================================================== //===========================================================================

View file

@ -1,5 +1,6 @@
#include "a_pickups.h" #include "a_pickups.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "gstrings.h"
// Coin --------------------------------------------------------------------- // Coin ---------------------------------------------------------------------
@ -19,19 +20,20 @@ IMPLEMENT_ACTOR (ACoin, Strife, 93, 0)
PROP_Inventory_FlagsSet (IF_INVBAR) PROP_Inventory_FlagsSet (IF_INVBAR)
PROP_Inventory_Icon ("I_COIN") PROP_Inventory_Icon ("I_COIN")
PROP_Tag ("coin") PROP_Tag ("coin")
PROP_Inventory_PickupMessage("$TXT_COIN")
END_DEFAULTS END_DEFAULTS
const char *ACoin::PickupMessage () const char *ACoin::PickupMessage ()
{ {
if (Amount == 1) if (Amount == 1)
{ {
return "You picked up the coin."; return Super::PickupMessage();
} }
else else
{ {
static char msg[64]; static char msg[64];
sprintf (msg, "You picked up %d gold.", Amount); sprintf (msg, GStrings("TXT_XGOLD"), Amount);
return msg; return msg;
} }
} }

View file

@ -225,7 +225,6 @@ class ATeleporterBeacon : public AInventory
DECLARE_ACTOR (ATeleporterBeacon, AInventory) DECLARE_ACTOR (ATeleporterBeacon, AInventory)
public: public:
bool Use (bool pickup); bool Use (bool pickup);
const char *PickupMessage ();
}; };
FState ATeleporterBeacon::States[] = FState ATeleporterBeacon::States[] =
@ -248,13 +247,9 @@ IMPLEMENT_ACTOR (ATeleporterBeacon, Strife, 10, 0)
PROP_Inventory_FlagsSet (IF_INVBAR) PROP_Inventory_FlagsSet (IF_INVBAR)
PROP_Inventory_Icon ("I_BEAC") PROP_Inventory_Icon ("I_BEAC")
PROP_Tag ("Teleporter_Beacon") PROP_Tag ("Teleporter_Beacon")
PROP_Inventory_PickupMessage("$TXT_BEACON")
END_DEFAULTS END_DEFAULTS
const char *ATeleporterBeacon::PickupMessage ()
{
return "You picked up the Teleporter Beacon.";
}
bool ATeleporterBeacon::Use (bool pickup) bool ATeleporterBeacon::Use (bool pickup)
{ {
AInventory *drop; AInventory *drop;

View file

@ -1,305 +0,0 @@
#include "a_strifeglobal.h"
#include "p_local.h"
#include "a_strifeweaps.h"
// HEGrenades: 6 12
// PhGrenades: 4 8
// ClipOfBullets ?? 10
// BoxOfBullets: 50 50
// MiniMissiles: 4 8
// CrateOfMissiles: 20 20
// EnergyPod: 20 40
// EnergyPack: 100
// PoisonBolts: 20
// ElectricBolts: 20
// HE-Grenade Rounds --------------------------------------------------------
FState AHEGrenadeRounds::States[] =
{
S_NORMAL (GRN1, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AHEGrenadeRounds, Strife, 152, 0)
PROP_SpawnState (0)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_StrifeType (177)
PROP_StrifeTeaserType (170)
PROP_StrifeTeaserType2 (174)
PROP_Inventory_Amount (6)
PROP_Inventory_MaxAmount (30)
PROP_Ammo_BackpackAmount (6)
PROP_Ammo_BackpackMaxAmount (60)
PROP_Inventory_Icon ("I_GRN1")
PROP_Tag ("HE-Grenade_Rounds")
END_DEFAULTS
const char *AHEGrenadeRounds::PickupMessage ()
{
return "You picked up the HE-Grenade Rounds.";
}
// Phosphorus-Grenade Rounds ------------------------------------------------
FState APhosphorusGrenadeRounds::States[] =
{
S_NORMAL (GRN2, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (APhosphorusGrenadeRounds, Strife, 153, 0)
PROP_SpawnState (0)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_StrifeType (178)
PROP_StrifeTeaserType (171)
PROP_StrifeTeaserType2 (175)
PROP_Inventory_Amount (4)
PROP_Inventory_MaxAmount (16)
PROP_Ammo_BackpackAmount (4)
PROP_Ammo_BackpackMaxAmount (32)
PROP_Inventory_Icon ("I_GRN2")
PROP_Tag ("Phoshorus-Grenade_Rounds") // "Fire-Grenade_Rounds" in the Teaser
END_DEFAULTS
const char *APhosphorusGrenadeRounds::PickupMessage ()
{
return "You picked up the Phoshorus-Grenade Rounds.";
}
// The teaser actually has Gas-Grenade_Rounds defined
// Clip of Bullets ----------------------------------------------------------
FState AClipOfBullets::States[] =
{
S_NORMAL (BLIT, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AClipOfBullets, Strife, 2007, 11)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (179)
PROP_StrifeTeaserType (173)
PROP_StrifeTeaserType2 (177)
PROP_Inventory_Amount (10)
PROP_Inventory_MaxAmount (250)
PROP_Ammo_BackpackAmount (10)
PROP_Ammo_BackpackMaxAmount (500)
PROP_Inventory_Icon ("I_BLIT")
PROP_Tag ("clip_of_bullets") // "bullets" in the Teaser
END_DEFAULTS
const char *AClipOfBullets::PickupMessage ()
{
return "You picked up the clip of bullets.";
}
// Box of Bullets -----------------------------------------------------------
FState ABoxOfBullets::States[] =
{
S_NORMAL (BBOX, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (ABoxOfBullets, Strife, 2048, 139)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (180)
PROP_StrifeTeaserType (174)
PROP_StrifeTeaserType2 (178)
PROP_Inventory_Amount (50)
PROP_Tag ("ammo")
END_DEFAULTS
const char *ABoxOfBullets::PickupMessage ()
{
return "You picked up the box of bullets.";
}
// Mini Missiles ------------------------------------------------------------
FState AMiniMissiles::States[] =
{
S_NORMAL (MSSL, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AMiniMissiles, Strife, 2010, 140)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (181)
PROP_StrifeTeaserType (175)
PROP_StrifeTeaserType2 (179)
PROP_Inventory_Amount (4)
PROP_Inventory_MaxAmount (100)
PROP_Ammo_BackpackAmount (4)
PROP_Ammo_BackpackMaxAmount (200)
PROP_Inventory_Icon ("I_ROKT")
PROP_Tag ("mini_missiles") //"rocket" in the Teaser
END_DEFAULTS
const char *AMiniMissiles::PickupMessage ()
{
return "You picked up the mini missiles.";
}
// Crate of Missiles --------------------------------------------------------
FState ACrateOfMissiles::States[] =
{
S_NORMAL (ROKT, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (ACrateOfMissiles, Strife, 2046, 141)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (182)
PROP_StrifeTeaserType (176)
PROP_StrifeTeaserType2 (180)
PROP_Inventory_Amount (20)
PROP_Tag ("crate_of_missiles") //"box_of_rockets" in the Teaser
END_DEFAULTS
const char *ACrateOfMissiles::PickupMessage ()
{
return "You picked up the crate of missiles.";
}
// Energy Pod ---------------------------------------------------------------
FState AEnergyPod::States[] =
{
S_NORMAL (BRY1, 'A', 6, NULL, &States[1]),
S_NORMAL (BRY1, 'B', 6, NULL, &States[0])
};
IMPLEMENT_ACTOR (AEnergyPod, Strife, 2047, 75)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (183)
PROP_StrifeTeaserType (177)
PROP_StrifeTeaserType2 (181)
PROP_Inventory_Amount (20)
PROP_Inventory_MaxAmount (400)
PROP_Ammo_BackpackAmount (20)
PROP_Ammo_BackpackMaxAmount (800)
PROP_Ammo_DropAmount (20)
PROP_Inventory_Icon ("I_BRY1")
PROP_Tag ("energy_pod")
END_DEFAULTS
const char *AEnergyPod::PickupMessage ()
{
return "You picked up the energy pod.";
}
// Energy pack ---------------------------------------------------------------
FState AEnergyPack::States[] =
{
S_NORMAL (CPAC, 'A', 6, NULL, &States[1]),
S_NORMAL (CPAC, 'B', 6, NULL, &States[0])
};
IMPLEMENT_ACTOR (AEnergyPack, Strife, 17, 142)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (184)
PROP_StrifeTeaserType (178)
PROP_StrifeTeaserType2 (182)
PROP_Inventory_Amount (100)
PROP_Tag ("energy_pack")
END_DEFAULTS
const char *AEnergyPack::PickupMessage ()
{
return "You picked up the energy pack.";
}
// Poison Bolt Quiver -------------------------------------------------------
FState APoisonBolts::States[] =
{
S_NORMAL (PQRL, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (APoisonBolts, Strife, 115, 0)
PROP_SpawnState (0)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_StrifeType (185)
PROP_StrifeTeaserType (179)
PROP_StrifeTeaserType2 (183)
PROP_Inventory_Amount (10)
PROP_Inventory_MaxAmount (25)
PROP_Ammo_BackpackAmount (2)
PROP_Ammo_BackpackMaxAmount (50)
PROP_Inventory_Icon ("I_PQRL")
PROP_Tag ("poison_bolts") // "poison_arrows" in the Teaser
END_DEFAULTS
const char *APoisonBolts::PickupMessage ()
{
return "You picked up the poison bolts.";
}
// Electric Bolt Quiver -------------------------------------------------------
FState AElectricBolts::States[] =
{
S_NORMAL (XQRL, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AElectricBolts, Strife, 114, 0)
PROP_SpawnState (0)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_StrifeType (186)
PROP_StrifeTeaserType (180)
PROP_StrifeTeaserType2 (184)
PROP_Inventory_Amount (20)
PROP_Inventory_MaxAmount (50)
PROP_Ammo_BackpackAmount (4)
PROP_Ammo_BackpackMaxAmount (100)
PROP_Inventory_Icon ("I_XQRL")
PROP_Tag ("electric_bolts") // "electric_arrows" in the Teaser
END_DEFAULTS
const char *AElectricBolts::PickupMessage ()
{
return "You picked up the electric bolts.";
}
// Ammo Satchel -------------------------------------------------------------
class AAmmoSatchel : public ABackpack
{
DECLARE_ACTOR (AAmmoSatchel, ABackpack)
protected:
virtual const char *PickupMessage ()
{
return "You picked up the ammo satchel";
}
};
FState AAmmoSatchel::States[] =
{
S_NORMAL (BKPK, 'A', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AAmmoSatchel, Strife, 183, 144)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_SpawnState (0)
PROP_StrifeType (187)
PROP_StrifeTeaserType (181)
PROP_StrifeTeaserType2 (185)
PROP_Inventory_Icon ("I_BKPK")
PROP_Tag ("ammo_satchel") // "Back_pack" in the Teaser
END_DEFAULTS

View file

@ -40,7 +40,6 @@ class ADegninOre : public AInventory
{ {
DECLARE_ACTOR (ADegninOre, AInventory) DECLARE_ACTOR (ADegninOre, AInventory)
public: public:
const char *PickupMessage ();
void GetExplodeParms (int &damage, int &dist, bool &hurtSource); void GetExplodeParms (int &damage, int &dist, bool &hurtSource);
bool Use (bool pickup); bool Use (bool pickup);
}; };
@ -90,8 +89,6 @@ class AStrifeWeapon : public AWeapon
class AFlameThrower : public AStrifeWeapon class AFlameThrower : public AStrifeWeapon
{ {
DECLARE_ACTOR (AFlameThrower, AStrifeWeapon) DECLARE_ACTOR (AFlameThrower, AStrifeWeapon)
public:
const char *PickupMessage ();
}; };
class ASigil : public AStrifeWeapon class ASigil : public AStrifeWeapon
@ -101,7 +98,6 @@ public:
bool HandlePickup (AInventory *item); bool HandlePickup (AInventory *item);
AInventory *CreateCopy (AActor *other); AInventory *CreateCopy (AActor *other);
void Serialize (FArchive &arc); void Serialize (FArchive &arc);
const char *PickupMessage ();
bool SpecialDropAction (AActor *dropper); bool SpecialDropAction (AActor *dropper);
static int GiveSigilPiece (AActor *daPlayer); static int GiveSigilPiece (AActor *daPlayer);

View file

@ -8,9 +8,9 @@
#include "p_lnspec.h" #include "p_lnspec.h"
#include "p_enemy.h" #include "p_enemy.h"
#include "s_sound.h" #include "s_sound.h"
#include "a_strifeweaps.h"
#include "d_event.h" #include "d_event.h"
#include "a_keys.h" #include "a_keys.h"
#include "c_console.h"
// Degnin Ore --------------------------------------------------------------- // Degnin Ore ---------------------------------------------------------------
@ -48,13 +48,9 @@ IMPLEMENT_ACTOR (ADegninOre, Strife, 59, 0)
PROP_Tag ("Degnin_Ore") // "Thalite_Ore" in the Teaser PROP_Tag ("Degnin_Ore") // "Thalite_Ore" in the Teaser
PROP_DeathSound ("ore/explode") PROP_DeathSound ("ore/explode")
PROP_Inventory_Icon ("I_XPRK") PROP_Inventory_Icon ("I_XPRK")
PROP_Inventory_PickupMessage("$TXT_DEGNINORE")
END_DEFAULTS END_DEFAULTS
const char *ADegninOre::PickupMessage ()
{
return "You picked up the Degnin Ore.";
}
void ADegninOre::GetExplodeParms (int &damage, int &dist, bool &hurtSource) void ADegninOre::GetExplodeParms (int &damage, int &dist, bool &hurtSource)
{ {
damage = dist = 192; damage = dist = 192;
@ -179,7 +175,6 @@ class AScanner : public APowerupGiver
{ {
DECLARE_ACTOR (AScanner, APowerupGiver) DECLARE_ACTOR (AScanner, APowerupGiver)
public: public:
const char *PickupMessage ();
bool Use (bool pickup); bool Use (bool pickup);
}; };
@ -200,20 +195,16 @@ IMPLEMENT_ACTOR (AScanner, Strife, 2027, 0)
PROP_Inventory_Icon ("I_PMUP") PROP_Inventory_Icon ("I_PMUP")
PROP_PowerupGiver_Powerup ("PowerScanner") PROP_PowerupGiver_Powerup ("PowerScanner")
PROP_Inventory_PickupSound ("misc/i_pkup") PROP_Inventory_PickupSound ("misc/i_pkup")
PROP_Inventory_PickupMessage("$TXT_SCANNER")
END_DEFAULTS END_DEFAULTS
const char *AScanner::PickupMessage ()
{
return "You picked up the scanner.";
}
bool AScanner::Use (bool pickup) bool AScanner::Use (bool pickup)
{ {
if (!(level.flags & LEVEL_ALLMAP)) if (!(level.flags & LEVEL_ALLMAP))
{ {
if (Owner->CheckLocalView (consoleplayer)) if (Owner->CheckLocalView (consoleplayer))
{ {
Printf ("The scanner won't work without a map!\n"); C_MidPrint(GStrings("TXT_NEEDMAP"));
} }
return false; return false;
} }
@ -228,7 +219,6 @@ class APrisonPass : public AKey
public: public:
bool TryPickup (AActor *toucher); bool TryPickup (AActor *toucher);
bool SpecialDropAction (AActor *dropper); bool SpecialDropAction (AActor *dropper);
const char *PickupMessage ();
}; };
FState APrisonPass::States[] = FState APrisonPass::States[] =
@ -243,6 +233,7 @@ IMPLEMENT_ACTOR (APrisonPass, Strife, -1, 0)
PROP_SpawnState (0) PROP_SpawnState (0)
PROP_Inventory_Icon ("I_TOKN") PROP_Inventory_Icon ("I_TOKN")
PROP_Tag ("Prison_pass") PROP_Tag ("Prison_pass")
PROP_Inventory_PickupMessage("$TXT_PRISONPASS")
END_DEFAULTS END_DEFAULTS
bool APrisonPass::TryPickup (AActor *toucher) bool APrisonPass::TryPickup (AActor *toucher)
@ -253,11 +244,6 @@ bool APrisonPass::TryPickup (AActor *toucher)
return true; return true;
} }
const char *APrisonPass::PickupMessage ()
{
return "You picked up the Prison pass.";
}
//============================================================================ //============================================================================
// //
// APrisonPass :: SpecialDropAction // APrisonPass :: SpecialDropAction
@ -430,24 +416,28 @@ END_DEFAULTS
bool AAmmoFillup::TryPickup (AActor *toucher) bool AAmmoFillup::TryPickup (AActor *toucher)
{ {
AInventory *item = toucher->FindInventory<AClipOfBullets>(); const PClass * clip = PClass::FindClass(NAME_ClipOfBullets);
if (item == NULL) if (clip != NULL)
{ {
item = toucher->GiveInventoryType (RUNTIME_CLASS(AClipOfBullets)); AInventory *item = toucher->FindInventory(clip);
if (item != NULL) if (item == NULL)
{
item = toucher->GiveInventoryType (clip);
if (item != NULL)
{
item->Amount = 50;
}
}
else if (item->Amount < 50)
{ {
item->Amount = 50; item->Amount = 50;
} }
else
{
return false;
}
GoAwayAndDie ();
} }
else if (item->Amount < 50)
{
item->Amount = 50;
}
else
{
return false;
}
GoAwayAndDie ();
return true; return true;
} }

View file

@ -361,11 +361,6 @@ void A_FirePoison (AActor *);
class AStrifeCrossbow : public AStrifeWeapon class AStrifeCrossbow : public AStrifeWeapon
{ {
DECLARE_ACTOR (AStrifeCrossbow, AStrifeWeapon) DECLARE_ACTOR (AStrifeCrossbow, AStrifeWeapon)
public:
const char *PickupMessage ()
{
return "You picked up the crossbow";
}
}; };
FState AStrifeCrossbow::States[] = FState AStrifeCrossbow::States[] =
@ -442,6 +437,7 @@ IMPLEMENT_ACTOR (AStrifeCrossbow, Strife, 2001, 0)
PROP_Weapon_AmmoType1 ("ElectricBolts") PROP_Weapon_AmmoType1 ("ElectricBolts")
PROP_Weapon_SisterType ("StrifeCrossbow2") PROP_Weapon_SisterType ("StrifeCrossbow2")
PROP_Weapon_ProjectileType ("ElectricBolt") PROP_Weapon_ProjectileType ("ElectricBolt")
PROP_Inventory_PickupMessage("$TXT_STRIFECROSSBOW")
PROP_Inventory_Icon ("CBOWA0") PROP_Inventory_Icon ("CBOWA0")
PROP_Tag ("crossbow") PROP_Tag ("crossbow")
@ -586,10 +582,6 @@ class AAssaultGun : public AStrifeWeapon
{ {
DECLARE_ACTOR (AAssaultGun, AStrifeWeapon) DECLARE_ACTOR (AAssaultGun, AStrifeWeapon)
public: public:
const char *PickupMessage ()
{
return "You picked up the assault gun";
}
bool HandlePickup (AInventory *item); bool HandlePickup (AInventory *item);
}; };
@ -644,6 +636,7 @@ IMPLEMENT_ACTOR (AAssaultGun, Strife, 2002, 0)
PROP_Inventory_Icon ("RIFLA0") PROP_Inventory_Icon ("RIFLA0")
PROP_Tag ("assault_gun") PROP_Tag ("assault_gun")
PROP_Inventory_PickupMessage("$TXT_ASSAULTGUN")
END_DEFAULTS END_DEFAULTS
//============================================================================ //============================================================================
@ -767,11 +760,6 @@ void A_FireMiniMissile (AActor *);
class AMiniMissileLauncher : public AStrifeWeapon class AMiniMissileLauncher : public AStrifeWeapon
{ {
DECLARE_ACTOR (AMiniMissileLauncher, AStrifeWeapon) DECLARE_ACTOR (AMiniMissileLauncher, AStrifeWeapon)
public:
const char *PickupMessage ()
{
return "You picked up the mini missile launcher";
}
}; };
FState AMiniMissileLauncher::States[] = FState AMiniMissileLauncher::States[] =
@ -818,6 +806,7 @@ IMPLEMENT_ACTOR (AMiniMissileLauncher, Strife, 2003, 0)
PROP_Inventory_Icon ("MMSLA0") PROP_Inventory_Icon ("MMSLA0")
PROP_Tag ("mini_missile_launcher") // "missile_gun" in the Teaser PROP_Tag ("mini_missile_launcher") // "missile_gun" in the Teaser
PROP_Inventory_PickupMessage("$TXT_MMLAUNCHER")
END_DEFAULTS END_DEFAULTS
// Rocket Trail ------------------------------------------------------------- // Rocket Trail -------------------------------------------------------------
@ -956,11 +945,6 @@ void A_RocketInFlight (AActor *self)
void A_FireFlamer (AActor *); void A_FireFlamer (AActor *);
const char *AFlameThrower::PickupMessage ()
{
return "You picked up the flame thrower";
}
FState AFlameThrower::States[] = FState AFlameThrower::States[] =
{ {
S_NORMAL (FLAM, 'A', -1, NULL, NULL), S_NORMAL (FLAM, 'A', -1, NULL, NULL),
@ -1005,36 +989,9 @@ IMPLEMENT_ACTOR (AFlameThrower, Strife, 2005, 0)
PROP_Inventory_Icon ("FLAMA0") PROP_Inventory_Icon ("FLAMA0")
PROP_Tag ("flame_thrower") PROP_Tag ("flame_thrower")
PROP_Inventory_PickupMessage("$TXT_FLAMER")
END_DEFAULTS END_DEFAULTS
// Flame Thrower Parts ------------------------------------------------------
class AFlameThrowerParts : AInventory
{
DECLARE_ACTOR (AFlameThrowerParts, AInventory)
public:
const char *PickupMessage ()
{
return "You picked up the flame thrower parts.";
}
};
FState AFlameThrowerParts::States[] =
{
S_NORMAL (BFLM, 'A', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AFlameThrowerParts, Strife, -1, 0)
PROP_SpawnState (0)
PROP_Flags (MF_SPECIAL)
PROP_Flags2 (MF2_FLOORCLIP)
PROP_StrifeType (191)
PROP_StrifeTeaserType (185)
PROP_StrifeTeaserType2 (189)
PROP_Inventory_FlagsSet (IF_INVBAR)
PROP_Inventory_Icon ("I_BFLM")
PROP_Tag ("flame_thrower_parts")
END_DEFAULTS
// Flame Thrower Projectile ------------------------------------------------- // Flame Thrower Projectile -------------------------------------------------
@ -1126,11 +1083,6 @@ void A_MaulerTorpedoWave (AActor *);
class AMauler : public AStrifeWeapon class AMauler : public AStrifeWeapon
{ {
DECLARE_ACTOR (AMauler, AStrifeWeapon) DECLARE_ACTOR (AMauler, AStrifeWeapon)
public:
const char *PickupMessage ()
{
return "You picked up the mauler";
}
}; };
FState AMauler::States[] = FState AMauler::States[] =
@ -1206,6 +1158,7 @@ IMPLEMENT_ACTOR (AMauler, Strife, 2004, 0)
PROP_Inventory_Icon ("TRPDA0") PROP_Inventory_Icon ("TRPDA0")
PROP_Tag ("mauler") // "blaster" in the Teaser PROP_Tag ("mauler") // "blaster" in the Teaser
PROP_Inventory_PickupMessage("$TXT_MAULER")
END_DEFAULTS END_DEFAULTS
// Mauler Torpedo version --------------------------------------------------- // Mauler Torpedo version ---------------------------------------------------
@ -1700,11 +1653,6 @@ void A_FireGrenade (AActor *);
class AStrifeGrenadeLauncher : public AStrifeWeapon class AStrifeGrenadeLauncher : public AStrifeWeapon
{ {
DECLARE_ACTOR (AStrifeGrenadeLauncher, AStrifeWeapon) DECLARE_ACTOR (AStrifeGrenadeLauncher, AStrifeWeapon)
public:
const char *PickupMessage ()
{
return "You picked up the Grenade launcher";
}
}; };
FState AStrifeGrenadeLauncher::States[] = FState AStrifeGrenadeLauncher::States[] =
@ -1780,6 +1728,7 @@ IMPLEMENT_ACTOR (AStrifeGrenadeLauncher, Strife, 154, 0)
PROP_Inventory_Icon ("GRNDA0") PROP_Inventory_Icon ("GRNDA0")
PROP_Tag ("Grenade_launcher") PROP_Tag ("Grenade_launcher")
PROP_Inventory_PickupMessage("$TXT_GLAUNCHER")
END_DEFAULTS END_DEFAULTS
// White Phosphorous Grenade Launcher --------------------------------------- // White Phosphorous Grenade Launcher ---------------------------------------
@ -1969,6 +1918,7 @@ IMPLEMENT_ACTOR (ASigil, Strife, -1, 0)
PROP_Inventory_PickupSound("weapons/sigilcharge") PROP_Inventory_PickupSound("weapons/sigilcharge")
PROP_Tag ("SIGIL") PROP_Tag ("SIGIL")
PROP_Inventory_Icon ("I_SGL1") PROP_Inventory_Icon ("I_SGL1")
PROP_Inventory_PickupMessage("$TXT_SIGIL")
END_DEFAULTS END_DEFAULTS
// Sigil 1 ------------------------------------------------------------------ // Sigil 1 ------------------------------------------------------------------
@ -2113,17 +2063,6 @@ AInventory *ASigil::CreateCopy (AActor *other)
return copy; return copy;
} }
//============================================================================
//
// ASigil :: PickupMessage
//
//============================================================================
const char *ASigil::PickupMessage ()
{
return "You picked up the SIGIL.";
}
//============================================================================ //============================================================================
// //
// A_SelectPiece // A_SelectPiece

View file

@ -1,71 +0,0 @@
#include "a_pickups.h"
class AHEGrenadeRounds : public AAmmo
{
DECLARE_ACTOR (AHEGrenadeRounds, AAmmo);
public:
virtual const char *PickupMessage ();
};
class APhosphorusGrenadeRounds : public AAmmo
{
DECLARE_ACTOR (APhosphorusGrenadeRounds, AAmmo);
public:
virtual const char *PickupMessage ();
};
class AClipOfBullets : public AAmmo
{
DECLARE_ACTOR (AClipOfBullets, AAmmo)
public:
virtual const char *PickupMessage ();
};
class ABoxOfBullets : public AClipOfBullets
{
DECLARE_ACTOR (ABoxOfBullets, AClipOfBullets)
public:
virtual const char *PickupMessage ();
};
class AMiniMissiles : public AAmmo
{
DECLARE_ACTOR (AMiniMissiles, AAmmo)
public:
virtual const char *PickupMessage ();
};
class ACrateOfMissiles : public AMiniMissiles
{
DECLARE_ACTOR (ACrateOfMissiles, AMiniMissiles)
public:
virtual const char *PickupMessage ();
};
class AEnergyPod : public AAmmo
{
DECLARE_ACTOR (AEnergyPod, AAmmo)
public:
virtual const char *PickupMessage ();
};
class AEnergyPack : public AEnergyPod
{
DECLARE_ACTOR (AEnergyPack, AEnergyPod)
public:
virtual const char *PickupMessage ();
};
class APoisonBolts : public AAmmo
{
DECLARE_ACTOR (APoisonBolts, AAmmo)
public:
virtual const char *PickupMessage ();
};
class AElectricBolts : public AAmmo
{
DECLARE_ACTOR (AElectricBolts, AAmmo)
public:
virtual const char *PickupMessage ();
};

View file

@ -12,7 +12,6 @@
#include "m_swap.h" #include "m_swap.h"
#include "templates.h" #include "templates.h"
#include "a_keys.h" #include "a_keys.h"
#include "a_strifeweaps.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "gi.h" #include "gi.h"
@ -685,26 +684,27 @@ private:
// How much ammo does the player have? // How much ammo does the player have?
static const struct static const struct
{ {
const PClass *AmmoType; ENamedName AmmoType;
int Y; int Y;
} AmmoList[7] = } AmmoList[7] =
{ {
{ RUNTIME_CLASS(AClipOfBullets), 19 }, { NAME_ClipOfBullets, 19 },
{ RUNTIME_CLASS(APoisonBolts), 35 }, { NAME_PoisonBolts, 35 },
{ RUNTIME_CLASS(AElectricBolts), 43 }, { NAME_ElectricBolts, 43 },
{ RUNTIME_CLASS(AHEGrenadeRounds), 59 }, { NAME_HEGrenadeRounds, 59 },
{ RUNTIME_CLASS(APhosphorusGrenadeRounds), 67 }, { NAME_PhosphorusGrenadeRounds, 67 },
{ RUNTIME_CLASS(AMiniMissiles), 75 }, { NAME_MiniMissiles, 75 },
{ RUNTIME_CLASS(AEnergyPod), 83 } { NAME_EnergyPod, 83 }
}; };
for (i = 0; i < 7; ++i) for (i = 0; i < 7; ++i)
{ {
item = CPlayer->mo->FindInventory (AmmoList[i].AmmoType); const PClass * ammotype = PClass::FindClass(AmmoList[i].AmmoType);
item = CPlayer->mo->FindInventory (ammotype);
if (item == NULL) if (item == NULL)
{ {
DrINumber2 (0, left+206*xscale, top+AmmoList[i].Y*yscale, 7*xscale, imgFONY0); DrINumber2 (0, left+206*xscale, top+AmmoList[i].Y*yscale, 7*xscale, imgFONY0);
DrINumber2 (((AInventory *)GetDefaultByType (AmmoList[i].AmmoType))->MaxAmount, DrINumber2 (((AInventory *)GetDefaultByType (ammotype))->MaxAmount,
left+239*xscale, top+AmmoList[i].Y*yscale, 7*xscale, imgFONY0); left+239*xscale, top+AmmoList[i].Y*yscale, 7*xscale, imgFONY0);
} }
else else

View file

@ -242,7 +242,10 @@ enum
ADEF_Weapon_ProjectileType, ADEF_Weapon_ProjectileType,
ADEF_PowerupGiver_Powerup, ADEF_PowerupGiver_Powerup,
ADEF_Inventory_Icon, ADEF_Inventory_Icon,
ADEF_LastString = ADEF_Inventory_Icon, ADEF_Obituary,
ADEF_HitObituary,
ADEF_Inventory_PickupMsg,
ADEF_LastString = ADEF_Inventory_PickupMsg,
// The rest of the properties use their type field (upper 2 bits) // The rest of the properties use their type field (upper 2 bits)
ADEF_XScale, ADEF_XScale,

View file

@ -45,6 +45,7 @@
#include "r_data.h" #include "r_data.h"
#include "w_wad.h" #include "w_wad.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "thingdef.h"
void FActorInfo::BuildDefaults () void FActorInfo::BuildDefaults ()
{ {
@ -61,6 +62,7 @@ void FActorInfo::BuildDefaults ()
parent = Class->ParentClass; parent = Class->ParentClass;
parent->ActorInfo->BuildDefaults (); parent->ActorInfo->BuildDefaults ();
Class->Meta = parent->Meta;
assert (Class->Size >= parent->Size); assert (Class->Size >= parent->Size);
memcpy (Class->Defaults, parent->Defaults, parent->Size); memcpy (Class->Defaults, parent->Defaults, parent->Size);
if (Class->Size > parent->Size) if (Class->Size > parent->Size)
@ -129,9 +131,6 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
switch (defnum) switch (defnum)
{ {
case ADEF_Weapon_AmmoType1:
case ADEF_Weapon_AmmoType2:
case ADEF_Weapon_SisterType:
case ADEF_Weapon_ProjectileType: case ADEF_Weapon_ProjectileType:
case ADEF_PowerupGiver_Powerup: case ADEF_PowerupGiver_Powerup:
datatype = PClass::FindClass (datastr); datatype = PClass::FindClass (datastr);
@ -167,6 +166,19 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
sgClass->Meta.SetMetaString (AMETA_StrifeName, name); sgClass->Meta.SetMetaString (AMETA_StrifeName, name);
break; break;
} }
case ADEF_Obituary:
sgClass->Meta.SetMetaString (AMETA_Obituary, datastr);
break;
case ADEF_HitObituary:
sgClass->Meta.SetMetaString (AMETA_HitObituary, datastr);
break;
case ADEF_Inventory_PickupMsg:
sgClass->Meta.SetMetaString (AIMETA_PickupMessage, datastr);
break;
case ADEF_PowerupGiver_Powerup: case ADEF_PowerupGiver_Powerup:
giver->PowerupType = datatype; giver->PowerupType = datatype;
break; break;
@ -280,10 +292,10 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
case ADEF_Weapon_FlagsSet: weapon->WeaponFlags |= dataint; break; case ADEF_Weapon_FlagsSet: weapon->WeaponFlags |= dataint; break;
case ADEF_Weapon_UpSound: weapon->UpSound = datasound; break; case ADEF_Weapon_UpSound: weapon->UpSound = datasound; break;
case ADEF_Weapon_ReadySound: weapon->ReadySound = datasound; break; case ADEF_Weapon_ReadySound: weapon->ReadySound = datasound; break;
case ADEF_Weapon_SisterType: weapon->SisterWeaponType = datatype; break; case ADEF_Weapon_SisterType: weapon->SisterWeaponType = fuglyname(datastr); break;
case ADEF_Weapon_ProjectileType:weapon->ProjectileType = datatype; break; case ADEF_Weapon_ProjectileType:weapon->ProjectileType = datatype; break;
case ADEF_Weapon_AmmoType1: weapon->AmmoType1 = datatype; break; case ADEF_Weapon_AmmoType1: weapon->AmmoType1 = fuglyname(datastr); break;
case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = datatype; break; case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = fuglyname(datastr); break;
case ADEF_Weapon_AmmoGive1: weapon->AmmoGive1 = dataint; break; case ADEF_Weapon_AmmoGive1: weapon->AmmoGive1 = dataint; break;
case ADEF_Weapon_AmmoGive2: weapon->AmmoGive2 = dataint; break; case ADEF_Weapon_AmmoGive2: weapon->AmmoGive2 = dataint; break;
case ADEF_Weapon_AmmoUse1: weapon->AmmoUse1 = dataint; break; case ADEF_Weapon_AmmoUse1: weapon->AmmoUse1 = dataint; break;

View file

@ -207,6 +207,9 @@ public:
#define PROP_Weapon_ProjectileType(x) ADD_STRING_PROP(ADEF_Weapon_ProjectileType,"\16",x) #define PROP_Weapon_ProjectileType(x) ADD_STRING_PROP(ADEF_Weapon_ProjectileType,"\16",x)
#define PROP_PowerupGiver_Powerup(x) ADD_STRING_PROP(ADEF_PowerupGiver_Powerup,"\17",x) #define PROP_PowerupGiver_Powerup(x) ADD_STRING_PROP(ADEF_PowerupGiver_Powerup,"\17",x)
#define PROP_Inventory_Icon(x) ADD_STRING_PROP(ADEF_Inventory_Icon,"\20",x) #define PROP_Inventory_Icon(x) ADD_STRING_PROP(ADEF_Inventory_Icon,"\20",x)
#define PROP_Obituary(x) ADD_STRING_PROP(ADEF_Obituary,"\21",x)
#define PROP_HitObituary(x) ADD_STRING_PROP(ADEF_HitObituary,"\22",x)
#define PROP_Inventory_PickupMessage(x) ADD_STRING_PROP(ADEF_Obituary,"\23",x)
#define PROP_XScale(x) ADD_BYTE_PROP(ADEF_XScale,x) #define PROP_XScale(x) ADD_BYTE_PROP(ADEF_XScale,x)
#define PROP_YScale(x) ADD_BYTE_PROP(ADEF_YScale,x) #define PROP_YScale(x) ADD_BYTE_PROP(ADEF_YScale,x)

View file

@ -68,7 +68,19 @@ xx(Shell)
xx(RocketAmmo) xx(RocketAmmo)
xx(Cell) xx(Cell)
// Weapon names for the Strife status bar // Hexen Mana
xx(Mana1)
xx(Mana2)
// Ammo and weapon names for the Strife status bar
xx(ClipOfBullets)
xx(PoisonBolts)
xx(ElectricBolts)
xx(HEGrenadeRounds)
xx(PhosphorusGrenadeRounds)
xx(MiniMissiles)
xx(EnergyPod)
xx(StrifeCrossbow) xx(StrifeCrossbow)
xx(AssaultGun) xx(AssaultGun)
xx(FlameThrower) xx(FlameThrower)

View file

@ -127,11 +127,6 @@ void SexMessage (const char *from, char *to, int gender, const char *victim, con
}; };
const char *subst = NULL; const char *subst = NULL;
if (from[0]=='$')
{
from=GStrings(from+1);
}
do do
{ {
if (*from != '%') if (*from != '%')
@ -256,32 +251,16 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
if (message == NULL) if (message == NULL)
{ {
message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary); message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary);
if (message == NULL)
{
message = attacker->GetHitObituary ();
}
} }
} }
else else
{ {
message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary); message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary);
if (message == NULL)
{
message = attacker->GetObituary ();
}
} }
} }
} }
if (message) if (message == NULL && attacker != NULL && attacker->player != NULL)
{
SexMessage (message, gendermessage, gender,
self->player->userinfo.netname, self->player->userinfo.netname);
Printf (PRINT_MEDIUM, "%s\n", gendermessage);
return;
}
if (attacker != NULL && attacker->player != NULL)
{ {
if (friendly) if (friendly)
{ {
@ -297,18 +276,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
if (inflictor != NULL) if (inflictor != NULL)
{ {
message = inflictor->GetClass()->Meta.GetMetaString (AMETA_Obituary); message = inflictor->GetClass()->Meta.GetMetaString (AMETA_Obituary);
if (message == NULL)
{
message = inflictor->GetObituary ();
}
} }
if (message == NULL && attacker->player->ReadyWeapon != NULL) if (message == NULL && attacker->player->ReadyWeapon != NULL)
{ {
message = attacker->player->ReadyWeapon->GetClass()->Meta.GetMetaString (AMETA_Obituary); message = attacker->player->ReadyWeapon->GetClass()->Meta.GetMetaString (AMETA_Obituary);
if (message == NULL)
{
message = attacker->player->ReadyWeapon->GetObituary ();
}
} }
if (message == NULL) if (message == NULL)
{ {
@ -325,15 +296,17 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
} }
} }
if (message) if (message != NULL && message[0] == '$')
{ {
SexMessage (message, gendermessage, gender, message=GStrings[message+1];
self->player->userinfo.netname, attacker->player->userinfo.netname);
Printf (PRINT_MEDIUM, "%s\n", gendermessage);
return;
} }
SexMessage (GStrings("OB_DEFAULT"), gendermessage, gender, if (message == NULL)
{
message = GStrings("OB_DEFAULT");
}
SexMessage (message, gendermessage, gender,
self->player->userinfo.netname, self->player->userinfo.netname); self->player->userinfo.netname, self->player->userinfo.netname);
Printf (PRINT_MEDIUM, "%s\n", gendermessage); Printf (PRINT_MEDIUM, "%s\n", gendermessage);
} }

View file

@ -2247,16 +2247,6 @@ angle_t AActor::AngleIncrements ()
return ANGLE_45; return ANGLE_45;
} }
const char *AActor::GetObituary ()
{
return NULL;
}
const char *AActor::GetHitObituary ()
{
return GetObituary ();
}
void AActor::PreExplode () void AActor::PreExplode ()
{ {
} }

View file

@ -3237,6 +3237,18 @@ static void InventoryGiveQuest (APuzzleItem *defaults, Baggage &bag)
bag.Info->Class->Meta.SetMetaInt(AIMETA_GiveQuest, sc_Number); bag.Info->Class->Meta.SetMetaInt(AIMETA_GiveQuest, sc_Number);
} }
//==========================================================================
//
//==========================================================================
static void HealthLowMessage (AHealth *defaults, Baggage &bag)
{
SC_MustGetNumber();
bag.Info->Class->Meta.SetMetaInt(AIMETA_LowHealth, sc_Number);
SC_MustGetStringName(",");
SC_MustGetString();
bag.Info->Class->Meta.SetMetaString(AIMETA_LowHealthMessage, sc_String);
}
//========================================================================== //==========================================================================
// //
//========================================================================== //==========================================================================
@ -3267,31 +3279,11 @@ static void WeaponAmmoGive2 (AWeapon *defaults, Baggage &bag)
//========================================================================== //==========================================================================
// //
// Passing these parameters is really tricky to allow proper inheritance // Passing these parameters is really tricky to allow proper inheritance
// and forward declarations. Here only an index into a string table is // and forward declarations. Here only a name is
// stored which must be resolved after everything has been declared // stored which must be resolved after everything has been declared
// //
//========================================================================== //==========================================================================
// This class is for storing a name inside a const PClass* field without
// generating compiler warnings. It does not manipulate data in any other
// way.
class fuglyname : public FName
{
public:
fuglyname() : FName() {}
fuglyname(const char *foo) : FName(foo) {}
operator const PClass *()
{
return reinterpret_cast<const PClass *>(size_t(int(*this)));
}
fuglyname &operator= (const PClass *foo)
{
FName *p = this;
*p = ENamedName(reinterpret_cast<size_t>(foo));
return *this;
}
};
static void WeaponAmmoType1 (AWeapon *defaults, Baggage &bag) static void WeaponAmmoType1 (AWeapon *defaults, Baggage &bag)
{ {
SC_MustGetString(); SC_MustGetString();
@ -3547,6 +3539,7 @@ static const ActorProps props[] =
{ "gibhealth", ActorGibHealth, RUNTIME_CLASS(AActor) }, { "gibhealth", ActorGibHealth, RUNTIME_CLASS(AActor) },
{ "heal", ActorHealState, RUNTIME_CLASS(AActor) }, { "heal", ActorHealState, RUNTIME_CLASS(AActor) },
{ "health", ActorHealth, RUNTIME_CLASS(AActor) }, { "health", ActorHealth, RUNTIME_CLASS(AActor) },
{ "health.lowmessage", (apf)HealthLowMessage, RUNTIME_CLASS(AHealth) },
{ "height", ActorHeight, RUNTIME_CLASS(AActor) }, { "height", ActorHeight, RUNTIME_CLASS(AActor) },
{ "hitobituary", ActorHitObituary, RUNTIME_CLASS(AActor) }, { "hitobituary", ActorHitObituary, RUNTIME_CLASS(AActor) },
{ "ice", ActorIceState, RUNTIME_CLASS(AActor) }, { "ice", ActorIceState, RUNTIME_CLASS(AActor) },
@ -3628,15 +3621,28 @@ static const ActorProps *is_actorprop (const char *str)
//========================================================================== //==========================================================================
// //
// Do some postprocessing after everything has been defined // Do some postprocessing after everything has been defined
// This also processes all the internal actors to adjust the type
// fields in the weapons
// //
//========================================================================== //==========================================================================
void FinishThingdef() void FinishThingdef()
{ {
unsigned int i; unsigned int i;
bool isRuntimeActor=false;
for (i = 0;i < PClass::m_RuntimeActors.Size(); i++) for (i = 0;i < PClass::m_Types.Size(); i++)
{ {
PClass * ti = PClass::m_RuntimeActors[i]; PClass * ti = PClass::m_Types[i];
// Skip non-actors
if (!ti->IsDescendantOf(RUNTIME_CLASS(AActor))) continue;
// Everything coming after the first runtime actor is also a runtime actor
// so this check is sufficient
if (ti == PClass::m_RuntimeActors[0])
{
isRuntimeActor=true;
}
// Friendlies never count as kills! // Friendlies never count as kills!
if (GetDefaultByType(ti)->flags & MF_FRIENDLY) if (GetDefaultByType(ti)->flags & MF_FRIENDLY)
@ -3654,13 +3660,16 @@ void FinishThingdef()
if (v != NAME_None && v.IsValidName()) if (v != NAME_None && v.IsValidName())
{ {
defaults->AmmoType1 = PClass::FindClass(v); defaults->AmmoType1 = PClass::FindClass(v);
if (!defaults->AmmoType1) if (isRuntimeActor)
{ {
SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); if (!defaults->AmmoType1)
} {
else if (defaults->AmmoType1->ParentClass != RUNTIME_CLASS(AAmmo)) I_Error("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
{ }
SC_ScriptError("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); else if (defaults->AmmoType1->ParentClass != RUNTIME_CLASS(AAmmo))
{
I_Error("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
}
} }
} }
@ -3668,13 +3677,16 @@ void FinishThingdef()
if (v != NAME_None && v.IsValidName()) if (v != NAME_None && v.IsValidName())
{ {
defaults->AmmoType2 = PClass::FindClass(v); defaults->AmmoType2 = PClass::FindClass(v);
if (!defaults->AmmoType2) if (isRuntimeActor)
{ {
SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); if (!defaults->AmmoType2)
} {
else if (defaults->AmmoType2->ParentClass != RUNTIME_CLASS(AAmmo)) I_Error("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
{ }
SC_ScriptError("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); else if (defaults->AmmoType2->ParentClass != RUNTIME_CLASS(AAmmo))
{
I_Error("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
}
} }
} }
@ -3682,25 +3694,31 @@ void FinishThingdef()
if (v != NAME_None && v.IsValidName()) if (v != NAME_None && v.IsValidName())
{ {
defaults->SisterWeaponType = PClass::FindClass(v); defaults->SisterWeaponType = PClass::FindClass(v);
if (!defaults->SisterWeaponType) if (isRuntimeActor)
{ {
SC_ScriptError("Unknown sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); if (!defaults->SisterWeaponType)
} {
else if (!defaults->SisterWeaponType->IsDescendantOf(RUNTIME_CLASS(AWeapon))) I_Error("Unknown sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
{ }
SC_ScriptError("Invalid sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); else if (!defaults->SisterWeaponType->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{
I_Error("Invalid sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
}
} }
} }
// Do some consistency checks. If these states are undefined the weapon cannot work! if (isRuntimeActor)
if (!defaults->ReadyState) SC_ScriptError("Weapon %s doesn't define a ready state.\n", ti->TypeName.GetChars()); {
if (!defaults->UpState) SC_ScriptError("Weapon %s doesn't define a select state.\n", ti->TypeName.GetChars()); // Do some consistency checks. If these states are undefined the weapon cannot work!
if (!defaults->DownState) SC_ScriptError("Weapon %s doesn't define a deselect state.\n", ti->TypeName.GetChars()); if (!defaults->ReadyState) I_Error("Weapon %s doesn't define a ready state.\n", ti->TypeName.GetChars());
if (!defaults->AtkState) SC_ScriptError("Weapon %s doesn't define an attack state.\n", ti->TypeName.GetChars()); if (!defaults->UpState) I_Error("Weapon %s doesn't define a select state.\n", ti->TypeName.GetChars());
if (!defaults->DownState) I_Error("Weapon %s doesn't define a deselect state.\n", ti->TypeName.GetChars());
if (!defaults->AtkState) I_Error("Weapon %s doesn't define an attack state.\n", ti->TypeName.GetChars());
// If the weapon doesn't define a hold state use the attack state instead. // If the weapon doesn't define a hold state use the attack state instead.
if (!defaults->HoldAtkState) defaults->HoldAtkState=defaults->AtkState; if (!defaults->HoldAtkState) defaults->HoldAtkState=defaults->AtkState;
if (!defaults->AltHoldAtkState) defaults->AltHoldAtkState=defaults->AltAtkState; if (!defaults->AltHoldAtkState) defaults->AltHoldAtkState=defaults->AltAtkState;
}
} }
// same for the weapon type of weapon pieces. // same for the weapon type of weapon pieces.
@ -3715,11 +3733,11 @@ void FinishThingdef()
defaults->WeaponClass = PClass::FindClass(v); defaults->WeaponClass = PClass::FindClass(v);
if (!defaults->WeaponClass) if (!defaults->WeaponClass)
{ {
SC_ScriptError("Unknown weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); I_Error("Unknown weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
} }
else if (!defaults->WeaponClass->IsDescendantOf(RUNTIME_CLASS(AWeapon))) else if (!defaults->WeaponClass->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{ {
SC_ScriptError("Invalid weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); I_Error("Invalid weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
} }
} }
} }

View file

@ -1,6 +1,26 @@
#ifndef __THINGDEF_H #ifndef __THINGDEF_H
#define __THINGDEF_H #define __THINGDEF_H
// This class is for storing a name inside a const PClass* field without
// generating compiler warnings. It does not manipulate data in any other
// way.
class fuglyname : public FName
{
public:
fuglyname() : FName() {}
fuglyname(const char *foo) : FName(foo) {}
operator const PClass *()
{
return reinterpret_cast<const PClass *>(size_t(int(*this)));
}
fuglyname &operator= (const PClass *foo)
{
FName *p = this;
*p = ENamedName(reinterpret_cast<size_t>(foo));
return *this;
}
};
int ParseExpression (bool _not); int ParseExpression (bool _not);
int EvalExpressionI (int id, AActor *self); int EvalExpressionI (int id, AActor *self);

View file

@ -2,8 +2,10 @@
#include "actors/shared/splashes.txt" #include "actors/shared/splashes.txt"
#include "actors/doom/deadthings.txt" #include "actors/doom/deadthings.txt"
#include "actors/doom/doomammo.txt"
#include "actors/doom/doomarmor.txt" #include "actors/doom/doomarmor.txt"
#include "actors/doom/doomartifacts.txt" #include "actors/doom/doomartifacts.txt"
#include "actors/doom/doomhealth.txt"
#include "actors/doom/doomkeys.txt" #include "actors/doom/doomkeys.txt"
#include "actors/doom/doomdecorations.txt" #include "actors/doom/doomdecorations.txt"
#include "actors/doom/stealthmonsters.txt" #include "actors/doom/stealthmonsters.txt"
@ -11,6 +13,7 @@
#include "actors/raven/ravenartifacts.txt" #include "actors/raven/ravenartifacts.txt"
#include "actors/raven/ravenhealth.txt" #include "actors/raven/ravenhealth.txt"
#include "actors/heretic/hereticammo.txt"
#include "actors/heretic/hereticarmor.txt" #include "actors/heretic/hereticarmor.txt"
#include "actors/heretic/hereticartifacts.txt" #include "actors/heretic/hereticartifacts.txt"
#include "actors/heretic/heretickeys.txt" #include "actors/heretic/heretickeys.txt"
@ -21,6 +24,7 @@
#include "actors/hexen/hexendecorations.txt" #include "actors/hexen/hexendecorations.txt"
#include "actors/hexen/hexenkeys.txt" #include "actors/hexen/hexenkeys.txt"
#include "actors/hexen/hexenspecialdecs.txt" #include "actors/hexen/hexenspecialdecs.txt"
#include "actors/hexen/mana.txt"
#include "actors/hexen/puzzleitems.txt" #include "actors/hexen/puzzleitems.txt"
#include "actors/hexen/scriptprojectiles.txt" #include "actors/hexen/scriptprojectiles.txt"
#include "actors/hexen/speedboots.txt" #include "actors/hexen/speedboots.txt"
@ -30,6 +34,7 @@
#include "actors/strife/peasants.txt" #include "actors/strife/peasants.txt"
#include "actors/strife/questitems.txt" #include "actors/strife/questitems.txt"
#include "actors/strife/ratbuddy.txt" #include "actors/strife/ratbuddy.txt"
#include "actors/strife/strifeammo.txt"
#include "actors/strife/strifearmor.txt" #include "actors/strife/strifearmor.txt"
#include "actors/strife/strifeitems.txt" #include "actors/strife/strifeitems.txt"
#include "actors/strife/strifekeys.txt" #include "actors/strife/strifekeys.txt"

View file

@ -0,0 +1,144 @@
// Clip --------------------------------------------------------------------
ACTOR Clip : Ammo 2007
{
Game Doom
SpawnID 11
Inventory.PickupMessage "$GOTCLIP"
Inventory.Amount 10
Inventory.MaxAmount 200
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 400
Inventory.Icon "CLIPA0"
States
{
Spawn:
CLIP A -1
Stop
}
}
// Clip box ----------------------------------------------------------------
ACTOR ClipBox : Clip 2048
{
Game Doom
SpawnID 139
Inventory.PickupMessage "$GOTCLIPBOX"
Inventory.Amount 50
States
{
Spawn:
AMMO A -1
Stop
}
}
// Rocket ------------------------------------------------------------------
ACTOR RocketAmmo : Ammo 2010
{
Game Doom
SpawnID 140
Inventory.PickupMessage "$GOTROCKET"
Inventory.Amount 1
Inventory.MaxAmount 50
Ammo.BackpackAmount 1
Ammo.BackpackMaxAmount 100
Inventory.Icon "ROCKA0"
States
{
Spawn:
ROCK A -1
Stop
}
}
// Rocket box --------------------------------------------------------------
ACTOR RocketBox : RocketAmmo 2046
{
Game Doom
SpawnID 141
Inventory.PickupMessage "$GOTROCKBOX"
Inventory.Amount 5
States
{
Spawn:
BROK A -1
Stop
}
}
// Cell --------------------------------------------------------------------
ACTOR Cell : Ammo 2047
{
Game Doom
SpawnID 75
Inventory.PickupMessage "$GOTCELL"
Inventory.Amount 20
Inventory.MaxAmount 300
Ammo.BackpackAmount 20
Ammo.BackpackMaxAmount 600
Inventory.Icon "CELLA0"
States
{
Spawn:
CELL A -1
Stop
}
}
// Cell pack ---------------------------------------------------------------
ACTOR CellPack : Cell 17
{
Game Doom
SpawnID 11
Inventory.PickupMessage "$GOTCELLBOX"
Inventory.Amount 100
States
{
Spawn:
CELP A -1
Stop
}
}
// Shells ------------------------------------------------------------------
ACTOR Shell : Ammo 2008
{
Game Doom
SpawnID 12
Inventory.PickupMessage "$GOTSHELLS"
Inventory.Amount 4
Inventory.MaxAmount 50
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 100
Inventory.Icon "SHELA0"
States
{
Spawn:
SHEL A -1
Stop
}
}
// Shell box ---------------------------------------------------------------
ACTOR ShellBox : Shell 2049
{
Game Doom
SpawnID 143
Inventory.PickupMessage "$GOTSHELLBOX"
Inventory.Amount 20
States
{
Spawn:
SBOX A -1
Stop
}
}

View file

@ -0,0 +1,53 @@
// Health bonus -------------------------------------------------------------
ACTOR HealthBonus : Health 2014
{
Game Doom
SpawnID 152
+COUNTITEM
+INVENTORY.ALWAYSPICKUP
Inventory.Amount 1
Inventory.MaxAmount 200
Inventory.PickupMessage "$GOTHTHBONUS"
States
{
Spawn:
BON1 ABCDCB 6
Loop
}
}
// Stimpack -----------------------------------------------------------------
ACTOR Stimpack : Health 2011
{
Game Doom
SpawnID 23
Inventory.Amount 10
Inventory.MaxAmount 100
Inventory.PickupMessage "$GOTSTIM"
States
{
Spawn:
STIM A -1
Stop
}
}
// Medikit -----------------------------------------------------------------
ACTOR Medikit : Health 2012
{
Game Doom
SpawnID 24
Inventory.Amount 25
Inventory.MaxAmount 100
Inventory.PickupMessage "$GOTMEDIKIT"
Health.LowMessage 25, "$GOTMEDINEED"
States
{
Spawn:
MEDI A -1
Stop
}
}

View file

@ -0,0 +1,230 @@
// Wimpy ammo ---------------------------------------------------------------
ACTOR GoldWandAmmo : Ammo 10
{
Game Heretic
SpawnID 11
Inventory.PickupMessage "$TXT_AMMOGOLDWAND1"
Inventory.Amount 10
Inventory.MaxAmount 100
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 200
Inventory.Icon "INAMGLD"
States
{
Spawn:
AMG1 A -1
Stop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR GoldWandHefty : GoldWandAmmo 12
{
Game Heretic
SpawnID 12
Inventory.PickupMessage "$TXT_AMMOGOLDWAND2"
Inventory.Amount 50
States
{
Spawn:
AMG2 ABC 4
Loop
}
}
// Wimpy ammo ---------------------------------------------------------------
ACTOR CrossbowAmmo : Ammo 18
{
Game Heretic
SpawnID 33
Inventory.PickupMessage "$TXT_AMMOCROSSBOW1"
Inventory.Amount 5
Inventory.MaxAmount 50
Ammo.BackpackAmount 5
Ammo.BackpackMaxAmount 100
Inventory.Icon "INAMBOW"
States
{
Spawn:
AMC1 A -1
Stop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR CrossbowHefty : CrossbowAmmo 19
{
Game Heretic
SpawnID 34
Inventory.PickupMessage "$TXT_AMMOCROSSBOW2"
Inventory.Amount 20
States
{
Spawn:
AMC2 ABC 5
Loop
}
}
// Wimpy ammo ---------------------------------------------------------------
ACTOR MaceAmmo : Ammo 13
{
Game Heretic
SpawnID 35
Inventory.PickupMessage "$TXT_AMMOMACE1"
Inventory.Amount 20
Inventory.MaxAmount 150
Ammo.BackpackAmount 20
Ammo.BackpackMaxAmount 300
Inventory.Icon "INAMLOB"
States
{
Spawn:
AMM1 A -1
Stop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR MaceHefty : MaceAmmo 16
{
Game Heretic
SpawnID 36
Inventory.PickupMessage "$TXT_AMMOMACE1"
Inventory.Amount 100
States
{
Spawn:
AMM2 A -1
Stop
}
}
// Wimpy ammo ---------------------------------------------------------------
ACTOR BlasterAmmo : Ammo 54
{
Game Heretic
SpawnID 37
Inventory.PickupMessage "$TXT_AMMOBLASTER1"
Inventory.Amount 10
Inventory.MaxAmount 200
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 400
Inventory.Icon "INAMBST"
States
{
Spawn:
AMB1 ABC 4
Loop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR BlasterHefty : BlasterAmmo 55
{
Game Heretic
SpawnID 38
Inventory.PickupMessage "$TXT_AMMOBLASTER2"
Inventory.Amount 25
States
{
Spawn:
AMB2 ABC 4
Loop
}
}
// Wimpy ammo ---------------------------------------------------------------
ACTOR SkullRodAmmo : Ammo 20
{
Game Heretic
SpawnID 158
Inventory.PickupMessage "$TXT_AMMOSKULLROD1"
Inventory.Amount 20
Inventory.MaxAmount 200
Ammo.BackpackAmount 20
Ammo.BackpackMaxAmount 400
Inventory.Icon "INAMRAM"
States
{
Spawn:
AMS1 AB 5
Loop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR SkullRodHefty : SkullRodAmmo 21
{
Game Heretic
SpawnID 159
Inventory.PickupMessage "$TXT_AMMOSKULLROD2"
Inventory.Amount 100
States
{
Spawn:
AMS2 AB 5
Loop
}
}
// Wimpy ammo ---------------------------------------------------------------
ACTOR PhoenixRodAmmo : Ammo 22
{
Game Heretic
SpawnID 161
Inventory.PickupMessage "$TXT_AMMOPHOENIXROD1"
Inventory.Amount 1
Inventory.MaxAmount 20
Ammo.BackpackAmount 1
Ammo.BackpackMaxAmount 40
Inventory.Icon "INAMPNX"
States
{
Spawn:
AMP1 ABC 4
Loop
}
}
// Hefty ammo ---------------------------------------------------------------
ACTOR PhoenixRodHefty : PhoenixRodAmmo 23
{
Game Heretic
SpawnID 162
Inventory.PickupMessage "$TXT_AMMOPHOENIXROD2"
Inventory.Amount 10
States
{
Spawn:
AMP2 ABC 4
Loop
}
}
// --- Bag of holding -------------------------------------------------------
ACTOR BagOfHolding : Backpack 8
{
Game Heretic
SpawnID 136
Inventory.PickupMessage "$TXT_ITEMBAGOFHOLDING"
+COUNTITEM
+FLOATBOB
States
{
Spawn:
BAGH A -1
Stop
}
}

View file

@ -0,0 +1,93 @@
// Blue mana ----------------------------------------------------------------
ACTOR Mana1 : Ammo 122
{
Game Hexen
SpawnID 11
Inventory.Amount 15
Inventory.MaxAmount 200
Ammo.BackpackAmount 15
Ammo.BackpackMaxAmount 200
Radius 8
Height 8
+FLOATBOB
Inventory.Icon "MAN1I0"
Inventory.PickupMessage "$TXT_MANA_1"
States
{
Spawn:
MAN1 ABCDEFGHI 4 Bright
Loop
}
}
// Green mana ---------------------------------------------------------------
ACTOR Mana2 : Ammo 124
{
Game Hexen
SpawnID 12
Inventory.Amount 15
Inventory.MaxAmount 200
Ammo.BackpackAmount 15
Ammo.BackpackMaxAmount 200
Radius 8
Height 8
+FLOATBOB
Inventory.Icon "MAN2G0"
Inventory.PickupMessage "$TXT_MANA_2"
States
{
Spawn:
MAN2 ABCDEFGHIJKLMNOP 4 Bright
Loop
}
}
// Combined mana ------------------------------------------------------------
ACTOR Mana3 : CustomInventory 8004
{
Game Hexen
SpawnID 75
Radius 8
Height 8
+FLOATBOB
Inventory.PickupMessage "$TXT_MANA_BOTH"
States
{
Spawn:
MAN3 ABCDEFGHIJKLMNOP 4 Bright
Loop
Pickup:
TNT1 A 0 A_GiveInventory("Mana1", 20)
TNT1 A 0 A_GiveInventory("Mana2", 20)
Stop
}
}
// Boost Mana Artifact Krater of Might ------------------------------------
ACTOR ArtiBoostMana : CustomInventory 8003
{
Game Hexen
SpawnID 26
+FLOATBOB
+INVENTORY.INVBAR
+INVENTORY.PICKUPFLASH
+INVENTORY.FANCYPICKUPSOUND
Inventory.DefMaxAmount
Inventory.Icon "ARTIBMAN"
Inventory.PickupSound "misc/p_pkup"
Inventory.PickupMessage "$TXT_ARTIBOOSTMANA"
States
{
Spawn:
BMAN A -1
Stop
Use:
TNT1 A 0 A_GiveInventory("Mana1", 200)
TNT1 A 0 A_GiveInventory("Mana2", 200)
Stop
}
}

View file

@ -0,0 +1,231 @@
// HE-Grenade Rounds --------------------------------------------------------
ACTOR HEGrenadeRounds : Ammo 152
{
Game Strife
+FLOORCLIP
ConversationID 177, 170, 174
Inventory.Amount 6
Inventory.MaxAmount 30
Ammo.BackpackAmount 6
Ammo.BackpackMaxAmount 60
Inventory.Icon "I_GRN1"
Tag "HE-Grenade_Rounds"
Inventory.PickupMessage "$TXT_HEGRENADES"
States
{
Spawn:
GRN1 A -1
Stop
}
}
// Phosphorus-Grenade Rounds ------------------------------------------------
ACTOR PhosphorusGrenadeRounds : Ammo 153
{
Game Strife
+FLOORCLIP
ConversationID 178, 171, 175
Inventory.Amount 4
Inventory.MaxAmount 16
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 32
Inventory.Icon "I_GRN2"
Tag "Phoshorus-Grenade_Rounds" // "Fire-Grenade_Rounds" in the Teaser
Inventory.PickupMessage "$TXT_PHGRENADES"
States
{
Spawn:
GRN2 A -1
Stop
}
}
// Clip of Bullets ----------------------------------------------------------
ACTOR ClipOfBullets : Ammo 2007
{
Game Strife
SpawnID 11
ConversationID 179, 173, 177
+FLOORCLIP
Inventory.Amount 10
Inventory.MaxAmount 250
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 500
Inventory.Icon "I_BLIT"
Tag "clip_of_bullets" // "bullets" in the Teaser
Inventory.PickupMessage "$TXT_CLIPOFBULLETS"
States
{
Spawn:
BLIT A -1
Stop
}
}
// Box of Bullets -----------------------------------------------------------
ACTOR BoxOfBullets : ClipOfBullets 2048
{
Game Strife
SpawnID 139
ConversationID 180, 174, 178
Inventory.Amount 50
Tag "ammo"
Inventory.PickupMessage "$TXT_BOXOFBULLETS"
States
{
Spawn:
BBOX A -1
Stop
}
}
// Mini Missiles ------------------------------------------------------------
ACTOR MiniMissiles : Ammo 2010
{
Game Strife
SpawnID 140
ConversationID 181, 175, 179
+FLOORCLIP
Inventory.Amount 4
Inventory.MaxAmount 100
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 200
Inventory.Icon "I_ROKT"
Tag "mini_missiles" //"rocket" in the Teaser
Inventory.PickupMessage "$TXT_MINIMISSILES"
States
{
Spawn:
MSSL A -1
Stop
}
}
// Crate of Missiles --------------------------------------------------------
ACTOR CrateOfMissiles : MiniMissiles 2046
{
Game Strife
SpawnID 141
ConversationID 182, 176, 180
Inventory.Amount 20
Tag "crate_of_missiles" //"box_of_rockets" in the Teaser
Inventory.PickupMessage "$TXT_CRATEOFMISSILES"
States
{
Spawn:
ROKT A -1
Stop
}
}
// Energy Pod ---------------------------------------------------------------
ACTOR EnergyPod : Ammo 2047
{
Game Strife
SpawnID 75
ConversationID 183, 177, 181
+FLOORCLIP
Inventory.Amount 20
Inventory.MaxAmount 400
Ammo.BackpackAmount 20
Ammo.BackpackMaxAmount 800
Ammo.DropAmount 20
Inventory.Icon "I_BRY1"
Tag "energy_pod"
Inventory.PickupMessage "$TXT_ENERGYPOD"
States
{
Spawn:
BRY1 AB 6
Loop
}
}
// Energy pack ---------------------------------------------------------------
ACTOR EnergyPack : EnergyPod 17
{
Game Strife
SpawnID 142
ConversationID 184, 178, 182
Inventory.Amount 100
Tag "energy_pack"
Inventory.PickupMessage "$TXT_ENERGYPACK"
States
{
Spawn:
CPAC AB 6
Loop
}
}
// Poison Bolt Quiver -------------------------------------------------------
ACTOR PoisonBolts : Ammo 115
{
Game Strife
ConversationID 185, 179, 183
+FLOORCLIP
Inventory.Amount 10
Inventory.MaxAmount 25
Ammo.BackpackAmount 2
Ammo.BackpackMaxAmount 50
Inventory.Icon "I_PQRL"
Tag "poison_bolts" // "poison_arrows" in the Teaser
Inventory.PickupMessage "$TXT_POISONBOLTS"
States
{
Spawn:
PQRL A -1
Stop
}
}
// Electric Bolt Quiver -------------------------------------------------------
ACTOR ElectricBolts : Ammo 114
{
Game Strife
ConversationID 186, 180, 184
+FLOORCLIP
Inventory.Amount 20
Inventory.MaxAmount 50
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 100
Inventory.Icon "I_XQRL"
Tag "electric_bolts" // "electric_arrows" in the Teaser
Inventory.PickupMessage "$TXT_ELECTRICBOLTS"
States
{
Spawn:
XQRL A -1
Stop
}
}
// Ammo Satchel -------------------------------------------------------------
ACTOR AmmoSatchel : Backpack 183
{
Game Strife
SpawnID 144
ConversationID 187, 181, 184
+FLOORCLIP
Inventory.Icon "I_BKPK"
Tag "Ammo_satchel" // "Back_pack" in the Teaser
Inventory.PickupMessage "$TXT_AMMOSATCHEL"
States
{
Spawn:
BKPK A -1
Stop
}
}

View file

@ -268,6 +268,25 @@ ACTOR OfficersUniform : Inventory 52
} }
} }
// Flame Thrower Parts ------------------------------------------------------
ACTOR FlameThrowerParts : Inventory
{
Game Strife
ConversationID 191, 185, 189
+FLOORCLIP
+INVENTORY.INVBAR
Inventory.Icon "I_BFLM"
Tag "flame_thrower_parts"
Inventory.PickupMessage "$TXT_FTHROWERPARTS"
States
{
Spawn:
BFLM A -1
Stop
}
}
// InterrogatorReport ------------------------------------------------------- // InterrogatorReport -------------------------------------------------------
// SCRIPT32 in strife0.wad has an Acolyte that drops this, but I couldn't // SCRIPT32 in strife0.wad has an Acolyte that drops this, but I couldn't

View file

@ -966,6 +966,7 @@ TXT_WEAPON_C4 = "WRAITHVERGE ASSEMBLED";
TXT_WEAPON_M2 = "FROST SHARDS"; TXT_WEAPON_M2 = "FROST SHARDS";
TXT_WEAPON_M3 = "ARC OF DEATH"; TXT_WEAPON_M3 = "ARC OF DEATH";
TXT_WEAPON_M4 = "BLOODSCOURGE ASSEMBLED"; TXT_WEAPON_M4 = "BLOODSCOURGE ASSEMBLED";
TXT_WEAPONPIECE = "A weapon piece! This is your lucky day!";
TXT_QUIETUS_PIECE = "SEGMENT OF QUIETUS"; TXT_QUIETUS_PIECE = "SEGMENT OF QUIETUS";
TXT_WRAITHVERGE_PIECE = "SEGMENT OF WRAITHVERGE"; TXT_WRAITHVERGE_PIECE = "SEGMENT OF WRAITHVERGE";
TXT_BLOODSCOURGE_PIECE = "SEGMENT OF BLOODSCOURGE"; TXT_BLOODSCOURGE_PIECE = "SEGMENT OF BLOODSCOURGE";
@ -1013,9 +1014,27 @@ TXT_SHADOWARMOR = "You picked up the Shadow armor.";
TXT_ENVSUIT = "You picked up the Environmental Suit."; TXT_ENVSUIT = "You picked up the Environmental Suit.";
TXT_GUARDUNIFORM = "You picked up the Guard Uniform."; TXT_GUARDUNIFORM = "You picked up the Guard Uniform.";
TXT_OFFICERSUNIFORM = "You picked up the Officer's Uniform."; TXT_OFFICERSUNIFORM = "You picked up the Officer's Uniform.";
TXT_FTHROWERPARTS = "You picked up the flame thrower parts.";
TXT_REPORT = "You picked up the report."; TXT_REPORT = "You picked up the report.";
TXT_INFO = "You picked up the info."; TXT_INFO = "You picked up the info.";
TXT_TARGETER = "You picked up the Targeter."; TXT_TARGETER = "You picked up the Targeter.";
TXT_COMMUNICATOR = "You picked up the Communicator";
TXT_COIN = "You picked up the coin.";
TXT_XGOLD = "You picked up %d gold.";
TXT_BEACON = "You picked up the Teleporter Beacon.";
TXT_DEGNINORE = "You picked up the Degnin Ore.";
TXT_SCANNER = "You picked up the scanner.";
TXT_NEEDMAP = "The scanner won't work without a map!\n";
TXT_PRISONPASS = "You picked up the Prison pass.";
TXT_STRIFECROSSBOW = "You picked up the crossbow";
TXT_ASSAULTGUN = "You picked up the assault gun";
TXT_MMLAUNCHER = "You picked up the mini missile launcher";
TXT_FLAMER = "You picked up the flame thrower";
TXT_MAULER = "You picked up the mauler";
TXT_GLAUNCHER = "You picked up the Grenade launcher";
TXT_SIGIL = "You picked up the SIGIL.";
TXT_BASEKEY = "You picked up the Base Key."; TXT_BASEKEY = "You picked up the Base Key.";
TXT_GOVSKEY = "You picked up the Govs Key."; TXT_GOVSKEY = "You picked up the Govs Key.";
@ -1046,6 +1065,18 @@ TXT_MINEKEY = "You picked up the Mine Key.";
TXT_NEWKEY5 = "You picked up the New Key5."; TXT_NEWKEY5 = "You picked up the New Key5.";
TXT_ORACLEPASS = "You picked up the Oracle Pass."; TXT_ORACLEPASS = "You picked up the Oracle Pass.";
TXT_HEGRENADES = "You picked up the HE-Grenade Rounds.";
TXT_PHGRENADES = "You picked up the Phoshorus-Grenade Rounds.";
TXT_CLIPOFBULLETS = "You picked up the clip of bullets.";
TXT_BOXOFBULLETS = "You picked up the box of bullets.";
TXT_MINIMISSILES = "You picked up the mini missiles.";
TXT_CRATEOFMISSILES = "You picked up the crate of missiles.";
TXT_ENERGYPOD = "You picked up the energy pod.";
TXT_ENERGYPACK = "You picked up the energy pack.";
TXT_POISONBOLTS = "You picked up the poison bolts.";
TXT_ELECTRICBOLTS = "You picked up the electric bolts.";
TXT_AMMOSATCHEL = "You picked up the ammo satchel";
// Random dialogs // Random dialogs
TXT_RANDOM_PEASANT_01 = "Please don't hurt me."; TXT_RANDOM_PEASANT_01 = "Please don't hurt me.";

View file

@ -240,8 +240,10 @@ actors/shared/debris.txt decorate/shared/debris.txt
actors/shared/splashes.txt decorate/shared/splashes.txt actors/shared/splashes.txt decorate/shared/splashes.txt
actors/doom/deadthings.txt decorate/doom/deadthings.txt actors/doom/deadthings.txt decorate/doom/deadthings.txt
actors/doom/doomammo.txt decorate/doom/doomammo.txt
actors/doom/doomarmor.txt decorate/doom/doomarmor.txt actors/doom/doomarmor.txt decorate/doom/doomarmor.txt
actors/doom/doomartifacts.txt decorate/doom/doomartifacts.txt actors/doom/doomartifacts.txt decorate/doom/doomartifacts.txt
actors/doom/doomhealth.txt decorate/doom/doomhealth.txt
actors/doom/doomkeys.txt decorate/doom/doomkeys.txt actors/doom/doomkeys.txt decorate/doom/doomkeys.txt
actors/doom/doomdecorations.txt decorate/doom/doomdecorations.txt actors/doom/doomdecorations.txt decorate/doom/doomdecorations.txt
actors/doom/stealthmonsters.txt decorate/doom/stealthmonsters.txt actors/doom/stealthmonsters.txt decorate/doom/stealthmonsters.txt
@ -249,6 +251,7 @@ actors/doom/stealthmonsters.txt decorate/doom/stealthmonsters.txt
actors/raven/ravenartifacts.txt decorate/raven/ravenartifacts.txt actors/raven/ravenartifacts.txt decorate/raven/ravenartifacts.txt
actors/raven/ravenhealth.txt decorate/raven/ravenhealth.txt actors/raven/ravenhealth.txt decorate/raven/ravenhealth.txt
actors/heretic/hereticammo.txt decorate/heretic/hereticammo.txt
actors/heretic/hereticarmor.txt decorate/heretic/hereticarmor.txt actors/heretic/hereticarmor.txt decorate/heretic/hereticarmor.txt
actors/heretic/hereticartifacts.txt decorate/heretic/hereticartifacts.txt actors/heretic/hereticartifacts.txt decorate/heretic/hereticartifacts.txt
actors/heretic/heretickeys.txt decorate/heretic/heretickeys.txt actors/heretic/heretickeys.txt decorate/heretic/heretickeys.txt
@ -259,6 +262,7 @@ actors/hexen/hexenarmor.txt decorate/hexen/hexenarmor.txt
actors/hexen/hexendecorations.txt decorate/hexen/hexendecorations.txt actors/hexen/hexendecorations.txt decorate/hexen/hexendecorations.txt
actors/hexen/hexenkeys.txt decorate/hexen/hexenkeys.txt actors/hexen/hexenkeys.txt decorate/hexen/hexenkeys.txt
actors/hexen/hexenspecialdecs.txt decorate/hexen/hexenspecialdecs.txt actors/hexen/hexenspecialdecs.txt decorate/hexen/hexenspecialdecs.txt
actors/hexen/mana.txt decorate/hexen/mana.txt
actors/hexen/puzzleitems.txt decorate/hexen/puzzleitems.txt actors/hexen/puzzleitems.txt decorate/hexen/puzzleitems.txt
actors/hexen/scriptprojectiles.txt decorate/hexen/scriptprojectiles.txt actors/hexen/scriptprojectiles.txt decorate/hexen/scriptprojectiles.txt
actors/hexen/speedboots.txt decorate/hexen/speedboots.txt actors/hexen/speedboots.txt decorate/hexen/speedboots.txt
@ -268,6 +272,7 @@ actors/strife/merchants.txt decorate/strife/merchants.txt
actors/strife/peasants.txt decorate/strife/peasants.txt actors/strife/peasants.txt decorate/strife/peasants.txt
actors/strife/questitems.txt decorate/strife/questitems.txt actors/strife/questitems.txt decorate/strife/questitems.txt
actors/strife/ratbuddy.txt decorate/strife/ratbuddy.txt actors/strife/ratbuddy.txt decorate/strife/ratbuddy.txt
actors/strife/strifeammo.txt decorate/strife/strifeammo.txt
actors/strife/strifearmor.txt decorate/strife/strifearmor.txt actors/strife/strifearmor.txt decorate/strife/strifearmor.txt
actors/strife/strifeitems.txt decorate/strife/strifeitems.txt actors/strife/strifeitems.txt decorate/strife/strifeitems.txt
actors/strife/strifekeys.txt decorate/strife/strifekeys.txt actors/strife/strifekeys.txt decorate/strife/strifekeys.txt

File diff suppressed because it is too large Load diff