mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
- 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:
parent
9338c7360b
commit
1bd6ac028b
86 changed files with 2431 additions and 3339 deletions
|
@ -1,4 +1,21 @@
|
|||
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.
|
||||
|
||||
June 14, 2006
|
||||
|
|
|
@ -442,12 +442,6 @@ public:
|
|||
// Smallest yaw interval for a mapthing to be spawned with
|
||||
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
|
||||
virtual bool SuggestMissileAttack (fixed_t dist);
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ void DCajunMaster::WhatToGet (AActor *actor, AActor *item)
|
|||
// if (item->IsKindOf (RUNTIME_CLASS(AArtifact)))
|
||||
// return; // don't know how to use artifacts
|
||||
if (item->IsKindOf (RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
{
|
||||
// FIXME
|
||||
AWeapon *weapon = static_cast<AWeapon *> (item);
|
||||
AWeapon *heldWeapon;
|
||||
|
|
|
@ -2639,9 +2639,6 @@ bool ADehackedPickup::TryPickup (AActor *toucher)
|
|||
|
||||
const char *ADehackedPickup::PickupMessage ()
|
||||
{
|
||||
const char *message = RealPickup->GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
|
||||
if (message != NULL) return message;
|
||||
|
||||
return RealPickup->PickupMessage ();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ void A_SpidRefire (AActor *self);
|
|||
class AArachnotron : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AArachnotron, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_BABY"); }
|
||||
};
|
||||
|
||||
FState AArachnotron::States[] =
|
||||
|
@ -92,6 +90,8 @@ IMPLEMENT_ACTOR (AArachnotron, Doom, 68, 6)
|
|||
PROP_PainSound ("baby/pain")
|
||||
PROP_DeathSound ("baby/death")
|
||||
PROP_ActiveSound ("baby/active")
|
||||
PROP_Obituary("$OB_BABY")
|
||||
|
||||
END_DEFAULTS
|
||||
|
||||
class AArachnotronPlasma : public APlasmaBall
|
||||
|
|
|
@ -92,12 +92,9 @@ IMPLEMENT_ACTOR (AArchvile, Doom, 64, 111)
|
|||
PROP_PainSound ("vile/pain")
|
||||
PROP_DeathSound ("vile/death")
|
||||
PROP_ActiveSound ("vile/active")
|
||||
END_DEFAULTS
|
||||
PROP_Obituary("$OB_VILE")
|
||||
|
||||
const char *AArchvile::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_VILE");
|
||||
}
|
||||
END_DEFAULTS
|
||||
|
||||
class AArchvileFire : public AActor
|
||||
{
|
||||
|
|
|
@ -15,9 +15,6 @@ void A_BruisAttack (AActor *);
|
|||
class ABaronOfHell : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ABaronOfHell, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_BARON"); }
|
||||
const char *GetHitObituary () { return GStrings("OB_BARONHIT"); }
|
||||
};
|
||||
|
||||
FState ABaronOfHell::States[] =
|
||||
|
@ -87,6 +84,9 @@ IMPLEMENT_ACTOR (ABaronOfHell, Doom, 3003, 3)
|
|||
PROP_PainSound ("baron/pain")
|
||||
PROP_DeathSound ("baron/death")
|
||||
PROP_ActiveSound ("baron/active")
|
||||
PROP_Obituary("$OB_BARON")
|
||||
PROP_HitObituary("$OB_BARONHIT")
|
||||
|
||||
END_DEFAULTS
|
||||
|
||||
class ABaronBall : public AActor
|
||||
|
@ -131,9 +131,6 @@ AT_SPEED_SET (BaronBall, speed)
|
|||
class AHellKnight : public ABaronOfHell
|
||||
{
|
||||
DECLARE_ACTOR (AHellKnight, ABaronOfHell)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_KNIGHT"); }
|
||||
const char *GetHitObituary () { return GStrings("OB_KNIGHTHIT"); }
|
||||
};
|
||||
|
||||
FState AHellKnight::States[] =
|
||||
|
@ -203,6 +200,8 @@ IMPLEMENT_ACTOR (AHellKnight, Doom, 69, 113)
|
|||
PROP_PainSound ("knight/pain")
|
||||
PROP_DeathSound ("knight/death")
|
||||
PROP_ActiveSound ("knight/active")
|
||||
PROP_Obituary("$OB_KNIGHT")
|
||||
PROP_HitObituary("$OB_KNIGHTHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void A_BruisAttack (AActor *self)
|
||||
|
|
|
@ -14,9 +14,6 @@ void A_HeadAttack (AActor *);
|
|||
class ACacodemon : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ACacodemon, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_CACO"); }
|
||||
const char *GetHitObituary () { return GStrings("OB_CACOHIT"); }
|
||||
};
|
||||
|
||||
FState ACacodemon::States[] =
|
||||
|
@ -76,6 +73,8 @@ IMPLEMENT_ACTOR (ACacodemon, Doom, 3005, 19)
|
|||
PROP_DeathSound ("caco/death")
|
||||
PROP_ActiveSound ("caco/active")
|
||||
PROP_AttackSound ("caco/melee")
|
||||
PROP_Obituary("$OB_CACO")
|
||||
PROP_HitObituary("$OB_CACOHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
class ACacodemonBall : public AActor
|
||||
|
|
|
@ -16,8 +16,6 @@ void A_Metal (AActor *);
|
|||
class ACyberdemon : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ACyberdemon, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_CYBORG"); }
|
||||
};
|
||||
|
||||
FState ACyberdemon::States[] =
|
||||
|
@ -83,6 +81,7 @@ IMPLEMENT_ACTOR (ACyberdemon, Doom, 16, 114)
|
|||
PROP_PainSound ("cyber/pain")
|
||||
PROP_DeathSound ("cyber/death")
|
||||
PROP_ActiveSound ("cyber/active")
|
||||
PROP_Obituary("$OB_CYBORG")
|
||||
END_DEFAULTS
|
||||
|
||||
void A_CyberAttack (AActor *self)
|
||||
|
|
|
@ -13,8 +13,6 @@ void A_SargAttack (AActor *);
|
|||
class ADemon : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ADemon, AActor)
|
||||
public:
|
||||
const char *GetHitObituary () { return GStrings("OB_DEMONHIT"); }
|
||||
};
|
||||
|
||||
FState ADemon::States[] =
|
||||
|
@ -82,13 +80,12 @@ IMPLEMENT_ACTOR (ADemon, Doom, 3002, 8)
|
|||
PROP_PainSound ("demon/pain")
|
||||
PROP_DeathSound ("demon/death")
|
||||
PROP_ActiveSound ("demon/active")
|
||||
PROP_HitObituary("$OB_DEMONHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
class ASpectre : public ADemon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ASpectre, ADemon)
|
||||
public:
|
||||
const char *GetHitObituary () { return GStrings("OB_SPECTREHIT"); }
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9)
|
||||
|
@ -101,6 +98,7 @@ IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9)
|
|||
PROP_PainSound ("spectre/pain")
|
||||
PROP_DeathSound ("spectre/death")
|
||||
PROP_ActiveSound ("spectre/active")
|
||||
PROP_HitObituary("$OB_SPECTREHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void A_SargAttack (AActor *self)
|
||||
|
|
|
@ -34,11 +34,6 @@ public:
|
|||
}
|
||||
return true;
|
||||
}
|
||||
protected:
|
||||
virtual const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTMSPHERE");
|
||||
}
|
||||
};
|
||||
|
||||
FState AMegasphere::States[] =
|
||||
|
@ -54,6 +49,7 @@ IMPLEMENT_ACTOR (AMegasphere, Doom, 83, 132)
|
|||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_PickupMessage("$GOTMSPHERE")
|
||||
END_DEFAULTS
|
||||
|
||||
// Berserk ------------------------------------------------------------------
|
||||
|
@ -81,11 +77,6 @@ public:
|
|||
}
|
||||
return false;
|
||||
}
|
||||
protected:
|
||||
virtual const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTBERSERK");
|
||||
}
|
||||
};
|
||||
|
||||
FState ABerserk::States[] =
|
||||
|
@ -99,5 +90,6 @@ IMPLEMENT_ACTOR (ABerserk, Doom, 2023, 134)
|
|||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_PowerupGiver_Powerup ("PowerStrength")
|
||||
PROP_Inventory_PickupMessage("$GOTBERSERK")
|
||||
END_DEFAULTS
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@ class ABossBrain : public AActor
|
|||
class AExplosiveBarrel : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AExplosiveBarrel, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class ABulletPuff : public AActor
|
||||
|
@ -29,34 +27,26 @@ class ARocket : public AActor
|
|||
DECLARE_ACTOR (ARocket, AActor)
|
||||
public:
|
||||
void BeginPlay ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class AArchvile : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AArchvile, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class ALostSoul : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ALostSoul, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class APlasmaBall : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (APlasmaBall, AActor)
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class ABFGBall : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ABFGBall, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
class AScriptedMarine : public AActor
|
||||
|
|
|
@ -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
|
|
@ -14,9 +14,6 @@ void A_TroopAttack (AActor *);
|
|||
class ADoomImp : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ADoomImp, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_IMP"); }
|
||||
const char *GetHitObituary () { return GStrings("OB_IMPHIT"); }
|
||||
};
|
||||
|
||||
FState ADoomImp::States[] =
|
||||
|
@ -92,6 +89,8 @@ IMPLEMENT_ACTOR (ADoomImp, Doom, 3001, 5)
|
|||
PROP_PainSound ("imp/pain")
|
||||
PROP_DeathSound ("imp/death")
|
||||
PROP_ActiveSound ("imp/active")
|
||||
PROP_Obituary("$OB_IMP")
|
||||
PROP_HitObituary("$OB_IMPHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
class ADoomImpBall : public AActor
|
||||
|
|
|
@ -45,13 +45,9 @@ IMPLEMENT_ACTOR (AExplosiveBarrel, Doom, 2035, 125)
|
|||
PROP_DeathState (S_BEXP)
|
||||
|
||||
PROP_DeathSound ("world/barrelx")
|
||||
PROP_Obituary("$OB_BARREL")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AExplosiveBarrel::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_BARREL");
|
||||
}
|
||||
|
||||
void A_BarrelDestroy (AActor *actor)
|
||||
{
|
||||
if ((dmflags2 & DF2_BARRELS_RESPAWN) &&
|
||||
|
|
|
@ -20,226 +20,6 @@ static FRandom pr_fireplasma ("FirePlasma");
|
|||
static FRandom pr_firerail ("FireRail");
|
||||
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 ---------------------------------------------------------------------
|
||||
|
||||
void A_Punch (AActor *);
|
||||
|
@ -247,8 +27,6 @@ void A_Punch (AActor *);
|
|||
class AFist : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AFist, AWeapon)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AFist::States[] =
|
||||
|
@ -279,12 +57,9 @@ IMPLEMENT_ACTOR (AFist, Doom, -1, 0)
|
|||
PROP_Weapon_AtkState (S_PUNCH1)
|
||||
PROP_Weapon_HoldAtkState (S_PUNCH1)
|
||||
PROP_Weapon_Kickback (100)
|
||||
END_DEFAULTS
|
||||
PROP_Obituary("$OB_MPFIST")
|
||||
|
||||
const char *AFist::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPFIST");
|
||||
}
|
||||
END_DEFAULTS
|
||||
|
||||
//
|
||||
// A_Punch
|
||||
|
@ -334,8 +109,6 @@ void A_FirePistol (AActor *);
|
|||
class APistol : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (APistol, AWeapon)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState APistol::States[] =
|
||||
|
@ -378,13 +151,9 @@ IMPLEMENT_ACTOR (APistol, Doom, -1, 0)
|
|||
PROP_Weapon_Kickback (100)
|
||||
PROP_Weapon_MoveCombatDist (25000000)
|
||||
PROP_Weapon_AmmoType1 ("Clip")
|
||||
PROP_Obituary("$OB_MPPISTOL")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *APistol::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPPISTOL");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FirePistol
|
||||
//
|
||||
|
@ -424,9 +193,6 @@ void A_Saw (AActor *);
|
|||
class AChainsaw : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AChainsaw, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AChainsaw::States[] =
|
||||
|
@ -465,18 +231,10 @@ IMPLEMENT_ACTOR (AChainsaw, Doom, 2005, 32)
|
|||
PROP_Weapon_HoldAtkState (S_SAW1)
|
||||
PROP_Weapon_UpSound ("weapons/sawup")
|
||||
PROP_Weapon_ReadySound ("weapons/sawidle")
|
||||
PROP_Obituary("$OB_MPCHAINSAW")
|
||||
PROP_Inventory_PickupMessage("$GOTCHAINSAW")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AChainsaw::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTCHAINSAW");
|
||||
}
|
||||
|
||||
const char *AChainsaw::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPCHAINSAW");
|
||||
}
|
||||
|
||||
//
|
||||
// A_Saw
|
||||
//
|
||||
|
@ -545,9 +303,6 @@ void A_FireShotgun (AActor *);
|
|||
class AShotgun : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AShotgun, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AShotgun::States[] =
|
||||
|
@ -598,18 +353,10 @@ IMPLEMENT_ACTOR (AShotgun, Doom, 2001, 27)
|
|||
PROP_Weapon_Kickback (100)
|
||||
PROP_Weapon_MoveCombatDist (24000000)
|
||||
PROP_Weapon_AmmoType1 ("Shell")
|
||||
PROP_Obituary("$OB_MPSHOTGUN")
|
||||
PROP_Inventory_PickupMessage("$GOTSHOTGUN")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AShotgun::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTSHOTGUN");
|
||||
}
|
||||
|
||||
const char *AShotgun::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPSHOTGUN");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FireShotgun
|
||||
//
|
||||
|
@ -649,9 +396,6 @@ void A_CloseShotgun2 (AActor *actor);
|
|||
class ASuperShotgun : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ASuperShotgun, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState ASuperShotgun::States[] =
|
||||
|
@ -707,18 +451,10 @@ IMPLEMENT_ACTOR (ASuperShotgun, Doom, 82, 33)
|
|||
PROP_Weapon_Kickback (100)
|
||||
PROP_Weapon_MoveCombatDist (15000000)
|
||||
PROP_Weapon_AmmoType1 ("Shell")
|
||||
PROP_Obituary("$OB_MPSSHOTGUN")
|
||||
PROP_Inventory_PickupMessage("$GOTSHOTGUN2")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ASuperShotgun::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTSHOTGUN2");
|
||||
}
|
||||
|
||||
const char *ASuperShotgun::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPSSHOTGUN");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FireShotgun2
|
||||
//
|
||||
|
@ -790,9 +526,6 @@ void A_FireCGun (AActor *);
|
|||
class AChaingun : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AChaingun, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AChaingun::States[] =
|
||||
|
@ -837,18 +570,10 @@ IMPLEMENT_ACTOR (AChaingun, Doom, 2002, 28)
|
|||
PROP_Weapon_Kickback (100)
|
||||
PROP_Weapon_MoveCombatDist (27000000)
|
||||
PROP_Weapon_AmmoType1 ("Clip")
|
||||
PROP_Obituary("$OB_MPCHAINGUN")
|
||||
PROP_Inventory_PickupMessage("$GOTCHAINGUN")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AChaingun::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTCHAINGUN");
|
||||
}
|
||||
|
||||
const char *AChaingun::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPCHAINGUN");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FireCGun
|
||||
//
|
||||
|
@ -895,8 +620,6 @@ void A_Explode (AActor *);
|
|||
class ARocketLauncher : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ARocketLauncher, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState ARocketLauncher::States[] =
|
||||
|
@ -945,13 +668,9 @@ IMPLEMENT_ACTOR (ARocketLauncher, Doom, 2003, 29)
|
|||
PROP_Weapon_MoveCombatDist (18350080)
|
||||
PROP_Weapon_AmmoType1 ("RocketAmmo")
|
||||
PROP_Weapon_ProjectileType ("Rocket")
|
||||
PROP_Inventory_PickupMessage("$GOTLAUNCHER")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ARocketLauncher::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTLAUNCHER");
|
||||
}
|
||||
|
||||
FState ARocket::States[] =
|
||||
{
|
||||
#define S_ROCKET 0
|
||||
|
@ -977,6 +696,7 @@ IMPLEMENT_ACTOR (ARocket, Doom, -1, 127)
|
|||
|
||||
PROP_SeeSound ("weapons/rocklf")
|
||||
PROP_DeathSound ("weapons/rocklx")
|
||||
PROP_Obituary("$OB_MPROCKET")
|
||||
END_DEFAULTS
|
||||
|
||||
void ARocket::BeginPlay ()
|
||||
|
@ -985,11 +705,6 @@ void ARocket::BeginPlay ()
|
|||
effects |= FX_ROCKET;
|
||||
}
|
||||
|
||||
const char *ARocket::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPROCKET");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FireMissile
|
||||
//
|
||||
|
@ -1017,8 +732,6 @@ void A_FirePlasma (AActor *);
|
|||
class APlasmaRifle : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (APlasmaRifle, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState APlasmaRifle::States[] =
|
||||
|
@ -1063,13 +776,9 @@ IMPLEMENT_ACTOR (APlasmaRifle, Doom, 2004, 30)
|
|||
PROP_Weapon_MoveCombatDist (27000000)
|
||||
PROP_Weapon_ProjectileType ("PlasmaBall")
|
||||
PROP_Weapon_AmmoType1 ("Cell")
|
||||
PROP_Inventory_PickupMessage("$GOTPLASMA")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *APlasmaRifle::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTPLASMA");
|
||||
}
|
||||
|
||||
FState APlasmaBall::States[] =
|
||||
{
|
||||
#define S_PLASBALL 0
|
||||
|
@ -1101,13 +810,9 @@ IMPLEMENT_ACTOR (APlasmaBall, Doom, -1, 51)
|
|||
|
||||
PROP_SeeSound ("weapons/plasmaf")
|
||||
PROP_DeathSound ("weapons/plasmax")
|
||||
PROP_Obituary("$OB_MPPLASMARIFLE")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *APlasmaBall::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPPLASMARIFLE");
|
||||
}
|
||||
|
||||
//
|
||||
// A_FirePlasma
|
||||
//
|
||||
|
@ -1191,8 +896,6 @@ void A_BFGsound (AActor *);
|
|||
class ABFG9000 : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ABFG9000, AWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
class ABFGExtra : public AActor
|
||||
|
@ -1245,13 +948,9 @@ IMPLEMENT_ACTOR (ABFG9000, Doom, 2006, 31)
|
|||
PROP_Weapon_MoveCombatDist (10000000)
|
||||
PROP_Weapon_AmmoType1 ("Cell")
|
||||
PROP_Weapon_ProjectileType ("BFGBall")
|
||||
PROP_Inventory_PickupMessage("$GOTBFG9000")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ABFG9000::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTBFG9000");
|
||||
}
|
||||
|
||||
FState ABFGBall::States[] =
|
||||
{
|
||||
#define S_BFGSHOT 0
|
||||
|
@ -1282,13 +981,9 @@ IMPLEMENT_ACTOR (ABFGBall, Doom, -1, 128)
|
|||
PROP_DeathState (S_BFGLAND)
|
||||
|
||||
PROP_DeathSound ("weapons/bfgx")
|
||||
PROP_Obituary("$OB_MPBFG_BOOM")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ABFGBall::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MPBFG_BOOM");
|
||||
}
|
||||
|
||||
FState ABFGExtra::States[] =
|
||||
{
|
||||
S_BRIGHT (BFE2, 'A', 8, NULL , &States[1]),
|
||||
|
|
|
@ -16,8 +16,6 @@ void A_FatAttack3 (AActor *);
|
|||
class AFatso : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AFatso, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_FATSO"); }
|
||||
};
|
||||
|
||||
FState AFatso::States[] =
|
||||
|
@ -101,6 +99,7 @@ IMPLEMENT_ACTOR (AFatso, Doom, 67, 112)
|
|||
PROP_PainSound ("fatso/pain")
|
||||
PROP_DeathSound ("fatso/death")
|
||||
PROP_ActiveSound ("fatso/active")
|
||||
PROP_Obituary("$OB_FATSO")
|
||||
END_DEFAULTS
|
||||
|
||||
class AFatShot : public AActor
|
||||
|
|
|
@ -66,13 +66,9 @@ IMPLEMENT_ACTOR (ALostSoul, Doom, 3006, 110)
|
|||
PROP_PainSound ("skull/pain")
|
||||
PROP_DeathSound ("skull/death")
|
||||
PROP_ActiveSound ("skull/active")
|
||||
PROP_Obituary("$OB_SKULL")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ALostSoul::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_SKULL");
|
||||
}
|
||||
|
||||
//
|
||||
// SkullAttack
|
||||
// Fly at the player like a missile.
|
||||
|
|
|
@ -25,7 +25,6 @@ class AZombieMan : public AActor
|
|||
DECLARE_ACTOR (AZombieMan, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary () { return GStrings("OB_ZOMBIE"); }
|
||||
};
|
||||
|
||||
FState AZombieMan::States[] =
|
||||
|
@ -101,6 +100,7 @@ IMPLEMENT_ACTOR (AZombieMan, Doom, 3004, 4)
|
|||
PROP_PainSound ("grunt/pain")
|
||||
PROP_DeathSound ("grunt/death")
|
||||
PROP_ActiveSound ("grunt/active")
|
||||
PROP_Obituary("$OB_ZOMBIE")
|
||||
END_DEFAULTS
|
||||
|
||||
void AZombieMan::NoBlockingSet ()
|
||||
|
@ -137,7 +137,6 @@ class AShotgunGuy : public AActor
|
|||
DECLARE_ACTOR (AShotgunGuy, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary () { return GStrings("OB_SHOTGUY"); }
|
||||
};
|
||||
|
||||
FState AShotgunGuy::States[] =
|
||||
|
@ -215,6 +214,7 @@ IMPLEMENT_ACTOR (AShotgunGuy, Doom, 9, 1)
|
|||
PROP_PainSound ("shotguy/pain")
|
||||
PROP_DeathSound ("shotguy/death")
|
||||
PROP_ActiveSound ("shotguy/active")
|
||||
PROP_Obituary("$OB_SHOTGUY")
|
||||
END_DEFAULTS
|
||||
|
||||
void AShotgunGuy::NoBlockingSet ()
|
||||
|
@ -267,7 +267,6 @@ class AChaingunGuy : public AActor
|
|||
DECLARE_ACTOR (AChaingunGuy, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary () { return GStrings("OB_CHAINGUY"); }
|
||||
};
|
||||
|
||||
FState AChaingunGuy::States[] =
|
||||
|
@ -346,6 +345,7 @@ IMPLEMENT_ACTOR (AChaingunGuy, Doom, 65, 2)
|
|||
PROP_DeathSound ("chainguy/death")
|
||||
PROP_ActiveSound ("chainguy/active")
|
||||
PROP_AttackSound ("chainguy/attack")
|
||||
PROP_Obituary("$OB_CHAINGUY")
|
||||
END_DEFAULTS
|
||||
|
||||
void AChaingunGuy::NoBlockingSet ()
|
||||
|
@ -359,7 +359,6 @@ class AWolfensteinSS : public AActor
|
|||
{
|
||||
DECLARE_ACTOR (AWolfensteinSS, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_WOLFSS"); }
|
||||
void NoBlockingSet ();
|
||||
};
|
||||
|
||||
|
@ -440,6 +439,7 @@ IMPLEMENT_ACTOR (AWolfensteinSS, Doom, 84, 116)
|
|||
PROP_DeathSound ("wolfss/death")
|
||||
PROP_ActiveSound ("wolfss/active")
|
||||
PROP_AttackSound ("wolfss/attack")
|
||||
PROP_Obituary("$OB_WOLFSS")
|
||||
END_DEFAULTS
|
||||
|
||||
void AWolfensteinSS::NoBlockingSet ()
|
||||
|
|
|
@ -20,9 +20,6 @@ void A_SkelFist (AActor *);
|
|||
class ARevenant : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ARevenant, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_UNDEAD"); }
|
||||
const char *GetHitObituary () { return GStrings("OB_UNDEADHIT"); }
|
||||
};
|
||||
|
||||
FState ARevenant::States[] =
|
||||
|
@ -101,6 +98,8 @@ IMPLEMENT_ACTOR (ARevenant, Doom, 66, 20)
|
|||
PROP_PainSound ("skeleton/pain")
|
||||
PROP_DeathSound ("skeleton/death")
|
||||
PROP_ActiveSound ("skeleton/active")
|
||||
PROP_Obituary("$OB_UNDEAD")
|
||||
PROP_HitObituary("$OB_UNDEADHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ void A_SPosAttackUseAtkSound (AActor *);
|
|||
class ASpiderMastermind : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ASpiderMastermind, AActor)
|
||||
public:
|
||||
const char *GetObituary () { return GStrings("OB_SPIDER"); }
|
||||
};
|
||||
|
||||
FState ASpiderMastermind::States[] =
|
||||
|
@ -88,6 +86,7 @@ IMPLEMENT_ACTOR (ASpiderMastermind, Doom, 7, 7)
|
|||
PROP_PainSound ("spider/pain")
|
||||
PROP_DeathSound ("spider/death")
|
||||
PROP_ActiveSound ("spider/active")
|
||||
PROP_Obituary("$OB_SPIDER")
|
||||
END_DEFAULTS
|
||||
|
||||
void A_SpidRefire (AActor *self)
|
||||
|
|
|
@ -20,7 +20,6 @@ class ABeast : public AActor
|
|||
DECLARE_ACTOR (ABeast, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState ABeast::States[] =
|
||||
|
@ -89,6 +88,7 @@ IMPLEMENT_ACTOR (ABeast, Heretic, 70, 3)
|
|||
PROP_PainSound ("beast/pain")
|
||||
PROP_DeathSound ("beast/death")
|
||||
PROP_ActiveSound ("beast/active")
|
||||
PROP_Obituary("$OB_BEAST")
|
||||
END_DEFAULTS
|
||||
|
||||
void ABeast::NoBlockingSet ()
|
||||
|
@ -96,11 +96,6 @@ void ABeast::NoBlockingSet ()
|
|||
P_DropItem (this, "CrossbowAmmo", 10, 84);
|
||||
}
|
||||
|
||||
const char *ABeast::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_BEAST");
|
||||
}
|
||||
|
||||
// Beast ball ---------------------------------------------------------------
|
||||
|
||||
// Heretic also had a MT_BURNBALL and MT_BURNBALLFB based on the beast ball,
|
||||
|
|
|
@ -220,7 +220,6 @@ class AChicken : public AActor
|
|||
DECLARE_ACTOR (AChicken, AActor)
|
||||
public:
|
||||
void Destroy ();
|
||||
const char *GetObituary ();
|
||||
void Die (AActor *source, AActor *inflictor);
|
||||
};
|
||||
|
||||
|
@ -275,6 +274,7 @@ IMPLEMENT_ACTOR (AChicken, Heretic, -1, 122)
|
|||
PROP_PainSound ("chicken/pain")
|
||||
PROP_DeathSound ("chicken/death")
|
||||
PROP_ActiveSound ("chicken/active")
|
||||
PROP_Obituary("$OB_CHICKEN")
|
||||
END_DEFAULTS
|
||||
|
||||
void AChicken::Destroy ()
|
||||
|
@ -286,11 +286,6 @@ void AChicken::Destroy ()
|
|||
Super::Destroy ();
|
||||
}
|
||||
|
||||
const char *AChicken::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_CHICKEN");
|
||||
}
|
||||
|
||||
void AChicken::Die (AActor *source, AActor *inflictor)
|
||||
{
|
||||
Super::Die (source, inflictor);
|
||||
|
|
|
@ -18,7 +18,6 @@ class AClink : public AActor
|
|||
DECLARE_ACTOR (AClink, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AClink::States[] =
|
||||
|
@ -73,6 +72,7 @@ IMPLEMENT_ACTOR (AClink, Heretic, 90, 1)
|
|||
PROP_PainSound ("clink/pain")
|
||||
PROP_DeathSound ("clink/death")
|
||||
PROP_ActiveSound ("clink/active")
|
||||
PROP_Obituary("$OB_CLINK")
|
||||
END_DEFAULTS
|
||||
|
||||
void AClink::NoBlockingSet ()
|
||||
|
@ -80,11 +80,6 @@ void AClink::NoBlockingSet ()
|
|||
P_DropItem (this, "SkullRodAmmo", 20, 84);
|
||||
}
|
||||
|
||||
const char *AClink::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_CLINK");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_ClinkAttack
|
||||
|
|
|
@ -65,9 +65,6 @@ void ABossSpot::BeginPlay ()
|
|||
class ASorcerer1 : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ASorcerer1, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
FState ASorcerer1::States[] =
|
||||
|
@ -137,18 +134,10 @@ IMPLEMENT_ACTOR (ASorcerer1, Heretic, 7, 142)
|
|||
PROP_PainSound ("dsparilserpent/pain")
|
||||
PROP_DeathSound ("dsparilserpent/death")
|
||||
PROP_ActiveSound ("dsparilserpent/active")
|
||||
PROP_Obituary("$OB_DSPARIL1")
|
||||
PROP_HitObituary("$OB_DSPARIL1HIT")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ASorcerer1::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_DSPARIL1");
|
||||
}
|
||||
|
||||
const char *ASorcerer1::GetHitObituary ()
|
||||
{
|
||||
return GStrings("OB_DSPARIL1HIT");
|
||||
}
|
||||
|
||||
// Sorcerer FX 1 ------------------------------------------------------------
|
||||
|
||||
class ASorcererFX1 : public AActor
|
||||
|
@ -270,6 +259,8 @@ IMPLEMENT_ACTOR (ASorcerer2, Heretic, -1, 143)
|
|||
PROP_AttackSound ("dsparil/attack")
|
||||
PROP_PainSound ("dsparil/pain")
|
||||
PROP_ActiveSound ("dsparil/active")
|
||||
PROP_Obituary("$OB_DSPARIL2")
|
||||
PROP_HitObituary("$OB_DSPARIL2HIT")
|
||||
END_DEFAULTS
|
||||
|
||||
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 ----------------------------------------------------------
|
||||
|
||||
class ASorcerer2FX1 : public AActor
|
||||
|
|
|
@ -13,7 +13,6 @@ class AArtiTomeOfPower : public APowerupGiver
|
|||
DECLARE_ACTOR (AArtiTomeOfPower, APowerupGiver)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiTomeOfPower::States[] =
|
||||
|
@ -28,6 +27,7 @@ IMPLEMENT_ACTOR (AArtiTomeOfPower, Heretic, 86, 134)
|
|||
PROP_Inventory_FlagsSet (IF_PICKUPFLASH)
|
||||
PROP_Inventory_Icon ("ARTIPWBK")
|
||||
PROP_PowerupGiver_Powerup ("PowerWeaponLevel2")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTITOMEOFPOWER")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiTomeOfPower::Use (bool pickup)
|
||||
|
@ -51,11 +51,6 @@ bool AArtiTomeOfPower::Use (bool pickup)
|
|||
}
|
||||
}
|
||||
|
||||
const char *AArtiTomeOfPower::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTITOMEOFPOWER");
|
||||
}
|
||||
|
||||
// Time bomb ----------------------------------------------------------------
|
||||
|
||||
class AActivatedTimeBomb : public AActor
|
||||
|
@ -99,7 +94,6 @@ class AArtiTimeBomb : public AInventory
|
|||
DECLARE_ACTOR (AArtiTimeBomb, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiTimeBomb::States[] =
|
||||
|
@ -115,6 +109,7 @@ IMPLEMENT_ACTOR (AArtiTimeBomb, Heretic, 34, 72)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIFBMB")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIFIREBOMB")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiTimeBomb::Use (bool pickup)
|
||||
|
@ -128,7 +123,3 @@ bool AArtiTimeBomb::Use (bool pickup)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *AArtiTimeBomb::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIFIREBOMB");
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@ class ASorcerer2 : public AActor
|
|||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
void BeginPlay ();
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
|
||||
int NumBossSpots;
|
||||
AActor *FirstBossSpot;
|
||||
|
@ -39,8 +37,6 @@ class AWizard : public AActor
|
|||
DECLARE_ACTOR (AWizard, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
void P_DSparilTeleport (AActor *actor);
|
||||
|
|
|
@ -25,9 +25,6 @@ void A_ImpXDeath2 (AActor *);
|
|||
class AHereticImp : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AHereticImp, AActor)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
FState AHereticImp::States[] =
|
||||
|
@ -114,18 +111,10 @@ IMPLEMENT_ACTOR (AHereticImp, Heretic, 66, 5)
|
|||
PROP_PainSound ("himp/pain")
|
||||
PROP_DeathSound ("himp/death")
|
||||
PROP_ActiveSound ("himp/active")
|
||||
PROP_Obituary("$OB_HERETICIMP")
|
||||
PROP_HitObituary("$OB_HERETICIMPHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AHereticImp::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_HERETICIMP");
|
||||
}
|
||||
|
||||
const char *AHereticImp::GetHitObituary ()
|
||||
{
|
||||
return GStrings("OB_HERETICIMPHIT");
|
||||
}
|
||||
|
||||
// Heretic imp leader -------------------------------------------------------
|
||||
|
||||
class AHereticImpLeader : public AHereticImp
|
||||
|
|
|
@ -38,18 +38,6 @@ static FRandom pr_fp2 ("FirePhoenixPL2");
|
|||
|
||||
#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_2 1
|
||||
|
@ -284,58 +272,6 @@ void A_StaffAttackPL2 (AActor *actor)
|
|||
void A_FireGoldWandPL1 (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 ----------------------------------------------------------------
|
||||
|
||||
class AGoldWand : public AHereticWeapon
|
||||
|
@ -573,68 +509,11 @@ void A_FireCrossbowPL1 (AActor *);
|
|||
void A_FireCrossbowPL2 (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 -----------------------------------------------------------------
|
||||
|
||||
class ACrossbow : public AHereticWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ACrossbow, AHereticWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNCROSSBOW");
|
||||
}
|
||||
};
|
||||
|
||||
class ACrossbowPowered : public ACrossbow
|
||||
|
@ -711,6 +590,7 @@ IMPLEMENT_ACTOR (ACrossbow, Heretic, 2001, 27)
|
|||
PROP_Weapon_AmmoType1 ("CrossbowAmmo")
|
||||
PROP_Weapon_SisterType ("CrossbowPowered")
|
||||
PROP_Weapon_ProjectileType ("CrossbowFX1")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNCROSSBOW")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ACrossbowPowered, Heretic, -1, 0)
|
||||
|
@ -917,56 +797,6 @@ void A_MaceBallImpact2 (AActor *);
|
|||
void A_FireMacePL2 (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 ----------------------------------------------------------
|
||||
|
||||
class AMace : public AHereticWeapon
|
||||
|
@ -975,11 +805,6 @@ class AMace : public AHereticWeapon
|
|||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNMACE");
|
||||
}
|
||||
protected:
|
||||
bool DoRespawn ();
|
||||
int NumMaceSpots;
|
||||
|
@ -1055,6 +880,7 @@ BEGIN_DEFAULTS (AMace, Heretic, -1, 0)
|
|||
PROP_Weapon_AmmoType1 ("MaceAmmo")
|
||||
PROP_Weapon_SisterType ("MacePowered")
|
||||
PROP_Weapon_ProjectileType ("MaceFX2")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNMACE")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AMacePowered, Heretic, -1, 0)
|
||||
|
@ -1639,11 +1465,6 @@ void A_GauntletSound (AActor *);
|
|||
class AGauntlets : public AHereticWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AGauntlets, AHereticWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNGAUNTLETS");
|
||||
}
|
||||
};
|
||||
|
||||
class AGauntletsPowered : public AGauntlets
|
||||
|
@ -1711,6 +1532,7 @@ IMPLEMENT_ACTOR (AGauntlets, Heretic, 2005, 32)
|
|||
PROP_Weapon_YAdjust (15)
|
||||
PROP_Weapon_UpSound ("weapons/gauntletsactivate")
|
||||
PROP_Weapon_SisterType ("GauntletsPowered")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNGAUNTLETS")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AGauntletsPowered, Heretic, -1, 0)
|
||||
|
@ -1887,70 +1709,11 @@ void A_FireBlasterPL1 (AActor *);
|
|||
void A_FireBlasterPL2 (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 ------------------------------------------------------------------
|
||||
|
||||
class ABlaster : public AHereticWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ABlaster, AHereticWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNBLASTER");
|
||||
}
|
||||
};
|
||||
|
||||
class ABlasterPowered : public ABlaster
|
||||
|
@ -2006,6 +1769,7 @@ IMPLEMENT_ACTOR (ABlaster, Heretic, 53, 28)
|
|||
PROP_Weapon_MoveCombatDist (27000000)
|
||||
PROP_Weapon_AmmoType1 ("BlasterAmmo")
|
||||
PROP_Weapon_SisterType ("BlasterPowered")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNBLASTER")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABlasterPowered, Heretic, -1, 0)
|
||||
|
@ -2348,68 +2112,11 @@ void A_HideInCeiling (AActor *);
|
|||
void A_SkullRodStorm (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 ---------------------------------------------------------
|
||||
|
||||
class ASkullRod : public AHereticWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ASkullRod, AHereticWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNSKULLROD");
|
||||
}
|
||||
};
|
||||
|
||||
class ASkullRodPowered : public ASkullRod
|
||||
|
@ -2465,6 +2172,7 @@ IMPLEMENT_ACTOR (ASkullRod, Heretic, 2004, 30)
|
|||
PROP_Weapon_AmmoType1 ("SkullRodAmmo")
|
||||
PROP_Weapon_SisterType ("SkullRodPowered")
|
||||
PROP_Weapon_ProjectileType ("HornRodFX1")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNSKULLROD")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ASkullRodPowered, Heretic, -1, 0)
|
||||
|
@ -2871,60 +2579,6 @@ void A_PhoenixPuff (AActor *);
|
|||
void A_FlameEnd (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 --------------------------------------------------------------
|
||||
|
||||
class APhoenixRod : public AHereticWeapon
|
||||
|
@ -2936,10 +2590,6 @@ public:
|
|||
Super::Serialize (arc);
|
||||
arc << FlameCount;
|
||||
}
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WPNPHOENIXROD");
|
||||
}
|
||||
int FlameCount; // for flamethrower duration
|
||||
};
|
||||
|
||||
|
@ -2996,6 +2646,7 @@ IMPLEMENT_ACTOR (APhoenixRod, Heretic, 2003, 29)
|
|||
PROP_Weapon_AmmoType1 ("PhoenixRodAmmo")
|
||||
PROP_Weapon_SisterType ("PhoenixRodPowered")
|
||||
PROP_Weapon_ProjectileType ("PhoenixFX1")
|
||||
PROP_Inventory_PickupMessage("$TXT_WPNPHOENIXROD")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APhoenixRodPowered, Heretic, -1, 0)
|
||||
|
@ -3310,25 +2961,3 @@ void A_FloatPuff (AActor *puff)
|
|||
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
|
||||
|
|
|
@ -23,8 +23,6 @@ class AIronlich : public AActor
|
|||
DECLARE_ACTOR (AIronlich, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
FState AIronlich::States[] =
|
||||
|
@ -76,6 +74,8 @@ IMPLEMENT_ACTOR (AIronlich, Heretic, 6, 20)
|
|||
PROP_PainSound ("ironlich/pain")
|
||||
PROP_DeathSound ("ironlich/death")
|
||||
PROP_ActiveSound ("ironlich/active")
|
||||
PROP_Obituary("$OB_IRONLICH")
|
||||
PROP_HitObituary("$OB_IRONLICHHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void AIronlich::NoBlockingSet ()
|
||||
|
@ -84,16 +84,6 @@ void AIronlich::NoBlockingSet ()
|
|||
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 ----------------------------------------------------------------
|
||||
|
||||
class AHeadFX1 : public AActor
|
||||
|
|
|
@ -22,8 +22,6 @@ class AKnight : public AActor
|
|||
DECLARE_ACTOR (AKnight, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
FState AKnight::States[] =
|
||||
|
@ -82,6 +80,8 @@ IMPLEMENT_ACTOR (AKnight, Heretic, 64, 6)
|
|||
PROP_PainSound ("hknight/pain")
|
||||
PROP_DeathSound ("hknight/death")
|
||||
PROP_ActiveSound ("hknight/active")
|
||||
PROP_Obituary("$OB_BONEKNIGHT")
|
||||
PROP_HitObituary("$OB_BONEKNIGHTHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void AKnight::NoBlockingSet ()
|
||||
|
@ -89,16 +89,6 @@ void AKnight::NoBlockingSet ()
|
|||
P_DropItem (this, "CrossbowAmmo", 5, 84);
|
||||
}
|
||||
|
||||
const char *AKnight::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_BONEKNIGHT");
|
||||
}
|
||||
|
||||
const char *AKnight::GetHitObituary ()
|
||||
{
|
||||
return GStrings("OB_BONEKNIGHTHIT");
|
||||
}
|
||||
|
||||
// Knight ghost -------------------------------------------------------------
|
||||
|
||||
class AKnightGhost : public AKnight
|
||||
|
|
|
@ -23,7 +23,6 @@ class AMummy : public AActor
|
|||
DECLARE_ACTOR (AMummy, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetHitObituary ();
|
||||
};
|
||||
|
||||
FState AMummy::States[] =
|
||||
|
@ -79,6 +78,7 @@ IMPLEMENT_ACTOR (AMummy, Heretic, 68, 4)
|
|||
PROP_PainSound ("mummy/pain")
|
||||
PROP_DeathSound ("mummy/death")
|
||||
PROP_ActiveSound ("mummy/active")
|
||||
PROP_HitObituary("$OB_MUMMY")
|
||||
END_DEFAULTS
|
||||
|
||||
void AMummy::NoBlockingSet ()
|
||||
|
@ -86,18 +86,11 @@ void AMummy::NoBlockingSet ()
|
|||
P_DropItem (this, "GoldWandAmmo", 3, 84);
|
||||
}
|
||||
|
||||
const char *AMummy::GetHitObituary ()
|
||||
{
|
||||
return GStrings("OB_MUMMY");
|
||||
}
|
||||
|
||||
// Mummy leader -------------------------------------------------------------
|
||||
|
||||
class AMummyLeader : public AMummy
|
||||
{
|
||||
DECLARE_ACTOR (AMummyLeader, AMummy)
|
||||
public:
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState AMummyLeader::States[] =
|
||||
|
@ -116,13 +109,9 @@ IMPLEMENT_ACTOR (AMummyLeader, Heretic, 45, 2)
|
|||
PROP_SpawnHealth (100)
|
||||
PROP_PainChance (64)
|
||||
PROP_MissileState (S_MUMMYL_ATK)
|
||||
PROP_Obituary("$OB_MUMMYLEADER")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AMummyLeader::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_MUMMYLEADER");
|
||||
}
|
||||
|
||||
// Mummy ghost --------------------------------------------------------------
|
||||
|
||||
class AMummyGhost : public AMummy
|
||||
|
|
|
@ -17,7 +17,6 @@ class ASnake : public AActor
|
|||
DECLARE_ACTOR (ASnake, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
const char *GetObituary ();
|
||||
};
|
||||
|
||||
FState ASnake::States[] =
|
||||
|
@ -80,13 +79,9 @@ IMPLEMENT_ACTOR (ASnake, Heretic, 92, 132)
|
|||
PROP_PainSound ("snake/pain")
|
||||
PROP_DeathSound ("snake/death")
|
||||
PROP_ActiveSound ("snake/active")
|
||||
PROP_Obituary("$OB_SNAKE")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ASnake::GetObituary ()
|
||||
{
|
||||
return GStrings("OB_SNAKE");
|
||||
}
|
||||
|
||||
// Snake projectile A -------------------------------------------------------
|
||||
|
||||
class ASnakeProjA : public AActor
|
||||
|
|
|
@ -81,6 +81,8 @@ IMPLEMENT_ACTOR (AWizard, Heretic, 15, 19)
|
|||
PROP_PainSound ("wizard/pain")
|
||||
PROP_DeathSound ("wizard/death")
|
||||
PROP_ActiveSound ("wizard/active")
|
||||
PROP_Obituary("$OB_WIZARD")
|
||||
PROP_HitObituary("$OB_WIZARDHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void AWizard::NoBlockingSet ()
|
||||
|
@ -89,16 +91,6 @@ void AWizard::NoBlockingSet ()
|
|||
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
|
||||
{
|
||||
DECLARE_ACTOR (AWizardFX1, AActor)
|
||||
|
|
|
@ -17,7 +17,6 @@ class AArtiBlastRadius : public AInventory
|
|||
DECLARE_ACTOR (AArtiBlastRadius, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
protected:
|
||||
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_Icon ("ARTIBLST")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIBLASTRADIUS")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AArtiBlastRadius::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIBLASTRADIUS");
|
||||
}
|
||||
|
||||
// Blast Effect -------------------------------------------------------------
|
||||
|
||||
class ABlastEffect : public AActor
|
||||
|
|
|
@ -13,7 +13,6 @@ class AArtiBoostArmor : public AInventory
|
|||
DECLARE_ACTOR (AArtiBoostArmor, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiBoostArmor::States[] =
|
||||
|
@ -37,6 +36,7 @@ IMPLEMENT_ACTOR (AArtiBoostArmor, Hexen, 8041, 22)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIBRAC")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIBOOSTARMOR")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiBoostArmor::Use (bool pickup)
|
||||
|
@ -82,7 +82,3 @@ bool AArtiBoostArmor::Use (bool pickup)
|
|||
}
|
||||
}
|
||||
|
||||
const char *AArtiBoostArmor::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIBOOSTARMOR");
|
||||
}
|
||||
|
|
|
@ -27,11 +27,6 @@ void A_CFlameMissile (AActor *);
|
|||
class ACWeapFlame : public AClericWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ACWeapFlame, AClericWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_C3");
|
||||
}
|
||||
};
|
||||
|
||||
FState ACWeapFlame::States[] =
|
||||
|
@ -94,6 +89,7 @@ IMPLEMENT_ACTOR (ACWeapFlame, Hexen, 8009, 0)
|
|||
PROP_Weapon_MoveCombatDist (27000000)
|
||||
PROP_Weapon_AmmoType1 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("CFlameMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_C3")
|
||||
END_DEFAULTS
|
||||
|
||||
// Floor Flame --------------------------------------------------------------
|
||||
|
|
|
@ -29,7 +29,7 @@ void A_CHolyPalette (AActor *);
|
|||
|
||||
void SpawnSpiritTail (AActor *spirit);
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AClericWeaponPiece : public AFourthWeaponPiece
|
||||
{
|
||||
|
@ -38,15 +38,11 @@ public:
|
|||
void BeginPlay ();
|
||||
protected:
|
||||
bool MatchPlayerClass (AActor *toucher);
|
||||
const char *PieceMessage ();
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AClericWeaponPiece)
|
||||
|
||||
const char *AClericWeaponPiece::PieceMessage ()
|
||||
{
|
||||
return GStrings("TXT_WRAITHVERGE_PIECE");
|
||||
}
|
||||
IMPLEMENT_STATELESS_ACTOR (AClericWeaponPiece, Hexen, -1, 0)
|
||||
PROP_Inventory_PickupMessage("$TXT_WRAITHVERGE_PIECE")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AClericWeaponPiece::MatchPlayerClass (AActor *toucher)
|
||||
{
|
||||
|
@ -54,7 +50,7 @@ bool AClericWeaponPiece::MatchPlayerClass (AActor *toucher)
|
|||
!toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class ACWeaponPiece1 : public AClericWeaponPiece
|
||||
{
|
||||
|
@ -80,7 +76,7 @@ void ACWeaponPiece1::BeginPlay ()
|
|||
PieceValue = WPIECE1<<3;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class ACWeaponPiece2 : public AClericWeaponPiece
|
||||
{
|
||||
|
@ -106,7 +102,7 @@ void ACWeaponPiece2::BeginPlay ()
|
|||
PieceValue = WPIECE2<<3;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class ACWeaponPiece3 : public AClericWeaponPiece
|
||||
{
|
||||
|
@ -164,10 +160,6 @@ public:
|
|||
Super::Serialize (arc);
|
||||
arc << CHolyCount;
|
||||
}
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_C4");
|
||||
}
|
||||
PalEntry GetBlend ()
|
||||
{
|
||||
return PalEntry (CHolyCount * 128 / 3, 131, 131, 131);
|
||||
|
@ -221,6 +213,7 @@ IMPLEMENT_ACTOR (ACWeapWraithverge, Hexen, -1, 0)
|
|||
PROP_Weapon_AmmoType1 ("Mana1")
|
||||
PROP_Weapon_AmmoType2 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("HolyMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_C4")
|
||||
END_DEFAULTS
|
||||
|
||||
// Holy Missile -------------------------------------------------------------
|
||||
|
|
|
@ -25,11 +25,6 @@ void A_CStaffMissileSlither (AActor *);
|
|||
class ACWeapStaff : public AClericWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ACWeapStaff, AClericWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_C2");
|
||||
}
|
||||
};
|
||||
|
||||
FState ACWeapStaff::States[] =
|
||||
|
@ -99,6 +94,7 @@ IMPLEMENT_ACTOR (ACWeapStaff, Hexen, 10, 32)
|
|||
PROP_Weapon_MoveCombatDist (25000000)
|
||||
PROP_Weapon_AmmoType1 ("Mana1")
|
||||
PROP_Weapon_ProjectileType ("CStaffMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_C2")
|
||||
END_DEFAULTS
|
||||
|
||||
// Serpent Staff Missile ----------------------------------------------------
|
||||
|
|
|
@ -39,11 +39,6 @@ public:
|
|||
FState *GetReadyState ();
|
||||
FState *GetAtkState ();
|
||||
FState *GetHoldAtkState ();
|
||||
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_F2");
|
||||
}
|
||||
};
|
||||
|
||||
FState AFWeapAxe::States[] =
|
||||
|
@ -175,6 +170,7 @@ IMPLEMENT_ACTOR (AAxePuff, Hexen, -1, 0)
|
|||
PROP_SeeSound ("FighterAxeHitThing")
|
||||
PROP_AttackSound ("FighterHammerHitWall")
|
||||
PROP_ActiveSound ("FighterHammerMiss")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_F2")
|
||||
END_DEFAULTS
|
||||
|
||||
// Glowing Axe Puff ---------------------------------------------------------
|
||||
|
|
|
@ -27,11 +27,6 @@ void A_BeAdditive (AActor *);
|
|||
class AFWeapHammer : public AFighterWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AFWeapHammer, AFighterWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_F3");
|
||||
}
|
||||
};
|
||||
|
||||
FState AFWeapHammer::States[] =
|
||||
|
@ -82,6 +77,7 @@ IMPLEMENT_ACTOR (AFWeapHammer, Hexen, 123, 28)
|
|||
PROP_Weapon_MoveCombatDist (22000000)
|
||||
PROP_Weapon_AmmoType1 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("HammerMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_F3")
|
||||
END_DEFAULTS
|
||||
|
||||
// Hammer Missile -----------------------------------------------------------
|
||||
|
|
|
@ -17,7 +17,7 @@ void A_FSwordAttack (AActor *actor);
|
|||
void A_DropQuietusPieces (AActor *);
|
||||
void A_FSwordFlames (AActor *);
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AFighterWeaponPiece : public AFourthWeaponPiece
|
||||
{
|
||||
|
@ -26,15 +26,11 @@ public:
|
|||
void BeginPlay ();
|
||||
protected:
|
||||
bool MatchPlayerClass (AActor *toucher);
|
||||
const char *PieceMessage ();
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AFighterWeaponPiece)
|
||||
|
||||
const char *AFighterWeaponPiece::PieceMessage ()
|
||||
{
|
||||
return GStrings("TXT_QUIETUS_PIECE");
|
||||
}
|
||||
IMPLEMENT_STATELESS_ACTOR (AFighterWeaponPiece, Hexen, -1, 0)
|
||||
PROP_Inventory_PickupMessage("$TXT_QUIETUS_PIECE")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher)
|
||||
{
|
||||
|
@ -42,8 +38,8 @@ bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher)
|
|||
!toucher->IsKindOf (RUNTIME_CLASS(AMagePlayer));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
||||
//==========================================================================
|
||||
|
||||
class AFWeaponPiece1 : public AFighterWeaponPiece
|
||||
{
|
||||
DECLARE_ACTOR (AFWeaponPiece1, AFighterWeaponPiece)
|
||||
|
@ -68,7 +64,7 @@ void AFWeaponPiece1::BeginPlay ()
|
|||
PieceValue = WPIECE1;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AFWeaponPiece2 : public AFighterWeaponPiece
|
||||
{
|
||||
|
@ -94,7 +90,7 @@ void AFWeaponPiece2::BeginPlay ()
|
|||
PieceValue = WPIECE2;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AFWeaponPiece3 : public AFighterWeaponPiece
|
||||
{
|
||||
|
@ -145,11 +141,6 @@ END_DEFAULTS
|
|||
class AFWeapQuietus : public AFighterWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AFWeapQuietus, AFighterWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_F4");
|
||||
}
|
||||
};
|
||||
|
||||
FState AFWeapQuietus::States[] =
|
||||
|
@ -213,6 +204,7 @@ IMPLEMENT_ACTOR (AFWeapQuietus, Hexen, -1, 0)
|
|||
PROP_Weapon_AmmoType1 ("Mana1")
|
||||
PROP_Weapon_AmmoType2 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("FSwordMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_F4")
|
||||
END_DEFAULTS
|
||||
|
||||
// Fighter Sword Missile ----------------------------------------------------
|
||||
|
@ -294,14 +286,14 @@ IMPLEMENT_ACTOR (AFSwordFlame, Hexen, -1, 0)
|
|||
END_DEFAULTS
|
||||
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_FSwordAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_FSwordAttack (AActor *actor)
|
||||
{
|
||||
//============================================================================
|
||||
//
|
||||
// A_FSwordAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_FSwordAttack (AActor *actor)
|
||||
{
|
||||
player_t *player;
|
||||
|
||||
if (NULL == (player = actor->player))
|
||||
|
@ -314,13 +306,13 @@ void A_FSwordAttack (AActor *actor)
|
|||
if (!weapon->DepleteAmmo (weapon->bAltFire))
|
||||
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-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+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);
|
||||
S_Sound (actor, CHAN_WEAPON, "FighterSwordFire", 1, ATTN_NORM);
|
||||
}
|
||||
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, 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+10*FRACUNIT, RUNTIME_CLASS(AFSwordMissile), actor->angle-ANGLE_45/4);
|
||||
S_Sound (actor, CHAN_WEAPON, "FighterSwordFire", 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
|
@ -146,7 +146,6 @@ class AArtiPoisonBag : public AInventory
|
|||
public:
|
||||
bool HandlePickup (AInventory *item);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
const char *PickupMessage ();
|
||||
void BeginPlay ();
|
||||
};
|
||||
|
||||
|
@ -163,6 +162,7 @@ IMPLEMENT_ACTOR (AArtiPoisonBag, Hexen, 8000, 72)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIPSBG")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIPOISONBAG")
|
||||
END_DEFAULTS
|
||||
|
||||
// Poison Bag 1 (The Cleric's) ----------------------------------------------
|
||||
|
@ -346,17 +346,6 @@ AInventory *AArtiPoisonBag::CreateCopy (AActor *other)
|
|||
return copy;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AArtiPoisonBag :: PickupMessage
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
const char *AArtiPoisonBag::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIPOISONBAG");
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AArtiPoisonBag :: BeginPlay
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "a_hexenglobal.h"
|
||||
#include "gi.h"
|
||||
|
||||
#define HEAL_RADIUS_DIST 255*FRACUNIT
|
||||
#define HEAL_RADIUS_DIST 255*FRACUNIT
|
||||
|
||||
// Healing Radius Artifact --------------------------------------------------
|
||||
|
||||
|
@ -19,7 +19,6 @@ class AArtiHealingRadius : public AInventory
|
|||
DECLARE_ACTOR (AArtiHealingRadius, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiHealingRadius::States[] =
|
||||
|
@ -50,6 +49,7 @@ IMPLEMENT_ACTOR (AArtiHealingRadius, Hexen, 10120, 0)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIHRAD")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIHEALINGRADIUS")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiHealingRadius::Use (bool pickup)
|
||||
|
@ -69,8 +69,3 @@ bool AArtiHealingRadius::Use (bool pickup)
|
|||
return effective;
|
||||
|
||||
}
|
||||
|
||||
const char *AArtiHealingRadius::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIHEALINGRADIUS");
|
||||
}
|
||||
|
|
|
@ -71,7 +71,6 @@ public:
|
|||
void PlayPickupSound (AActor *toucher);
|
||||
protected:
|
||||
virtual bool MatchPlayerClass (AActor *toucher);
|
||||
virtual const char *PieceMessage ();
|
||||
const PClass *FourthWeaponClass;
|
||||
int PieceValue;
|
||||
AInventory *TempFourthWeapon;
|
||||
|
@ -135,20 +134,6 @@ public:
|
|||
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
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ASwitchableDecoration, AActor)
|
||||
|
|
|
@ -26,11 +26,6 @@ void A_ShedShard (AActor *);
|
|||
class AMWeapFrost : public AMageWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AMWeapFrost, AMageWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_M2");
|
||||
}
|
||||
};
|
||||
|
||||
FState AMWeapFrost::States[] =
|
||||
|
@ -78,6 +73,7 @@ IMPLEMENT_ACTOR (AMWeapFrost, Hexen, 53, 36)
|
|||
PROP_Weapon_MoveCombatDist (19000000)
|
||||
PROP_Weapon_AmmoType1 ("Mana1")
|
||||
PROP_Weapon_ProjectileType ("FrostMissile")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_M2")
|
||||
END_DEFAULTS
|
||||
|
||||
// Frost Missile ------------------------------------------------------------
|
||||
|
|
|
@ -34,11 +34,6 @@ void A_FreeTargMobj (AActor *);
|
|||
class AMWeapLightning : public AMageWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AMWeapLightning, AMageWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_M3");
|
||||
}
|
||||
};
|
||||
|
||||
FState AMWeapLightning::States[] =
|
||||
|
@ -116,6 +111,7 @@ IMPLEMENT_ACTOR (AMWeapLightning, Hexen, 8040, 0)
|
|||
PROP_Weapon_MoveCombatDist (23000000)
|
||||
PROP_Weapon_AmmoType1 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("LightningFloor")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_M3")
|
||||
END_DEFAULTS
|
||||
|
||||
// Lightning ----------------------------------------------------------------
|
||||
|
|
|
@ -165,8 +165,8 @@ bool AMagePlayer::DoHealingRadius (APlayerPawn *other)
|
|||
{
|
||||
int amount = 50 + (pr_manaradius() % 50);
|
||||
|
||||
if (GiveAmmo (RUNTIME_CLASS(AMana1), amount) ||
|
||||
GiveAmmo (RUNTIME_CLASS(AMana2), amount))
|
||||
if (GiveAmmo (PClass::FindClass("Mana1"), amount) ||
|
||||
GiveAmmo (PClass::FindClass("Mana2"), amount))
|
||||
{
|
||||
S_Sound (other, CHAN_AUTO, "MysticIncant", 1, ATTN_NORM);
|
||||
return true;
|
||||
|
|
|
@ -18,7 +18,7 @@ void A_MStaffPalette (AActor *actor);
|
|||
static AActor *FrontBlockCheck (AActor *mo, int index);
|
||||
static divline_t BlockCheckLine;
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AMageWeaponPiece : public AFourthWeaponPiece
|
||||
{
|
||||
|
@ -27,15 +27,11 @@ public:
|
|||
void BeginPlay ();
|
||||
protected:
|
||||
bool MatchPlayerClass (AActor *toucher);
|
||||
const char *PieceMessage ();
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AMageWeaponPiece)
|
||||
|
||||
const char *AMageWeaponPiece::PieceMessage ()
|
||||
{
|
||||
return GStrings("TXT_BLOODSCOURGE_PIECE");
|
||||
}
|
||||
IMPLEMENT_STATELESS_ACTOR (AMageWeaponPiece, Hexen, -1, 0)
|
||||
PROP_Inventory_PickupMessage("$TXT_BLOODSCOURGE_PIECE")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AMageWeaponPiece::MatchPlayerClass (AActor *toucher)
|
||||
{
|
||||
|
@ -43,7 +39,7 @@ bool AMageWeaponPiece::MatchPlayerClass (AActor *toucher)
|
|||
!toucher->IsKindOf (RUNTIME_CLASS(AClericPlayer));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AMWeaponPiece1 : public AMageWeaponPiece
|
||||
{
|
||||
|
@ -69,7 +65,7 @@ void AMWeaponPiece1::BeginPlay ()
|
|||
PieceValue = WPIECE1<<6;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AMWeaponPiece2 : public AMageWeaponPiece
|
||||
{
|
||||
|
@ -95,7 +91,7 @@ void AMWeaponPiece2::BeginPlay ()
|
|||
PieceValue = WPIECE2<<6;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//==========================================================================
|
||||
|
||||
class AMWeaponPiece3 : public AMageWeaponPiece
|
||||
{
|
||||
|
@ -152,10 +148,6 @@ public:
|
|||
Super::Serialize (arc);
|
||||
arc << MStaffCount;
|
||||
}
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_WEAPON_M4");
|
||||
}
|
||||
PalEntry GetBlend ()
|
||||
{
|
||||
return PalEntry (MStaffCount * 128 / 3, 151, 110, 0);
|
||||
|
@ -240,6 +232,7 @@ IMPLEMENT_ACTOR (AMWeapBloodscourge, Hexen, -1, 0)
|
|||
PROP_Weapon_AmmoType1 ("Mana1")
|
||||
PROP_Weapon_AmmoType2 ("Mana2")
|
||||
PROP_Weapon_ProjectileType ("MageStaffFX2")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPON_M4")
|
||||
END_DEFAULTS
|
||||
|
||||
// Mage Staff FX2 (Bloodscourge) --------------------------------------------
|
||||
|
@ -404,30 +397,30 @@ void MStaffSpawn (AActor *pmo, angle_t angle)
|
|||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_MStaffAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_MStaffAttack (AActor *actor)
|
||||
{
|
||||
angle_t angle;
|
||||
//============================================================================
|
||||
//
|
||||
// A_MStaffAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_MStaffAttack (AActor *actor)
|
||||
{
|
||||
angle_t angle;
|
||||
player_t *player;
|
||||
|
||||
if (NULL == (player = actor->player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon);
|
||||
if (weapon != NULL)
|
||||
{
|
||||
if (!weapon->DepleteAmmo (weapon->bAltFire))
|
||||
return;
|
||||
}
|
||||
angle = actor->angle;
|
||||
|
||||
angle = actor->angle;
|
||||
|
||||
// [RH] Let's try and actually track what the player aimed at
|
||||
P_AimLineAttack (actor, angle, PLAYERMISSILERANGE, ANGLE_1*32);
|
||||
if (linetarget == NULL)
|
||||
|
@ -438,29 +431,29 @@ void A_MStaffAttack (AActor *actor)
|
|||
BlockCheckLine.dy = -finecosine[angle >> ANGLETOFINESHIFT];
|
||||
linetarget = P_BlockmapSearch (actor, 10, FrontBlockCheck);
|
||||
}
|
||||
MStaffSpawn (actor, angle);
|
||||
MStaffSpawn (actor, angle-ANGLE_1*5);
|
||||
MStaffSpawn (actor, angle+ANGLE_1*5);
|
||||
S_Sound (actor, CHAN_WEAPON, "MageStaffFire", 1, ATTN_NORM);
|
||||
weapon->MStaffCount = 3;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_MStaffPalette
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_MStaffPalette (AActor *actor)
|
||||
{
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
MStaffSpawn (actor, angle);
|
||||
MStaffSpawn (actor, angle-ANGLE_1*5);
|
||||
MStaffSpawn (actor, angle+ANGLE_1*5);
|
||||
S_Sound (actor, CHAN_WEAPON, "MageStaffFire", 1, ATTN_NORM);
|
||||
weapon->MStaffCount = 3;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_MStaffPalette
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_MStaffPalette (AActor *actor)
|
||||
{
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
AMWeapBloodscourge *weapon = static_cast<AMWeapBloodscourge *> (actor->player->ReadyWeapon);
|
||||
if (weapon != NULL && weapon->MStaffCount != 0)
|
||||
{
|
||||
weapon->MStaffCount--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -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");
|
||||
}
|
|
@ -217,7 +217,6 @@ class APig : public AActor
|
|||
DECLARE_ACTOR (APig, AActor)
|
||||
public:
|
||||
void Destroy ();
|
||||
const char *GetObituary ();
|
||||
void Die (AActor *source, AActor *inflictor);
|
||||
};
|
||||
|
||||
|
@ -288,12 +287,6 @@ void APig::Destroy ()
|
|||
Super::Destroy ();
|
||||
}
|
||||
|
||||
const char *APig::GetObituary ()
|
||||
{
|
||||
//return GStrings("OB_CHICKEN");
|
||||
return Super::GetObituary ();
|
||||
}
|
||||
|
||||
void APig::Die (AActor *source, AActor *inflictor)
|
||||
{
|
||||
Super::Die (source, inflictor);
|
||||
|
@ -303,104 +296,104 @@ void APig::Die (AActor *source, AActor *inflictor)
|
|||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_SnoutAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_SnoutAttack (AActor *actor)
|
||||
{
|
||||
angle_t angle;
|
||||
int damage;
|
||||
int slope;
|
||||
//============================================================================
|
||||
//
|
||||
// A_SnoutAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_SnoutAttack (AActor *actor)
|
||||
{
|
||||
angle_t angle;
|
||||
int damage;
|
||||
int slope;
|
||||
player_t *player;
|
||||
|
||||
if (NULL == (player = actor->player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
damage = 3+(pr_snoutattack()&3);
|
||||
angle = player->mo->angle;
|
||||
slope = P_AimLineAttack(player->mo, angle, MELEERANGE);
|
||||
PuffSpawned = NULL;
|
||||
P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, MOD_HIT, RUNTIME_CLASS(ASnoutPuff));
|
||||
S_Sound(player->mo, CHAN_VOICE, "PigActive", 1, ATTN_NORM);
|
||||
if(linetarget)
|
||||
{
|
||||
AdjustPlayerAngle(player->mo);
|
||||
if(PuffSpawned)
|
||||
{ // Bit something
|
||||
S_Sound(player->mo, CHAN_VOICE, "PigAttack", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_PigLook
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void A_PigLook (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 10))
|
||||
{
|
||||
return;
|
||||
}
|
||||
A_Look (actor);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_PigChase
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void A_PigChase (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 3))
|
||||
{
|
||||
return;
|
||||
}
|
||||
A_Chase(actor);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_PigAttack (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 18))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!actor->target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (actor->CheckMeleeRange ())
|
||||
{
|
||||
P_DamageMobj(actor->target, actor, actor, 2+(pr_pigattack()&1), MOD_HIT);
|
||||
S_Sound(actor, CHAN_WEAPON, "PigAttack", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigPain
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_PigPain (AActor *actor)
|
||||
{
|
||||
A_Pain (actor);
|
||||
if (actor->z <= actor->floorz)
|
||||
{
|
||||
actor->momz = FRACUNIT*7/2;
|
||||
}
|
||||
}
|
||||
|
||||
damage = 3+(pr_snoutattack()&3);
|
||||
angle = player->mo->angle;
|
||||
slope = P_AimLineAttack(player->mo, angle, MELEERANGE);
|
||||
PuffSpawned = NULL;
|
||||
P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, MOD_HIT, RUNTIME_CLASS(ASnoutPuff));
|
||||
S_Sound(player->mo, CHAN_VOICE, "PigActive", 1, ATTN_NORM);
|
||||
if(linetarget)
|
||||
{
|
||||
AdjustPlayerAngle(player->mo);
|
||||
if(PuffSpawned)
|
||||
{ // Bit something
|
||||
S_Sound(player->mo, CHAN_VOICE, "PigAttack", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_PigLook
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void A_PigLook (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 10))
|
||||
{
|
||||
return;
|
||||
}
|
||||
A_Look (actor);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_PigChase
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void A_PigChase (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 3))
|
||||
{
|
||||
return;
|
||||
}
|
||||
A_Chase(actor);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_PigAttack (AActor *actor)
|
||||
{
|
||||
if (P_UpdateMorphedMonster (actor, 18))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!actor->target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (actor->CheckMeleeRange ())
|
||||
{
|
||||
P_DamageMobj(actor->target, actor, actor, 2+(pr_pigattack()&1), MOD_HIT);
|
||||
S_Sound(actor, CHAN_WEAPON, "PigAttack", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigPain
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_PigPain (AActor *actor)
|
||||
{
|
||||
A_Pain (actor);
|
||||
if (actor->z <= actor->floorz)
|
||||
{
|
||||
actor->momz = FRACUNIT*7/2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ class AArtiDarkServant : public AInventory
|
|||
DECLARE_ACTOR (AArtiDarkServant, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiDarkServant::States[] =
|
||||
|
@ -34,13 +33,9 @@ IMPLEMENT_ACTOR (AArtiDarkServant, Hexen, 86, 16)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTISUMN")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTISUMMON")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AArtiDarkServant::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTISUMMON");
|
||||
}
|
||||
|
||||
// Summoning Doll -----------------------------------------------------------
|
||||
|
||||
class ASummoningDoll : public AActor
|
||||
|
|
|
@ -28,7 +28,6 @@ class AArtiTeleportOther : public AInventory
|
|||
DECLARE_ACTOR (AArtiTeleportOther, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiTeleportOther::States[] =
|
||||
|
@ -48,13 +47,9 @@ IMPLEMENT_ACTOR (AArtiTeleportOther, Hexen, 10040, 17)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTITELO")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTITELEPORTOTHER")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AArtiTeleportOther::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTITELEPORTOTHER");
|
||||
}
|
||||
|
||||
// Teleport Other FX --------------------------------------------------------
|
||||
|
||||
class ATelOtherFX1 : public AActor
|
||||
|
|
|
@ -18,6 +18,7 @@ END_POINTERS
|
|||
|
||||
BEGIN_STATELESS_DEFAULTS (AFourthWeaponPiece, Hexen, -1, 0)
|
||||
PROP_Inventory_PickupSound ("misc/w_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_WEAPONPIECE")
|
||||
END_DEFAULTS
|
||||
|
||||
void AFourthWeaponPiece::Serialize (FArchive &arc)
|
||||
|
@ -34,7 +35,7 @@ const char *AFourthWeaponPiece::PickupMessage ()
|
|||
}
|
||||
else
|
||||
{
|
||||
return PieceMessage ();
|
||||
return Super::PickupMessage ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,16 +44,11 @@ bool AFourthWeaponPiece::MatchPlayerClass (AActor *toucher)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *AFourthWeaponPiece::PieceMessage ()
|
||||
{
|
||||
return "A weapon piece! This is your lucky day!";
|
||||
}
|
||||
|
||||
void AFourthWeaponPiece::PlayPickupSound (AActor *toucher)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
@ -61,113 +57,115 @@ void AFourthWeaponPiece::PlayPickupSound (AActor *toucher)
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// TryPickupWeaponPiece
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool AFourthWeaponPiece::TryPickup (AActor *toucher)
|
||||
{
|
||||
bool shouldStay;
|
||||
bool checkAssembled;
|
||||
bool gaveWeapon;
|
||||
int gaveMana;
|
||||
|
||||
checkAssembled = true;
|
||||
gaveWeapon = false;
|
||||
gaveMana = 0;
|
||||
shouldStay = PrivateShouldStay ();
|
||||
if (!MatchPlayerClass (toucher))
|
||||
{ // Wrong class, but try to pick up for mana
|
||||
if (shouldStay)
|
||||
{ // Can't pick up wrong-class weapons in coop netplay
|
||||
return false;
|
||||
}
|
||||
checkAssembled = false;
|
||||
gaveMana = toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20) +
|
||||
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20);
|
||||
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)
|
||||
{ // Already has the piece
|
||||
return false;
|
||||
}
|
||||
toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20);
|
||||
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20);
|
||||
}
|
||||
else
|
||||
{ // Deathmatch or singleplayer game
|
||||
gaveMana = toucher->GiveAmmo (RUNTIME_CLASS(AMana1), 20) +
|
||||
toucher->GiveAmmo (RUNTIME_CLASS(AMana2), 20);
|
||||
if (toucher->player->pieces & PieceValue)
|
||||
{ // Already has the piece, check if mana needed
|
||||
if (!gaveMana)
|
||||
{ // Didn't need the mana, so don't pick it up
|
||||
return false;
|
||||
}
|
||||
checkAssembled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if fourth weapon assembled
|
||||
if (checkAssembled)
|
||||
{
|
||||
toucher->player->pieces |= PieceValue;
|
||||
for (int i = 0; i < 9; i += 3)
|
||||
{
|
||||
int mask = (WPIECE1|WPIECE2|WPIECE3) << i;
|
||||
|
||||
if (PieceValue & mask)
|
||||
{
|
||||
if (toucher->CheckLocalView (consoleplayer))
|
||||
{
|
||||
StatusBar->SetInteger (0, i);
|
||||
}
|
||||
if ((toucher->player->pieces & mask) == mask)
|
||||
{
|
||||
gaveWeapon = (FourthWeaponClass != NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gaveWeapon)
|
||||
{
|
||||
TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z));
|
||||
if (TempFourthWeapon != NULL)
|
||||
{
|
||||
gaveWeapon = TempFourthWeapon->TryPickup (toucher);
|
||||
if (!gaveWeapon)
|
||||
{
|
||||
TempFourthWeapon->GoAwayAndDie ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gaveWeapon = false;
|
||||
}
|
||||
}
|
||||
if (gaveWeapon || gaveMana || checkAssembled)
|
||||
{
|
||||
GoAwayAndDie ();
|
||||
}
|
||||
return gaveWeapon || gaveMana || checkAssembled;
|
||||
}
|
||||
|
||||
bool AFourthWeaponPiece::ShouldStay ()
|
||||
{
|
||||
return PrivateShouldStay ();
|
||||
}
|
||||
|
||||
bool AFourthWeaponPiece::PrivateShouldStay ()
|
||||
{
|
||||
//==========================================================================
|
||||
//
|
||||
// TryPickupWeaponPiece
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool AFourthWeaponPiece::TryPickup (AActor *toucher)
|
||||
{
|
||||
bool shouldStay;
|
||||
bool checkAssembled;
|
||||
bool gaveWeapon;
|
||||
int gaveMana;
|
||||
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
|
||||
const PClass *mana2 = PClass::FindClass(NAME_Mana2);
|
||||
|
||||
checkAssembled = true;
|
||||
gaveWeapon = false;
|
||||
gaveMana = 0;
|
||||
shouldStay = PrivateShouldStay ();
|
||||
if (!MatchPlayerClass (toucher))
|
||||
{ // Wrong class, but try to pick up for mana
|
||||
if (shouldStay)
|
||||
{ // Can't pick up wrong-class weapons in coop netplay
|
||||
return false;
|
||||
}
|
||||
checkAssembled = false;
|
||||
gaveMana = toucher->GiveAmmo (mana1, 20) +
|
||||
toucher->GiveAmmo (mana2, 20);
|
||||
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)
|
||||
{ // Already has the piece
|
||||
return false;
|
||||
}
|
||||
toucher->GiveAmmo (mana1, 20);
|
||||
toucher->GiveAmmo (mana2, 20);
|
||||
}
|
||||
else
|
||||
{ // Deathmatch or singleplayer game
|
||||
gaveMana = toucher->GiveAmmo (mana1, 20) +
|
||||
toucher->GiveAmmo (mana2, 20);
|
||||
if (toucher->player->pieces & PieceValue)
|
||||
{ // Already has the piece, check if mana needed
|
||||
if (!gaveMana)
|
||||
{ // Didn't need the mana, so don't pick it up
|
||||
return false;
|
||||
}
|
||||
checkAssembled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if fourth weapon assembled
|
||||
if (checkAssembled)
|
||||
{
|
||||
toucher->player->pieces |= PieceValue;
|
||||
for (int i = 0; i < 9; i += 3)
|
||||
{
|
||||
int mask = (WPIECE1|WPIECE2|WPIECE3) << i;
|
||||
|
||||
if (PieceValue & mask)
|
||||
{
|
||||
if (toucher->CheckLocalView (consoleplayer))
|
||||
{
|
||||
StatusBar->SetInteger (0, i);
|
||||
}
|
||||
if ((toucher->player->pieces & mask) == mask)
|
||||
{
|
||||
gaveWeapon = (FourthWeaponClass != NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gaveWeapon)
|
||||
{
|
||||
TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z));
|
||||
if (TempFourthWeapon != NULL)
|
||||
{
|
||||
gaveWeapon = TempFourthWeapon->TryPickup (toucher);
|
||||
if (!gaveWeapon)
|
||||
{
|
||||
TempFourthWeapon->GoAwayAndDie ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gaveWeapon = false;
|
||||
}
|
||||
}
|
||||
if (gaveWeapon || gaveMana || checkAssembled)
|
||||
{
|
||||
GoAwayAndDie ();
|
||||
}
|
||||
return gaveWeapon || gaveMana || checkAssembled;
|
||||
}
|
||||
|
||||
bool AFourthWeaponPiece::ShouldStay ()
|
||||
{
|
||||
return PrivateShouldStay ();
|
||||
}
|
||||
|
||||
bool AFourthWeaponPiece::PrivateShouldStay ()
|
||||
{
|
||||
// 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.
|
||||
if (((multiplayer &&
|
||||
|
|
|
@ -228,7 +228,7 @@ public:
|
|||
{
|
||||
HealthMarker += clamp ((curHealth - HealthMarker) >> 2, 1, 6);
|
||||
}
|
||||
|
||||
|
||||
if (ArtifactFlash > 0)
|
||||
{
|
||||
if (--ArtifactFlash == 0)
|
||||
|
@ -359,8 +359,8 @@ private:
|
|||
HealthRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (HealthRefresh)
|
||||
{
|
||||
int lifeClass = LifeBarClass;
|
||||
{
|
||||
int lifeClass = LifeBarClass;
|
||||
|
||||
HealthRefresh--;
|
||||
healthPos = clamp (HealthMarker, 0, 100);
|
||||
|
@ -442,65 +442,67 @@ private:
|
|||
DrINumber (temp, 40, 14, temp >= 25 ? imgINumbers : NUM_BASESB_IMAGES);
|
||||
}
|
||||
}
|
||||
|
||||
// Mana
|
||||
AAmmo *ammo1, *ammo2;
|
||||
int ammocount1, ammocount2;
|
||||
int drawbar;
|
||||
|
||||
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
|
||||
// Mana
|
||||
AAmmo *ammo1, *ammo2;
|
||||
int ammocount1, ammocount2;
|
||||
int drawbar;
|
||||
|
||||
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
if (ammo1==ammo2)
|
||||
{
|
||||
// Don't show the same ammo twice.
|
||||
ammo2=NULL;
|
||||
}
|
||||
|
||||
// If the weapon uses some ammo that is not mana, do not draw
|
||||
// the mana bars; draw the specific used ammo instead.
|
||||
|
||||
drawbar = !((ammo1 != NULL && ammo1->GetClass() != RUNTIME_CLASS(AMana1) && ammo1->GetClass() != RUNTIME_CLASS(AMana2)) ||
|
||||
(ammo2 != NULL && ammo2->GetClass() != RUNTIME_CLASS(AMana1) && ammo2->GetClass() != RUNTIME_CLASS(AMana2)));
|
||||
|
||||
if (drawbar != olddrawbars)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
olddrawbars = drawbar;
|
||||
oldmana1 = -1;
|
||||
oldmana2 = -1;
|
||||
}
|
||||
if (drawbar && oldammo2 != ammo2)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (drawbar)
|
||||
{
|
||||
DrawManaBars (ammo1, ammo2);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawMainAltAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
}
|
||||
|
||||
// Armor
|
||||
temp = GetArmorPercent (NULL);
|
||||
if (oldarmor != temp)
|
||||
{
|
||||
oldarmor = temp;
|
||||
ArmorRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (ArmorRefresh)
|
||||
{
|
||||
ArmorRefresh--;
|
||||
DrawImage (Images[imgARMCLEAR], 255, 16);
|
||||
DrINumber (temp / (5*FRACUNIT), 250, 14);
|
||||
}
|
||||
|
||||
// Weapon Pieces
|
||||
if (oldpieces != CPlayer->pieces)
|
||||
{
|
||||
DrawWeaponPieces();
|
||||
oldpieces = CPlayer->pieces;
|
||||
}
|
||||
|
||||
// If the weapon uses some ammo that is not mana, do not draw
|
||||
// the mana bars; draw the specific used ammo instead.
|
||||
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
|
||||
const PClass *mana2 = PClass::FindClass(NAME_Mana2);
|
||||
|
||||
drawbar = !((ammo1 != NULL && ammo1->GetClass() != mana1 && ammo1->GetClass() != mana2) ||
|
||||
(ammo2 != NULL && ammo2->GetClass() != mana1 && ammo2->GetClass() != mana2));
|
||||
|
||||
if (drawbar != olddrawbars)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
olddrawbars = drawbar;
|
||||
oldmana1 = -1;
|
||||
oldmana2 = -1;
|
||||
}
|
||||
if (drawbar && oldammo2 != ammo2)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (drawbar)
|
||||
{
|
||||
DrawManaBars (ammo1, ammo2, mana1, mana2);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawMainAltAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
}
|
||||
|
||||
// Armor
|
||||
temp = GetArmorPercent (NULL);
|
||||
if (oldarmor != temp)
|
||||
{
|
||||
oldarmor = temp;
|
||||
ArmorRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (ArmorRefresh)
|
||||
{
|
||||
ArmorRefresh--;
|
||||
DrawImage (Images[imgARMCLEAR], 255, 16);
|
||||
DrINumber (temp / (5*FRACUNIT), 250, 14);
|
||||
}
|
||||
|
||||
// Weapon Pieces
|
||||
if (oldpieces != CPlayer->pieces)
|
||||
{
|
||||
DrawWeaponPieces();
|
||||
oldpieces = CPlayer->pieces;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -512,49 +514,49 @@ private:
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
void DrawMainAltAmmo (AAmmo *ammo1, AAmmo *ammo2, int ammocount1, int ammocount2)
|
||||
{
|
||||
if (ammo1 != oldammo1 || ammocount1 != oldammocount1)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
oldammo1 = ammo1;
|
||||
oldammocount1 = ammocount1;
|
||||
}
|
||||
if (ammo2 != oldammo2 || ammocount2 != oldammocount2)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
oldammo2 = ammo2;
|
||||
oldammocount2 = ammocount2;
|
||||
}
|
||||
|
||||
if (AmmoRefresh)
|
||||
{
|
||||
AmmoRefresh--;
|
||||
DrawImage (Images[imgAMMOBACK], 77, 2);
|
||||
if (ammo2 != NULL)
|
||||
{ // Draw both ammos
|
||||
AmmoRefresh--;
|
||||
screen->DrawTexture (TexMan[ammo1->Icon], 89+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
DrSmallNumber (ammo1->Amount, 86, 20);
|
||||
|
||||
screen->DrawTexture (TexMan[ammo2->Icon], 113+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
DrSmallNumber (ammo2->Amount, 110, 20);
|
||||
}
|
||||
else
|
||||
{ // Draw one ammo
|
||||
screen->DrawTexture (TexMan[ammo1->Icon], 100+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
DrSmallNumber (ammo1->Amount, 97, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (ammo1 != oldammo1 || ammocount1 != oldammocount1)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
oldammo1 = ammo1;
|
||||
oldammocount1 = ammocount1;
|
||||
}
|
||||
if (ammo2 != oldammo2 || ammocount2 != oldammocount2)
|
||||
{
|
||||
AmmoRefresh = screen->GetPageCount ();
|
||||
oldammo2 = ammo2;
|
||||
oldammocount2 = ammocount2;
|
||||
}
|
||||
|
||||
if (AmmoRefresh)
|
||||
{
|
||||
AmmoRefresh--;
|
||||
DrawImage (Images[imgAMMOBACK], 77, 2);
|
||||
if (ammo2 != NULL)
|
||||
{ // Draw both ammos
|
||||
AmmoRefresh--;
|
||||
screen->DrawTexture (TexMan[ammo1->Icon], 89+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
DrSmallNumber (ammo1->Amount, 86, 20);
|
||||
|
||||
screen->DrawTexture (TexMan[ammo2->Icon], 113+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
DrSmallNumber (ammo2->Amount, 110, 20);
|
||||
}
|
||||
else
|
||||
{ // Draw one ammo
|
||||
screen->DrawTexture (TexMan[ammo1->Icon], 100+ST_X, 10+ST_Y,
|
||||
DTA_CenterOffset, true,
|
||||
DTA_320x200, true,
|
||||
TAG_DONE);
|
||||
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;
|
||||
int usemana1 = false, usemana2 = false;
|
||||
int manacount1, manacount2;
|
||||
int manaPatch1, manaPatch2;
|
||||
int manaVialPatch1, manaVialPatch2;
|
||||
|
||||
manaPatch1 = 0;
|
||||
manaPatch2 = 0;
|
||||
manaVialPatch1 = 0;
|
||||
manaVialPatch2 = 0;
|
||||
|
||||
if (AmmoRefresh)
|
||||
{
|
||||
Mana1Refresh = MAX(AmmoRefresh, Mana1Refresh);
|
||||
Mana2Refresh = MAX(AmmoRefresh, Mana2Refresh);
|
||||
AmmoRefresh--;
|
||||
screen->DrawTexture (Images[imgSTATBAR], ST_X+38, ST_Y,
|
||||
DTA_WindowLeft, 39,
|
||||
DTA_WindowRight, 87,
|
||||
DTA_320x200, Scaled,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
||||
// Locate Mana1 and Mana2 in the inventory, and decide which ones are used.
|
||||
if (ammo1 == NULL)
|
||||
{
|
||||
}
|
||||
else if (ammo1->GetClass() == RUNTIME_CLASS(AMana1))
|
||||
{
|
||||
mana1 = ammo1;
|
||||
usemana1 = true;
|
||||
}
|
||||
else if (ammo1->GetClass() == RUNTIME_CLASS(AMana2))
|
||||
{
|
||||
mana2 = ammo1;
|
||||
usemana2 = true;
|
||||
}
|
||||
if (ammo2 == NULL)
|
||||
{
|
||||
}
|
||||
else if (ammo2->GetClass() == RUNTIME_CLASS(AMana1))
|
||||
{
|
||||
mana1 = ammo2;
|
||||
usemana1 = true;
|
||||
}
|
||||
else if (ammo2->GetClass() == RUNTIME_CLASS(AMana2))
|
||||
{
|
||||
mana2 = ammo2;
|
||||
usemana2 = true;
|
||||
}
|
||||
if (mana1 == NULL)
|
||||
{
|
||||
mana1 = CPlayer->mo->FindInventory<AMana1> ();
|
||||
}
|
||||
if (mana2 == NULL)
|
||||
{
|
||||
mana2 = CPlayer->mo->FindInventory<AMana2> ();
|
||||
}
|
||||
manacount1 = mana1 != NULL ? mana1->Amount : 0;
|
||||
manacount2 = mana2 != NULL ? mana2->Amount : 0;
|
||||
|
||||
// Has Mana1 changed since last time?
|
||||
if (oldmana1 != manacount1 || oldusemana1 != usemana1)
|
||||
{
|
||||
oldmana1 = manacount1;
|
||||
oldusemana1 = usemana1;
|
||||
Mana1Refresh = screen->GetPageCount ();
|
||||
}
|
||||
|
||||
// Has Mana2 changed since last time?
|
||||
if (oldmana2 != manacount2 || oldusemana2 != usemana2)
|
||||
{
|
||||
oldmana2 = manacount2;
|
||||
oldusemana2 = usemana2;
|
||||
Mana2Refresh = screen->GetPageCount ();
|
||||
}
|
||||
// Decide what to draw for vial 1
|
||||
if (Mana1Refresh)
|
||||
{
|
||||
Mana1Refresh--;
|
||||
DrawImage (Images[imgMANACLEAR], 77, 16);
|
||||
DrSmallNumber (manacount1, 79, 19);
|
||||
if (!usemana1)
|
||||
{ // Draw Dim Mana icon
|
||||
manaPatch1 = imgMANADIM1;
|
||||
manaVialPatch1 = imgMANAVIALDIM1;
|
||||
}
|
||||
else
|
||||
{
|
||||
manaPatch1 = imgMANABRIGHT1;
|
||||
manaVialPatch1 = manacount1 ? imgMANAVIAL1 : imgMANAVIALDIM1;
|
||||
}
|
||||
}
|
||||
// Decide what to draw for vial 2
|
||||
if (Mana2Refresh)
|
||||
{
|
||||
Mana2Refresh--;
|
||||
DrawImage (Images[imgMANACLEAR], 109, 16);
|
||||
DrSmallNumber (manacount2, 111, 19);
|
||||
if (!usemana2)
|
||||
{ // Draw Dim Mana icon
|
||||
manaPatch2 = imgMANADIM2;
|
||||
manaVialPatch2 = imgMANAVIALDIM2;
|
||||
}
|
||||
else
|
||||
{
|
||||
manaPatch2 = imgMANABRIGHT2;
|
||||
manaVialPatch2 = manacount2 ? imgMANAVIAL2 : imgMANAVIALDIM2;
|
||||
}
|
||||
}
|
||||
// Update mana graphics
|
||||
if (manaPatch1 || manaPatch2 || manaVialPatch1)
|
||||
{
|
||||
if (manaVialPatch1)
|
||||
{
|
||||
DrawImage (Images[manaPatch1], 77, 2);
|
||||
ManaVial1Pic.SetVial (Images[manaVialPatch1], CPlayer->mo, RUNTIME_CLASS(AMana1));
|
||||
DrawImage (&ManaVial1Pic, 94, 2);
|
||||
}
|
||||
if (manaVialPatch2)
|
||||
{
|
||||
DrawImage (Images[manaPatch2], 110, 2);
|
||||
ManaVial2Pic.SetVial (Images[manaVialPatch2], CPlayer->mo, RUNTIME_CLASS(AMana2));
|
||||
DrawImage (&ManaVial2Pic, 102, 2);
|
||||
}
|
||||
}
|
||||
int manaPatch1, manaPatch2;
|
||||
int manaVialPatch1, manaVialPatch2;
|
||||
|
||||
manaPatch1 = 0;
|
||||
manaPatch2 = 0;
|
||||
manaVialPatch1 = 0;
|
||||
manaVialPatch2 = 0;
|
||||
|
||||
if (AmmoRefresh)
|
||||
{
|
||||
Mana1Refresh = MAX(AmmoRefresh, Mana1Refresh);
|
||||
Mana2Refresh = MAX(AmmoRefresh, Mana2Refresh);
|
||||
AmmoRefresh--;
|
||||
screen->DrawTexture (Images[imgSTATBAR], ST_X+38, ST_Y,
|
||||
DTA_WindowLeft, 39,
|
||||
DTA_WindowRight, 87,
|
||||
DTA_320x200, Scaled,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
||||
// Locate Mana1 and Mana2 in the inventory, and decide which ones are used.
|
||||
if (ammo1 == NULL)
|
||||
{
|
||||
}
|
||||
else if (ammo1->GetClass() == manatype1)
|
||||
{
|
||||
mana1 = ammo1;
|
||||
usemana1 = true;
|
||||
}
|
||||
else if (ammo1->GetClass() == manatype2)
|
||||
{
|
||||
mana2 = ammo1;
|
||||
usemana2 = true;
|
||||
}
|
||||
if (ammo2 == NULL)
|
||||
{
|
||||
}
|
||||
else if (ammo2->GetClass() == manatype1)
|
||||
{
|
||||
mana1 = ammo2;
|
||||
usemana1 = true;
|
||||
}
|
||||
else if (ammo2->GetClass() == manatype2)
|
||||
{
|
||||
mana2 = ammo2;
|
||||
usemana2 = true;
|
||||
}
|
||||
if (mana1 == NULL)
|
||||
{
|
||||
mana1 = static_cast<AAmmo*>(CPlayer->mo->FindInventory(manatype1));
|
||||
}
|
||||
if (mana2 == NULL)
|
||||
{
|
||||
mana2 = static_cast<AAmmo*>(CPlayer->mo->FindInventory(manatype2));
|
||||
}
|
||||
manacount1 = mana1 != NULL ? mana1->Amount : 0;
|
||||
manacount2 = mana2 != NULL ? mana2->Amount : 0;
|
||||
|
||||
// Has Mana1 changed since last time?
|
||||
if (oldmana1 != manacount1 || oldusemana1 != usemana1)
|
||||
{
|
||||
oldmana1 = manacount1;
|
||||
oldusemana1 = usemana1;
|
||||
Mana1Refresh = screen->GetPageCount ();
|
||||
}
|
||||
|
||||
// Has Mana2 changed since last time?
|
||||
if (oldmana2 != manacount2 || oldusemana2 != usemana2)
|
||||
{
|
||||
oldmana2 = manacount2;
|
||||
oldusemana2 = usemana2;
|
||||
Mana2Refresh = screen->GetPageCount ();
|
||||
}
|
||||
// Decide what to draw for vial 1
|
||||
if (Mana1Refresh)
|
||||
{
|
||||
Mana1Refresh--;
|
||||
DrawImage (Images[imgMANACLEAR], 77, 16);
|
||||
DrSmallNumber (manacount1, 79, 19);
|
||||
if (!usemana1)
|
||||
{ // Draw Dim Mana icon
|
||||
manaPatch1 = imgMANADIM1;
|
||||
manaVialPatch1 = imgMANAVIALDIM1;
|
||||
}
|
||||
else
|
||||
{
|
||||
manaPatch1 = imgMANABRIGHT1;
|
||||
manaVialPatch1 = manacount1 ? imgMANAVIAL1 : imgMANAVIALDIM1;
|
||||
}
|
||||
}
|
||||
// Decide what to draw for vial 2
|
||||
if (Mana2Refresh)
|
||||
{
|
||||
Mana2Refresh--;
|
||||
DrawImage (Images[imgMANACLEAR], 109, 16);
|
||||
DrSmallNumber (manacount2, 111, 19);
|
||||
if (!usemana2)
|
||||
{ // Draw Dim Mana icon
|
||||
manaPatch2 = imgMANADIM2;
|
||||
manaVialPatch2 = imgMANAVIALDIM2;
|
||||
}
|
||||
else
|
||||
{
|
||||
manaPatch2 = imgMANABRIGHT2;
|
||||
manaVialPatch2 = manacount2 ? imgMANAVIAL2 : imgMANAVIALDIM2;
|
||||
}
|
||||
}
|
||||
// Update mana graphics
|
||||
if (manaPatch1 || manaPatch2 || manaVialPatch1)
|
||||
{
|
||||
if (manaVialPatch1)
|
||||
{
|
||||
DrawImage (Images[manaPatch1], 77, 2);
|
||||
ManaVial1Pic.SetVial (Images[manaVialPatch1], CPlayer->mo, manatype1);
|
||||
DrawImage (&ManaVial1Pic, 94, 2);
|
||||
}
|
||||
if (manaVialPatch2)
|
||||
{
|
||||
DrawImage (Images[manaPatch2], 110, 2);
|
||||
ManaVial2Pic.SetVial (Images[manaVialPatch2], CPlayer->mo, manatype2);
|
||||
DrawImage (&ManaVial2Pic, 102, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -736,138 +738,138 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DrawKeyBar
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DrawKeyBar ()
|
||||
{
|
||||
AInventory *item;
|
||||
AHexenArmor *armor;
|
||||
AKey *keys[5];
|
||||
int i;
|
||||
int temp;
|
||||
bool different;
|
||||
|
||||
keys[0] = keys[1] = keys[2] = keys[3] = keys[4] = NULL;
|
||||
for (item = CPlayer->mo->Inventory, i = 0;
|
||||
item != NULL && i < 5;
|
||||
item = item->Inventory)
|
||||
{
|
||||
if (item->Icon > 0 &&
|
||||
item->IsKindOf (RUNTIME_CLASS(AKey)) &&
|
||||
item->GetClass() != RUNTIME_CLASS(AKey))
|
||||
{
|
||||
keys[i++] = static_cast<AKey*>(item);
|
||||
}
|
||||
}
|
||||
different = false;
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (keys[i] != oldkeys[i])
|
||||
{
|
||||
oldkeys[i] = keys[i];
|
||||
different = true;
|
||||
}
|
||||
}
|
||||
if (different)
|
||||
{
|
||||
KeysRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (KeysRefresh)
|
||||
{
|
||||
KeysRefresh--;
|
||||
for (i = 0; i < 5 && keys[i] != NULL; i++)
|
||||
{
|
||||
DrawImage (TexMan[keys[i]->Icon], 46 + i*20, 2);
|
||||
}
|
||||
}
|
||||
|
||||
temp = GetArmorPercent (&armor);
|
||||
if (oldarmor != temp && armor != NULL)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (armor->Slots[i] > 0 && armor->SlotsIncrement[i] > 0)
|
||||
{
|
||||
DrawFadedImage (Images[imgARMSLOT1+i], 150+31*i, 2,
|
||||
MIN<fixed_t> (OPAQUE, Scale (armor->Slots[i], OPAQUE,
|
||||
armor->SlotsIncrement[i])));
|
||||
}
|
||||
}
|
||||
oldarmor = temp;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// GetArmorPercent
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
fixed_t GetArmorPercent (AHexenArmor **armorp)
|
||||
{
|
||||
AHexenArmor *harmor = CPlayer->mo->FindInventory<AHexenArmor>();
|
||||
fixed_t amount = 0;
|
||||
if (harmor != NULL)
|
||||
{
|
||||
amount = harmor->Slots[0]
|
||||
+ harmor->Slots[1]
|
||||
+ harmor->Slots[2]
|
||||
+ harmor->Slots[3]
|
||||
+ harmor->Slots[4];
|
||||
}
|
||||
// [RH] Count basic armor too.
|
||||
ABasicArmor *barmor = CPlayer->mo->FindInventory<ABasicArmor>();
|
||||
if (barmor != NULL)
|
||||
{
|
||||
amount += barmor->SavePercent;
|
||||
}
|
||||
if (armorp != NULL)
|
||||
{
|
||||
*armorp = harmor;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DrawWeaponPieces
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DrawWeaponPieces ()
|
||||
{
|
||||
static int PieceX[3][3] =
|
||||
{
|
||||
{ 190, 225, 234 },
|
||||
{ 190, 212, 225 },
|
||||
{ 190, 205, 224 },
|
||||
};
|
||||
int pieces = (CPlayer->pieces >> FourthWeaponShift) & 7;
|
||||
int weapClass = FourthWeaponClass;
|
||||
|
||||
if (pieces == 7)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgWEAPONFULL], 190, 0);
|
||||
return;
|
||||
}
|
||||
DrawImage (ClassImages[weapClass][imgWEAPONSLOT], 190, 0);
|
||||
if (pieces & WPIECE1)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE1], PieceX[weapClass][0], 0);
|
||||
}
|
||||
if (pieces & WPIECE2)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE2], PieceX[weapClass][1], 0);
|
||||
}
|
||||
if (pieces & WPIECE3)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE3], PieceX[weapClass][2], 0);
|
||||
}
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// DrawKeyBar
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DrawKeyBar ()
|
||||
{
|
||||
AInventory *item;
|
||||
AHexenArmor *armor;
|
||||
AKey *keys[5];
|
||||
int i;
|
||||
int temp;
|
||||
bool different;
|
||||
|
||||
keys[0] = keys[1] = keys[2] = keys[3] = keys[4] = NULL;
|
||||
for (item = CPlayer->mo->Inventory, i = 0;
|
||||
item != NULL && i < 5;
|
||||
item = item->Inventory)
|
||||
{
|
||||
if (item->Icon > 0 &&
|
||||
item->IsKindOf (RUNTIME_CLASS(AKey)) &&
|
||||
item->GetClass() != RUNTIME_CLASS(AKey))
|
||||
{
|
||||
keys[i++] = static_cast<AKey*>(item);
|
||||
}
|
||||
}
|
||||
different = false;
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (keys[i] != oldkeys[i])
|
||||
{
|
||||
oldkeys[i] = keys[i];
|
||||
different = true;
|
||||
}
|
||||
}
|
||||
if (different)
|
||||
{
|
||||
KeysRefresh = screen->GetPageCount ();
|
||||
}
|
||||
if (KeysRefresh)
|
||||
{
|
||||
KeysRefresh--;
|
||||
for (i = 0; i < 5 && keys[i] != NULL; i++)
|
||||
{
|
||||
DrawImage (TexMan[keys[i]->Icon], 46 + i*20, 2);
|
||||
}
|
||||
}
|
||||
|
||||
temp = GetArmorPercent (&armor);
|
||||
if (oldarmor != temp && armor != NULL)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (armor->Slots[i] > 0 && armor->SlotsIncrement[i] > 0)
|
||||
{
|
||||
DrawFadedImage (Images[imgARMSLOT1+i], 150+31*i, 2,
|
||||
MIN<fixed_t> (OPAQUE, Scale (armor->Slots[i], OPAQUE,
|
||||
armor->SlotsIncrement[i])));
|
||||
}
|
||||
}
|
||||
oldarmor = temp;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// GetArmorPercent
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
fixed_t GetArmorPercent (AHexenArmor **armorp)
|
||||
{
|
||||
AHexenArmor *harmor = CPlayer->mo->FindInventory<AHexenArmor>();
|
||||
fixed_t amount = 0;
|
||||
if (harmor != NULL)
|
||||
{
|
||||
amount = harmor->Slots[0]
|
||||
+ harmor->Slots[1]
|
||||
+ harmor->Slots[2]
|
||||
+ harmor->Slots[3]
|
||||
+ harmor->Slots[4];
|
||||
}
|
||||
// [RH] Count basic armor too.
|
||||
ABasicArmor *barmor = CPlayer->mo->FindInventory<ABasicArmor>();
|
||||
if (barmor != NULL)
|
||||
{
|
||||
amount += barmor->SavePercent;
|
||||
}
|
||||
if (armorp != NULL)
|
||||
{
|
||||
*armorp = harmor;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DrawWeaponPieces
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DrawWeaponPieces ()
|
||||
{
|
||||
static int PieceX[3][3] =
|
||||
{
|
||||
{ 190, 225, 234 },
|
||||
{ 190, 212, 225 },
|
||||
{ 190, 205, 224 },
|
||||
};
|
||||
int pieces = (CPlayer->pieces >> FourthWeaponShift) & 7;
|
||||
int weapClass = FourthWeaponClass;
|
||||
|
||||
if (pieces == 7)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgWEAPONFULL], 190, 0);
|
||||
return;
|
||||
}
|
||||
DrawImage (ClassImages[weapClass][imgWEAPONSLOT], 190, 0);
|
||||
if (pieces & WPIECE1)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE1], PieceX[weapClass][0], 0);
|
||||
}
|
||||
if (pieces & WPIECE2)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE2], PieceX[weapClass][1], 0);
|
||||
}
|
||||
if (pieces & WPIECE3)
|
||||
{
|
||||
DrawImage (ClassImages[weapClass][imgPIECE3], PieceX[weapClass][2], 0);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -968,17 +970,19 @@ private:
|
|||
}
|
||||
|
||||
// Mana
|
||||
AAmmo *ammo1, *ammo2;
|
||||
int ammocount1, ammocount2;
|
||||
bool drawmana;
|
||||
|
||||
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
|
||||
// If the weapon uses some ammo that is not mana, do not draw
|
||||
// the mana blocks; draw the specific used ammo instead.
|
||||
|
||||
drawmana = !((ammo1 != NULL && ammo1->GetClass() != RUNTIME_CLASS(AMana1) && ammo1->GetClass() != RUNTIME_CLASS(AMana2)) ||
|
||||
(ammo2 != NULL && ammo2->GetClass() != RUNTIME_CLASS(AMana1) && ammo2->GetClass() != RUNTIME_CLASS(AMana2)));
|
||||
AAmmo *ammo1, *ammo2;
|
||||
int ammocount1, ammocount2;
|
||||
bool drawmana;
|
||||
|
||||
GetCurrentAmmo (ammo1, ammo2, ammocount1, ammocount2);
|
||||
|
||||
// If the weapon uses some ammo that is not mana, do not draw
|
||||
// the mana blocks; draw the specific used ammo instead.
|
||||
const PClass *mana1 = PClass::FindClass(NAME_Mana1);
|
||||
const PClass *mana2 = PClass::FindClass(NAME_Mana2);
|
||||
|
||||
drawmana = !((ammo1 != NULL && ammo1->GetClass() != mana1 && ammo1->GetClass() != mana2) ||
|
||||
(ammo2 != NULL && ammo2->GetClass() != mana1 && ammo2->GetClass() != mana2));
|
||||
|
||||
if (drawmana)
|
||||
{
|
||||
|
@ -989,36 +993,36 @@ private:
|
|||
{
|
||||
if (CPlayer->ReadyWeapon->Ammo1 != NULL)
|
||||
{
|
||||
if (CPlayer->ReadyWeapon->Ammo1->GetClass() == RUNTIME_CLASS(AMana1))
|
||||
if (CPlayer->ReadyWeapon->Ammo1->GetClass() == mana1)
|
||||
{
|
||||
ammo |= 1;
|
||||
}
|
||||
else if (CPlayer->ReadyWeapon->Ammo1->GetClass() == RUNTIME_CLASS(AMana2))
|
||||
else if (CPlayer->ReadyWeapon->Ammo1->GetClass() == mana2)
|
||||
{
|
||||
ammo |= 2;
|
||||
}
|
||||
}
|
||||
if (CPlayer->ReadyWeapon->Ammo2 != NULL)
|
||||
{
|
||||
if (CPlayer->ReadyWeapon->Ammo2->GetClass() == RUNTIME_CLASS(AMana1))
|
||||
if (CPlayer->ReadyWeapon->Ammo2->GetClass() == mana1)
|
||||
{
|
||||
ammo |= 1;
|
||||
}
|
||||
else if (CPlayer->ReadyWeapon->Ammo2->GetClass() == RUNTIME_CLASS(AMana2))
|
||||
else if (CPlayer->ReadyWeapon->Ammo2->GetClass() == mana2)
|
||||
{
|
||||
ammo |= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item = CPlayer->mo->FindInventory (RUNTIME_CLASS(AMana1));
|
||||
item = CPlayer->mo->FindInventory (mana1);
|
||||
i = item != NULL ? item->Amount : 0;
|
||||
manaImage = ((ammo & 1) && i > 0) ? imgMANABRIGHT1 : imgMANADIM1;
|
||||
screen->DrawTexture (Images[manaImage], -17, -30,
|
||||
DTA_HUDRules, HUD_Normal, TAG_DONE);
|
||||
DrINumberOuter (i, -47, -30);
|
||||
|
||||
item = CPlayer->mo->FindInventory (RUNTIME_CLASS(AMana2));
|
||||
item = CPlayer->mo->FindInventory (mana2);
|
||||
i = item != NULL ? item->Amount : 0;
|
||||
manaImage = ((ammo & 2) && i > 0) ? imgMANABRIGHT2 : imgMANADIM2;
|
||||
screen->DrawTexture (Images[manaImage], -17, -15,
|
||||
|
|
|
@ -345,7 +345,6 @@ class AArtiEgg : public AInventory
|
|||
DECLARE_ACTOR (AArtiEgg, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiEgg::States[] =
|
||||
|
@ -364,6 +363,7 @@ IMPLEMENT_ACTOR (AArtiEgg, Heretic, 30, 14)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIEGGC")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIEGG")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiEgg::Use (bool pickup)
|
||||
|
@ -376,11 +376,6 @@ bool AArtiEgg::Use (bool pickup)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *AArtiEgg::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIEGG");
|
||||
}
|
||||
|
||||
// Pork missile --------------------------------------------------------------
|
||||
|
||||
class APorkFX : public AActor
|
||||
|
@ -438,7 +433,6 @@ class AArtiPork : public AInventory
|
|||
DECLARE_ACTOR (AArtiPork, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiPork::States[] =
|
||||
|
@ -461,6 +455,7 @@ IMPLEMENT_ACTOR (AArtiPork, Hexen, 30, 14)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIPORK")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTIEGG2")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiPork::Use (bool pickup)
|
||||
|
@ -473,7 +468,3 @@ bool AArtiPork::Use (bool pickup)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *AArtiPork::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTIEGG2");
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ class AArtiTeleport : public AInventory
|
|||
DECLARE_ACTOR (AArtiTeleport, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState AArtiTeleport::States[] =
|
||||
|
@ -35,6 +34,7 @@ IMPLEMENT_ACTOR (AArtiTeleport, Raven, 36, 18)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_Icon ("ARTIATLP")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_ARTITELEPORT")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AArtiTeleport::Use (bool pickup)
|
||||
|
@ -69,11 +69,6 @@ bool AArtiTeleport::Use (bool pickup)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *AArtiTeleport::PickupMessage ()
|
||||
{
|
||||
return GStrings("TXT_ARTITELEPORT");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// FUNC P_AutoUseChaosDevice
|
||||
|
|
|
@ -854,11 +854,7 @@ void AInventory::Touch (AActor *toucher)
|
|||
|
||||
if (!(ItemFlags & IF_QUIET))
|
||||
{
|
||||
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
|
||||
if (message == NULL)
|
||||
{
|
||||
message = PickupMessage ();
|
||||
}
|
||||
const char * message = PickupMessage ();
|
||||
|
||||
if (toucher->CheckLocalView (consoleplayer)
|
||||
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
|
||||
|
@ -930,7 +926,9 @@ void AInventory::DoPickupSpecial (AActor *toucher)
|
|||
|
||||
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")
|
||||
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
|
||||
|
@ -1766,6 +1786,7 @@ bool AHealth::TryPickup (AActor *other)
|
|||
|
||||
if (player != NULL)
|
||||
{
|
||||
PrevHealth = other->player->health;
|
||||
if (max == 0)
|
||||
{
|
||||
max = ((i_compatflags&COMPATF_DEHHEALTH)? 100 : deh.MaxHealth) + player->stamina;
|
||||
|
@ -1794,6 +1815,7 @@ bool AHealth::TryPickup (AActor *other)
|
|||
}
|
||||
else
|
||||
{
|
||||
PrevHealth = INT_MAX;
|
||||
if (P_GiveBody(other, Amount) || ItemFlags & IF_ALWAYSPICKUP)
|
||||
{
|
||||
GoAwayAndDie ();
|
||||
|
@ -2020,15 +2042,10 @@ void ABackpack::DetachFromOwner ()
|
|||
|
||||
//===========================================================================
|
||||
//
|
||||
// ABackpack :: PickupMessage
|
||||
// ABackpack
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
const char *ABackpack::PickupMessage ()
|
||||
{
|
||||
return GStrings("GOTBACKPACK");
|
||||
}
|
||||
|
||||
FState ABackpack::States[] =
|
||||
{
|
||||
S_NORMAL (BPAK, 'A', -1, NULL , NULL)
|
||||
|
@ -2038,6 +2055,7 @@ IMPLEMENT_ACTOR (ABackpack, Doom, 8, 144)
|
|||
PROP_HeightFixed (26)
|
||||
PROP_Flags (MF_SPECIAL)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_PickupMessage("$GOTBACKPACK")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AMapRevealer)
|
||||
|
@ -2073,15 +2091,6 @@ IMPLEMENT_ACTOR (ACommunicator, Strife, 206, 0)
|
|||
PROP_Inventory_Icon ("I_COMM")
|
||||
PROP_Tag ("Communicator")
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_COMMUNICATOR")
|
||||
END_DEFAULTS
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ACommunicator :: PickupMessage
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
const char *ACommunicator::PickupMessage ()
|
||||
{
|
||||
return "You picked up the Communicator";
|
||||
}
|
||||
|
|
|
@ -74,6 +74,8 @@ enum
|
|||
AIMETA_PickupMessage, // string
|
||||
AIMETA_GiveQuest, // optionally give one of the quest items.
|
||||
AIMETA_DropAmount, // specifies the amount for a dropped ammo item
|
||||
AIMETA_LowHealth,
|
||||
AIMETA_LowHealthMessage,
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -287,8 +289,11 @@ enum
|
|||
class AHealth : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHealth, AInventory)
|
||||
|
||||
int PrevHealth;
|
||||
public:
|
||||
virtual bool TryPickup (AActor *other);
|
||||
virtual const char *PickupMessage ();
|
||||
};
|
||||
|
||||
// HealthPickup is some item that gives the player health when used.
|
||||
|
@ -401,7 +406,6 @@ public:
|
|||
bool HandlePickup (AInventory *item);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
AInventory *CreateTossable ();
|
||||
const char *PickupMessage ();
|
||||
void DetachFromOwner ();
|
||||
|
||||
bool bDepleted;
|
||||
|
@ -412,8 +416,6 @@ public:
|
|||
class ACommunicator : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (ACommunicator, AInventory)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
#endif //__A_PICKUPS_H__
|
||||
|
|
|
@ -148,8 +148,14 @@ bool AWeaponPiece::PrivateShouldStay ()
|
|||
|
||||
const char *AWeaponPiece::PickupMessage ()
|
||||
{
|
||||
if (FullWeapon) return FullWeapon->PickupMessage();
|
||||
return Super::PickupMessage();
|
||||
if (FullWeapon)
|
||||
{
|
||||
return FullWeapon->PickupMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Super::PickupMessage();
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "a_pickups.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
// Coin ---------------------------------------------------------------------
|
||||
|
||||
|
@ -19,19 +20,20 @@ IMPLEMENT_ACTOR (ACoin, Strife, 93, 0)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
PROP_Inventory_Icon ("I_COIN")
|
||||
PROP_Tag ("coin")
|
||||
PROP_Inventory_PickupMessage("$TXT_COIN")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ACoin::PickupMessage ()
|
||||
{
|
||||
if (Amount == 1)
|
||||
{
|
||||
return "You picked up the coin.";
|
||||
return Super::PickupMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
static char msg[64];
|
||||
|
||||
sprintf (msg, "You picked up %d gold.", Amount);
|
||||
sprintf (msg, GStrings("TXT_XGOLD"), Amount);
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,6 @@ class ATeleporterBeacon : public AInventory
|
|||
DECLARE_ACTOR (ATeleporterBeacon, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState ATeleporterBeacon::States[] =
|
||||
|
@ -248,13 +247,9 @@ IMPLEMENT_ACTOR (ATeleporterBeacon, Strife, 10, 0)
|
|||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
PROP_Inventory_Icon ("I_BEAC")
|
||||
PROP_Tag ("Teleporter_Beacon")
|
||||
PROP_Inventory_PickupMessage("$TXT_BEACON")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ATeleporterBeacon::PickupMessage ()
|
||||
{
|
||||
return "You picked up the Teleporter Beacon.";
|
||||
}
|
||||
|
||||
bool ATeleporterBeacon::Use (bool pickup)
|
||||
{
|
||||
AInventory *drop;
|
||||
|
|
|
@ -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
|
|
@ -40,7 +40,6 @@ class ADegninOre : public AInventory
|
|||
{
|
||||
DECLARE_ACTOR (ADegninOre, AInventory)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
void GetExplodeParms (int &damage, int &dist, bool &hurtSource);
|
||||
bool Use (bool pickup);
|
||||
};
|
||||
|
@ -90,8 +89,6 @@ class AStrifeWeapon : public AWeapon
|
|||
class AFlameThrower : public AStrifeWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AFlameThrower, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
class ASigil : public AStrifeWeapon
|
||||
|
@ -101,7 +98,6 @@ public:
|
|||
bool HandlePickup (AInventory *item);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
void Serialize (FArchive &arc);
|
||||
const char *PickupMessage ();
|
||||
bool SpecialDropAction (AActor *dropper);
|
||||
static int GiveSigilPiece (AActor *daPlayer);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#include "p_lnspec.h"
|
||||
#include "p_enemy.h"
|
||||
#include "s_sound.h"
|
||||
#include "a_strifeweaps.h"
|
||||
#include "d_event.h"
|
||||
#include "a_keys.h"
|
||||
#include "c_console.h"
|
||||
|
||||
// Degnin Ore ---------------------------------------------------------------
|
||||
|
||||
|
@ -48,13 +48,9 @@ IMPLEMENT_ACTOR (ADegninOre, Strife, 59, 0)
|
|||
PROP_Tag ("Degnin_Ore") // "Thalite_Ore" in the Teaser
|
||||
PROP_DeathSound ("ore/explode")
|
||||
PROP_Inventory_Icon ("I_XPRK")
|
||||
PROP_Inventory_PickupMessage("$TXT_DEGNINORE")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *ADegninOre::PickupMessage ()
|
||||
{
|
||||
return "You picked up the Degnin Ore.";
|
||||
}
|
||||
|
||||
void ADegninOre::GetExplodeParms (int &damage, int &dist, bool &hurtSource)
|
||||
{
|
||||
damage = dist = 192;
|
||||
|
@ -179,7 +175,6 @@ class AScanner : public APowerupGiver
|
|||
{
|
||||
DECLARE_ACTOR (AScanner, APowerupGiver)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
bool Use (bool pickup);
|
||||
};
|
||||
|
||||
|
@ -200,20 +195,16 @@ IMPLEMENT_ACTOR (AScanner, Strife, 2027, 0)
|
|||
PROP_Inventory_Icon ("I_PMUP")
|
||||
PROP_PowerupGiver_Powerup ("PowerScanner")
|
||||
PROP_Inventory_PickupSound ("misc/i_pkup")
|
||||
PROP_Inventory_PickupMessage("$TXT_SCANNER")
|
||||
END_DEFAULTS
|
||||
|
||||
const char *AScanner::PickupMessage ()
|
||||
{
|
||||
return "You picked up the scanner.";
|
||||
}
|
||||
|
||||
bool AScanner::Use (bool pickup)
|
||||
{
|
||||
if (!(level.flags & LEVEL_ALLMAP))
|
||||
{
|
||||
if (Owner->CheckLocalView (consoleplayer))
|
||||
{
|
||||
Printf ("The scanner won't work without a map!\n");
|
||||
C_MidPrint(GStrings("TXT_NEEDMAP"));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -228,7 +219,6 @@ class APrisonPass : public AKey
|
|||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
bool SpecialDropAction (AActor *dropper);
|
||||
const char *PickupMessage ();
|
||||
};
|
||||
|
||||
FState APrisonPass::States[] =
|
||||
|
@ -243,6 +233,7 @@ IMPLEMENT_ACTOR (APrisonPass, Strife, -1, 0)
|
|||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Icon ("I_TOKN")
|
||||
PROP_Tag ("Prison_pass")
|
||||
PROP_Inventory_PickupMessage("$TXT_PRISONPASS")
|
||||
END_DEFAULTS
|
||||
|
||||
bool APrisonPass::TryPickup (AActor *toucher)
|
||||
|
@ -253,11 +244,6 @@ bool APrisonPass::TryPickup (AActor *toucher)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *APrisonPass::PickupMessage ()
|
||||
{
|
||||
return "You picked up the Prison pass.";
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// APrisonPass :: SpecialDropAction
|
||||
|
@ -430,24 +416,28 @@ END_DEFAULTS
|
|||
|
||||
bool AAmmoFillup::TryPickup (AActor *toucher)
|
||||
{
|
||||
AInventory *item = toucher->FindInventory<AClipOfBullets>();
|
||||
if (item == NULL)
|
||||
const PClass * clip = PClass::FindClass(NAME_ClipOfBullets);
|
||||
if (clip != NULL)
|
||||
{
|
||||
item = toucher->GiveInventoryType (RUNTIME_CLASS(AClipOfBullets));
|
||||
if (item != NULL)
|
||||
AInventory *item = toucher->FindInventory(clip);
|
||||
if (item == NULL)
|
||||
{
|
||||
item = toucher->GiveInventoryType (clip);
|
||||
if (item != NULL)
|
||||
{
|
||||
item->Amount = 50;
|
||||
}
|
||||
}
|
||||
else if (item->Amount < 50)
|
||||
{
|
||||
item->Amount = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
GoAwayAndDie ();
|
||||
}
|
||||
else if (item->Amount < 50)
|
||||
{
|
||||
item->Amount = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
GoAwayAndDie ();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -361,11 +361,6 @@ void A_FirePoison (AActor *);
|
|||
class AStrifeCrossbow : public AStrifeWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AStrifeCrossbow, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return "You picked up the crossbow";
|
||||
}
|
||||
};
|
||||
|
||||
FState AStrifeCrossbow::States[] =
|
||||
|
@ -442,6 +437,7 @@ IMPLEMENT_ACTOR (AStrifeCrossbow, Strife, 2001, 0)
|
|||
PROP_Weapon_AmmoType1 ("ElectricBolts")
|
||||
PROP_Weapon_SisterType ("StrifeCrossbow2")
|
||||
PROP_Weapon_ProjectileType ("ElectricBolt")
|
||||
PROP_Inventory_PickupMessage("$TXT_STRIFECROSSBOW")
|
||||
|
||||
PROP_Inventory_Icon ("CBOWA0")
|
||||
PROP_Tag ("crossbow")
|
||||
|
@ -586,10 +582,6 @@ class AAssaultGun : public AStrifeWeapon
|
|||
{
|
||||
DECLARE_ACTOR (AAssaultGun, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return "You picked up the assault gun";
|
||||
}
|
||||
bool HandlePickup (AInventory *item);
|
||||
};
|
||||
|
||||
|
@ -644,6 +636,7 @@ IMPLEMENT_ACTOR (AAssaultGun, Strife, 2002, 0)
|
|||
|
||||
PROP_Inventory_Icon ("RIFLA0")
|
||||
PROP_Tag ("assault_gun")
|
||||
PROP_Inventory_PickupMessage("$TXT_ASSAULTGUN")
|
||||
END_DEFAULTS
|
||||
|
||||
//============================================================================
|
||||
|
@ -767,11 +760,6 @@ void A_FireMiniMissile (AActor *);
|
|||
class AMiniMissileLauncher : public AStrifeWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AMiniMissileLauncher, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return "You picked up the mini missile launcher";
|
||||
}
|
||||
};
|
||||
|
||||
FState AMiniMissileLauncher::States[] =
|
||||
|
@ -818,6 +806,7 @@ IMPLEMENT_ACTOR (AMiniMissileLauncher, Strife, 2003, 0)
|
|||
|
||||
PROP_Inventory_Icon ("MMSLA0")
|
||||
PROP_Tag ("mini_missile_launcher") // "missile_gun" in the Teaser
|
||||
PROP_Inventory_PickupMessage("$TXT_MMLAUNCHER")
|
||||
END_DEFAULTS
|
||||
|
||||
// Rocket Trail -------------------------------------------------------------
|
||||
|
@ -956,11 +945,6 @@ void A_RocketInFlight (AActor *self)
|
|||
void A_FireFlamer (AActor *);
|
||||
|
||||
|
||||
const char *AFlameThrower::PickupMessage ()
|
||||
{
|
||||
return "You picked up the flame thrower";
|
||||
}
|
||||
|
||||
FState AFlameThrower::States[] =
|
||||
{
|
||||
S_NORMAL (FLAM, 'A', -1, NULL, NULL),
|
||||
|
@ -1005,36 +989,9 @@ IMPLEMENT_ACTOR (AFlameThrower, Strife, 2005, 0)
|
|||
|
||||
PROP_Inventory_Icon ("FLAMA0")
|
||||
PROP_Tag ("flame_thrower")
|
||||
PROP_Inventory_PickupMessage("$TXT_FLAMER")
|
||||
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 -------------------------------------------------
|
||||
|
||||
|
@ -1126,11 +1083,6 @@ void A_MaulerTorpedoWave (AActor *);
|
|||
class AMauler : public AStrifeWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AMauler, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return "You picked up the mauler";
|
||||
}
|
||||
};
|
||||
|
||||
FState AMauler::States[] =
|
||||
|
@ -1206,6 +1158,7 @@ IMPLEMENT_ACTOR (AMauler, Strife, 2004, 0)
|
|||
|
||||
PROP_Inventory_Icon ("TRPDA0")
|
||||
PROP_Tag ("mauler") // "blaster" in the Teaser
|
||||
PROP_Inventory_PickupMessage("$TXT_MAULER")
|
||||
END_DEFAULTS
|
||||
|
||||
// Mauler Torpedo version ---------------------------------------------------
|
||||
|
@ -1700,11 +1653,6 @@ void A_FireGrenade (AActor *);
|
|||
class AStrifeGrenadeLauncher : public AStrifeWeapon
|
||||
{
|
||||
DECLARE_ACTOR (AStrifeGrenadeLauncher, AStrifeWeapon)
|
||||
public:
|
||||
const char *PickupMessage ()
|
||||
{
|
||||
return "You picked up the Grenade launcher";
|
||||
}
|
||||
};
|
||||
|
||||
FState AStrifeGrenadeLauncher::States[] =
|
||||
|
@ -1780,6 +1728,7 @@ IMPLEMENT_ACTOR (AStrifeGrenadeLauncher, Strife, 154, 0)
|
|||
|
||||
PROP_Inventory_Icon ("GRNDA0")
|
||||
PROP_Tag ("Grenade_launcher")
|
||||
PROP_Inventory_PickupMessage("$TXT_GLAUNCHER")
|
||||
END_DEFAULTS
|
||||
|
||||
// White Phosphorous Grenade Launcher ---------------------------------------
|
||||
|
@ -1969,6 +1918,7 @@ IMPLEMENT_ACTOR (ASigil, Strife, -1, 0)
|
|||
PROP_Inventory_PickupSound("weapons/sigilcharge")
|
||||
PROP_Tag ("SIGIL")
|
||||
PROP_Inventory_Icon ("I_SGL1")
|
||||
PROP_Inventory_PickupMessage("$TXT_SIGIL")
|
||||
END_DEFAULTS
|
||||
|
||||
// Sigil 1 ------------------------------------------------------------------
|
||||
|
@ -2113,17 +2063,6 @@ AInventory *ASigil::CreateCopy (AActor *other)
|
|||
return copy;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// ASigil :: PickupMessage
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
const char *ASigil::PickupMessage ()
|
||||
{
|
||||
return "You picked up the SIGIL.";
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_SelectPiece
|
||||
|
|
|
@ -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 ();
|
||||
};
|
|
@ -12,7 +12,6 @@
|
|||
#include "m_swap.h"
|
||||
#include "templates.h"
|
||||
#include "a_keys.h"
|
||||
#include "a_strifeweaps.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "gi.h"
|
||||
|
||||
|
@ -685,26 +684,27 @@ private:
|
|||
// How much ammo does the player have?
|
||||
static const struct
|
||||
{
|
||||
const PClass *AmmoType;
|
||||
ENamedName AmmoType;
|
||||
int Y;
|
||||
} AmmoList[7] =
|
||||
{
|
||||
{ RUNTIME_CLASS(AClipOfBullets), 19 },
|
||||
{ RUNTIME_CLASS(APoisonBolts), 35 },
|
||||
{ RUNTIME_CLASS(AElectricBolts), 43 },
|
||||
{ RUNTIME_CLASS(AHEGrenadeRounds), 59 },
|
||||
{ RUNTIME_CLASS(APhosphorusGrenadeRounds), 67 },
|
||||
{ RUNTIME_CLASS(AMiniMissiles), 75 },
|
||||
{ RUNTIME_CLASS(AEnergyPod), 83 }
|
||||
{ NAME_ClipOfBullets, 19 },
|
||||
{ NAME_PoisonBolts, 35 },
|
||||
{ NAME_ElectricBolts, 43 },
|
||||
{ NAME_HEGrenadeRounds, 59 },
|
||||
{ NAME_PhosphorusGrenadeRounds, 67 },
|
||||
{ NAME_MiniMissiles, 75 },
|
||||
{ NAME_EnergyPod, 83 }
|
||||
};
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -242,7 +242,10 @@ enum
|
|||
ADEF_Weapon_ProjectileType,
|
||||
ADEF_PowerupGiver_Powerup,
|
||||
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)
|
||||
ADEF_XScale,
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "r_data.h"
|
||||
#include "w_wad.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "thingdef.h"
|
||||
|
||||
void FActorInfo::BuildDefaults ()
|
||||
{
|
||||
|
@ -61,6 +62,7 @@ void FActorInfo::BuildDefaults ()
|
|||
|
||||
parent = Class->ParentClass;
|
||||
parent->ActorInfo->BuildDefaults ();
|
||||
Class->Meta = parent->Meta;
|
||||
assert (Class->Size >= parent->Size);
|
||||
memcpy (Class->Defaults, parent->Defaults, parent->Size);
|
||||
if (Class->Size > parent->Size)
|
||||
|
@ -129,9 +131,6 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
|
|||
|
||||
switch (defnum)
|
||||
{
|
||||
case ADEF_Weapon_AmmoType1:
|
||||
case ADEF_Weapon_AmmoType2:
|
||||
case ADEF_Weapon_SisterType:
|
||||
case ADEF_Weapon_ProjectileType:
|
||||
case ADEF_PowerupGiver_Powerup:
|
||||
datatype = PClass::FindClass (datastr);
|
||||
|
@ -167,6 +166,19 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
|
|||
sgClass->Meta.SetMetaString (AMETA_StrifeName, name);
|
||||
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:
|
||||
giver->PowerupType = datatype;
|
||||
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_UpSound: weapon->UpSound = 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_AmmoType1: weapon->AmmoType1 = datatype; break;
|
||||
case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = datatype; break;
|
||||
case ADEF_Weapon_AmmoType1: weapon->AmmoType1 = fuglyname(datastr); break;
|
||||
case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = fuglyname(datastr); break;
|
||||
case ADEF_Weapon_AmmoGive1: weapon->AmmoGive1 = dataint; break;
|
||||
case ADEF_Weapon_AmmoGive2: weapon->AmmoGive2 = dataint; break;
|
||||
case ADEF_Weapon_AmmoUse1: weapon->AmmoUse1 = dataint; break;
|
||||
|
|
|
@ -207,6 +207,9 @@ public:
|
|||
#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_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_YScale(x) ADD_BYTE_PROP(ADEF_YScale,x)
|
||||
|
|
|
@ -68,7 +68,19 @@ xx(Shell)
|
|||
xx(RocketAmmo)
|
||||
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(AssaultGun)
|
||||
xx(FlameThrower)
|
||||
|
|
|
@ -127,11 +127,6 @@ void SexMessage (const char *from, char *to, int gender, const char *victim, con
|
|||
};
|
||||
const char *subst = NULL;
|
||||
|
||||
if (from[0]=='$')
|
||||
{
|
||||
from=GStrings(from+1);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (*from != '%')
|
||||
|
@ -256,32 +251,16 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
|
|||
if (message == NULL)
|
||||
{
|
||||
message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
if (message == NULL)
|
||||
{
|
||||
message = attacker->GetHitObituary ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message = attacker->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
if (message == NULL)
|
||||
{
|
||||
message = attacker->GetObituary ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (message)
|
||||
{
|
||||
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 (message == NULL && attacker != NULL && attacker->player != NULL)
|
||||
{
|
||||
if (friendly)
|
||||
{
|
||||
|
@ -297,18 +276,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
|
|||
if (inflictor != NULL)
|
||||
{
|
||||
message = inflictor->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
if (message == NULL)
|
||||
{
|
||||
message = inflictor->GetObituary ();
|
||||
}
|
||||
}
|
||||
if (message == NULL && attacker->player->ReadyWeapon != NULL)
|
||||
{
|
||||
message = attacker->player->ReadyWeapon->GetClass()->Meta.GetMetaString (AMETA_Obituary);
|
||||
if (message == NULL)
|
||||
{
|
||||
message = attacker->player->ReadyWeapon->GetObituary ();
|
||||
}
|
||||
}
|
||||
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,
|
||||
self->player->userinfo.netname, attacker->player->userinfo.netname);
|
||||
Printf (PRINT_MEDIUM, "%s\n", gendermessage);
|
||||
return;
|
||||
message=GStrings[message+1];
|
||||
}
|
||||
|
||||
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);
|
||||
Printf (PRINT_MEDIUM, "%s\n", gendermessage);
|
||||
}
|
||||
|
|
|
@ -2247,16 +2247,6 @@ angle_t AActor::AngleIncrements ()
|
|||
return ANGLE_45;
|
||||
}
|
||||
|
||||
const char *AActor::GetObituary ()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *AActor::GetHitObituary ()
|
||||
{
|
||||
return GetObituary ();
|
||||
}
|
||||
|
||||
void AActor::PreExplode ()
|
||||
{
|
||||
}
|
||||
|
|
120
src/thingdef.cpp
120
src/thingdef.cpp
|
@ -3237,6 +3237,18 @@ static void InventoryGiveQuest (APuzzleItem *defaults, Baggage &bag)
|
|||
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
|
||||
// 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
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
// 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)
|
||||
{
|
||||
SC_MustGetString();
|
||||
|
@ -3547,6 +3539,7 @@ static const ActorProps props[] =
|
|||
{ "gibhealth", ActorGibHealth, RUNTIME_CLASS(AActor) },
|
||||
{ "heal", ActorHealState, RUNTIME_CLASS(AActor) },
|
||||
{ "health", ActorHealth, RUNTIME_CLASS(AActor) },
|
||||
{ "health.lowmessage", (apf)HealthLowMessage, RUNTIME_CLASS(AHealth) },
|
||||
{ "height", ActorHeight, RUNTIME_CLASS(AActor) },
|
||||
{ "hitobituary", ActorHitObituary, 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
|
||||
// This also processes all the internal actors to adjust the type
|
||||
// fields in the weapons
|
||||
//
|
||||
//==========================================================================
|
||||
void FinishThingdef()
|
||||
{
|
||||
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!
|
||||
if (GetDefaultByType(ti)->flags & MF_FRIENDLY)
|
||||
|
@ -3654,13 +3660,16 @@ void FinishThingdef()
|
|||
if (v != NAME_None && v.IsValidName())
|
||||
{
|
||||
defaults->AmmoType1 = PClass::FindClass(v);
|
||||
if (!defaults->AmmoType1)
|
||||
if (isRuntimeActor)
|
||||
{
|
||||
SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
|
||||
}
|
||||
else if (defaults->AmmoType1->ParentClass != RUNTIME_CLASS(AAmmo))
|
||||
{
|
||||
SC_ScriptError("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
|
||||
if (!defaults->AmmoType1)
|
||||
{
|
||||
I_Error("Unknown 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())
|
||||
{
|
||||
defaults->AmmoType2 = PClass::FindClass(v);
|
||||
if (!defaults->AmmoType2)
|
||||
if (isRuntimeActor)
|
||||
{
|
||||
SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
|
||||
}
|
||||
else if (defaults->AmmoType2->ParentClass != RUNTIME_CLASS(AAmmo))
|
||||
{
|
||||
SC_ScriptError("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
|
||||
if (!defaults->AmmoType2)
|
||||
{
|
||||
I_Error("Unknown 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())
|
||||
{
|
||||
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());
|
||||
}
|
||||
else if (!defaults->SisterWeaponType->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
SC_ScriptError("Invalid sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
|
||||
if (!defaults->SisterWeaponType)
|
||||
{
|
||||
I_Error("Unknown 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 (!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());
|
||||
if (!defaults->DownState) SC_ScriptError("Weapon %s doesn't define a deselect state.\n", ti->TypeName.GetChars());
|
||||
if (!defaults->AtkState) SC_ScriptError("Weapon %s doesn't define an attack state.\n", ti->TypeName.GetChars());
|
||||
if (isRuntimeActor)
|
||||
{
|
||||
// Do some consistency checks. If these states are undefined the weapon cannot work!
|
||||
if (!defaults->ReadyState) I_Error("Weapon %s doesn't define a ready 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 (!defaults->HoldAtkState) defaults->HoldAtkState=defaults->AtkState;
|
||||
if (!defaults->AltHoldAtkState) defaults->AltHoldAtkState=defaults->AltAtkState;
|
||||
// If the weapon doesn't define a hold state use the attack state instead.
|
||||
if (!defaults->HoldAtkState) defaults->HoldAtkState=defaults->AtkState;
|
||||
if (!defaults->AltHoldAtkState) defaults->AltHoldAtkState=defaults->AltAtkState;
|
||||
}
|
||||
|
||||
}
|
||||
// same for the weapon type of weapon pieces.
|
||||
|
@ -3715,11 +3733,11 @@ void FinishThingdef()
|
|||
defaults->WeaponClass = PClass::FindClass(v);
|
||||
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)))
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,26 @@
|
|||
#ifndef __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 EvalExpressionI (int id, AActor *self);
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
#include "actors/shared/splashes.txt"
|
||||
|
||||
#include "actors/doom/deadthings.txt"
|
||||
#include "actors/doom/doomammo.txt"
|
||||
#include "actors/doom/doomarmor.txt"
|
||||
#include "actors/doom/doomartifacts.txt"
|
||||
#include "actors/doom/doomhealth.txt"
|
||||
#include "actors/doom/doomkeys.txt"
|
||||
#include "actors/doom/doomdecorations.txt"
|
||||
#include "actors/doom/stealthmonsters.txt"
|
||||
|
@ -11,6 +13,7 @@
|
|||
#include "actors/raven/ravenartifacts.txt"
|
||||
#include "actors/raven/ravenhealth.txt"
|
||||
|
||||
#include "actors/heretic/hereticammo.txt"
|
||||
#include "actors/heretic/hereticarmor.txt"
|
||||
#include "actors/heretic/hereticartifacts.txt"
|
||||
#include "actors/heretic/heretickeys.txt"
|
||||
|
@ -21,6 +24,7 @@
|
|||
#include "actors/hexen/hexendecorations.txt"
|
||||
#include "actors/hexen/hexenkeys.txt"
|
||||
#include "actors/hexen/hexenspecialdecs.txt"
|
||||
#include "actors/hexen/mana.txt"
|
||||
#include "actors/hexen/puzzleitems.txt"
|
||||
#include "actors/hexen/scriptprojectiles.txt"
|
||||
#include "actors/hexen/speedboots.txt"
|
||||
|
@ -30,6 +34,7 @@
|
|||
#include "actors/strife/peasants.txt"
|
||||
#include "actors/strife/questitems.txt"
|
||||
#include "actors/strife/ratbuddy.txt"
|
||||
#include "actors/strife/strifeammo.txt"
|
||||
#include "actors/strife/strifearmor.txt"
|
||||
#include "actors/strife/strifeitems.txt"
|
||||
#include "actors/strife/strifekeys.txt"
|
||||
|
|
144
wadsrc/decorate/doom/doomammo.txt
Normal file
144
wadsrc/decorate/doom/doomammo.txt
Normal 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
|
||||
}
|
||||
}
|
||||
|
53
wadsrc/decorate/doom/doomhealth.txt
Normal file
53
wadsrc/decorate/doom/doomhealth.txt
Normal 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
|
||||
}
|
||||
}
|
230
wadsrc/decorate/heretic/hereticammo.txt
Normal file
230
wadsrc/decorate/heretic/hereticammo.txt
Normal 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
|
||||
}
|
||||
}
|
93
wadsrc/decorate/hexen/mana.txt
Normal file
93
wadsrc/decorate/hexen/mana.txt
Normal 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
|
||||
}
|
||||
}
|
231
wadsrc/decorate/strife/strifeammo.txt
Normal file
231
wadsrc/decorate/strife/strifeammo.txt
Normal 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
|
||||
}
|
||||
}
|
||||
|
|
@ -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 -------------------------------------------------------
|
||||
// SCRIPT32 in strife0.wad has an Acolyte that drops this, but I couldn't
|
||||
|
|
|
@ -966,6 +966,7 @@ TXT_WEAPON_C4 = "WRAITHVERGE ASSEMBLED";
|
|||
TXT_WEAPON_M2 = "FROST SHARDS";
|
||||
TXT_WEAPON_M3 = "ARC OF DEATH";
|
||||
TXT_WEAPON_M4 = "BLOODSCOURGE ASSEMBLED";
|
||||
TXT_WEAPONPIECE = "A weapon piece! This is your lucky day!";
|
||||
TXT_QUIETUS_PIECE = "SEGMENT OF QUIETUS";
|
||||
TXT_WRAITHVERGE_PIECE = "SEGMENT OF WRAITHVERGE";
|
||||
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_GUARDUNIFORM = "You picked up the Guard 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_INFO = "You picked up the info.";
|
||||
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_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_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
|
||||
|
||||
TXT_RANDOM_PEASANT_01 = "Please don't hurt me.";
|
||||
|
|
|
@ -240,8 +240,10 @@ actors/shared/debris.txt decorate/shared/debris.txt
|
|||
actors/shared/splashes.txt decorate/shared/splashes.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/doomartifacts.txt decorate/doom/doomartifacts.txt
|
||||
actors/doom/doomhealth.txt decorate/doom/doomhealth.txt
|
||||
actors/doom/doomkeys.txt decorate/doom/doomkeys.txt
|
||||
actors/doom/doomdecorations.txt decorate/doom/doomdecorations.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/ravenhealth.txt decorate/raven/ravenhealth.txt
|
||||
|
||||
actors/heretic/hereticammo.txt decorate/heretic/hereticammo.txt
|
||||
actors/heretic/hereticarmor.txt decorate/heretic/hereticarmor.txt
|
||||
actors/heretic/hereticartifacts.txt decorate/heretic/hereticartifacts.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/hexenkeys.txt decorate/hexen/hexenkeys.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/scriptprojectiles.txt decorate/hexen/scriptprojectiles.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/questitems.txt decorate/strife/questitems.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/strifeitems.txt decorate/strife/strifeitems.txt
|
||||
actors/strife/strifekeys.txt decorate/strife/strifekeys.txt
|
||||
|
|
1346
zdoom.vcproj
1346
zdoom.vcproj
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue