mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
IMPORTANT NOTE: I uncommented some code depending on the missing x86.cpp file to allow this to compile, These changes must be reverted as soon as this file is added (see v_palette.cpp and win32/i_system.cpp.)
- Removed AT_GAME_SET because it's no longer used anywhere. - Converted the last remaining global classes to DECORATE. - Fixed: Inventory.PickupFlash requires an class name as parameter not an integer. Some Hexen definitions got it wrong. - Converted Hexen's Pig to DECORATE. - Replaced the ActorInfo definitions of all internal inventory classes with DECORATE definitions. - Added option to specify a powerup's duration in second by using a negative number. SVN r1137 (trunk)
This commit is contained in:
parent
67c844df4d
commit
ae54e13428
50 changed files with 868 additions and 640 deletions
|
@ -1,3 +1,14 @@
|
|||
August 9, 2008 (Changes by Graf Zahl)
|
||||
- Removed AT_GAME_SET because it's no longer used anywhere.
|
||||
- Converted the last remaining global classes to DECORATE.
|
||||
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
|
||||
integer. Some Hexen definitions got it wrong.
|
||||
- Converted Hexen's Pig to DECORATE.
|
||||
- Replaced the ActorInfo definitions of all internal inventory classes with
|
||||
DECORATE definitions.
|
||||
- Added option to specify a powerup's duration in second by using a negative
|
||||
number.
|
||||
|
||||
August 8, 2008
|
||||
- Added Gez's Freedoom detection patch.
|
||||
- SBARINFO update:
|
||||
|
|
|
@ -54,10 +54,6 @@ typedef void *REGINFO;
|
|||
extern REGINFO ARegHead;
|
||||
extern REGINFO ARegTail;
|
||||
|
||||
// List of AT_GAME_SET functions
|
||||
extern REGINFO GRegHead;
|
||||
extern REGINFO GRegTail;
|
||||
|
||||
// List of TypeInfos
|
||||
extern REGINFO CRegHead;
|
||||
extern REGINFO CRegTail;
|
||||
|
|
116
src/b_bot.cpp
116
src/b_bot.cpp
|
@ -104,54 +104,82 @@ FArchive &operator<< (FArchive &arc, botskill_t &skill)
|
|||
|
||||
// set the bot specific weapon information
|
||||
// This is intentionally not in the weapon definition anymore.
|
||||
AT_GAME_SET(BotStuff)
|
||||
void InitBotStuff()
|
||||
{
|
||||
AWeapon * w;
|
||||
AActor * a;
|
||||
static bool done = false;
|
||||
|
||||
if (done) return;
|
||||
done = true;
|
||||
|
||||
w = (AWeapon*)GetDefaultByName ("Pistol");
|
||||
if (w != NULL)
|
||||
struct BotInit
|
||||
{
|
||||
w->MoveCombatDist=25000000;
|
||||
const char *type;
|
||||
int movecombatdist;
|
||||
int weaponflags;
|
||||
const char *projectile;
|
||||
} botinits[] = {
|
||||
|
||||
{ "Pistol", 25000000, 0, NULL },
|
||||
{ "Shotgun", 24000000, 0, NULL },
|
||||
{ "SuperShotgun", 15000000, 0, NULL },
|
||||
{ "Chaingun", 27000000, 0, NULL },
|
||||
{ "RocketLauncher", 18350080, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "Rocket" },
|
||||
{ "PlasmaRifle", 27000000, 0, "PlasmaBall" },
|
||||
{ "BFG9000", 10000000, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_BFG, "BFGBall" },
|
||||
{ "GoldWand", 25000000, 0, NULL },
|
||||
{ "GoldWandPowered", 25000000, 0, NULL },
|
||||
{ "Crossbow", 24000000, 0, "CrossbowFX1" },
|
||||
{ "CrossbowPowered", 24000000, 0, "CrossbowFX2" },
|
||||
{ "Blaster", 27000000, 0, NULL },
|
||||
{ "BlasterPowered", 27000000, 0, "BlasterFX1" },
|
||||
{ "SkullRod", 27000000, 0, "HornRodFX1" },
|
||||
{ "SkullRodPowered", 27000000, 0, "HornRodFX2" },
|
||||
{ "PhoenixRod", 18350080, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "PhoenixFX1" },
|
||||
{ "PhoenixRodPowered", 0, WIF_BOT_MELEE, "PhoenixFX2" },
|
||||
{ "Mace", 27000000, WIF_BOT_REACTION_SKILL_THING, "MaceFX2" },
|
||||
{ "MacePowered", 27000000, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "MaceFX4" },
|
||||
{ "FWeapHammer", 22000000, 0, "HammerMissile" },
|
||||
{ "FWeapQuietus", 20000000, 0, "FSwordMissile" },
|
||||
{ "CWeapStaff", 25000000, 0, "CStaffMissile" },
|
||||
{ "CWeapFlane", 27000000, 0, "CFlameMissile" },
|
||||
{ "MWeapWand", 25000000, 0, "MageWandMissile" },
|
||||
{ "CWeapWraithverge", 22000000, 0, "HolyMissile" },
|
||||
{ "MWeapFrost", 19000000, 0, "FrostMissile" },
|
||||
{ "MWeapLightning", 23000000, 0, "LightningFloor" },
|
||||
{ "MWeapBloodscourge", 20000000, 0, "MageStaffFX2" },
|
||||
{ "StrifeCrossbow", 24000000, 0, "ElectricBolt" },
|
||||
{ "StrifeCrossbow2", 24000000, 0, "PoisonBolt" },
|
||||
{ "AssaultGun", 27000000, 0, NULL },
|
||||
{ "MiniMissileLauncher", 18350080, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "MiniMissile" },
|
||||
{ "FlameThrower", 24000000, 0, "FlameMissile" },
|
||||
{ "Mauler", 15000000, 0, NULL },
|
||||
{ "Mauler2", 10000000, 0, "MaulerTorpedo" },
|
||||
{ "StrifeGrenadeLauncher", 18350080, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "HEGrenade" },
|
||||
{ "StrifeGrenadeLauncher2", 18350080, WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE, "PhosphorousGrenade" },
|
||||
};
|
||||
|
||||
for(int i=0;i<countof(botinits);i++)
|
||||
{
|
||||
const PClass *cls = PClass::FindClass(botinits[i].type);
|
||||
if (cls != NULL && cls->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
AWeapon *w = (AWeapon*)GetDefaultByType(cls);
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist = botinits[i].movecombatdist;
|
||||
w->WeaponFlags |= botinits[i].weaponflags;
|
||||
w->ProjectileType = PClass::FindClass(botinits[i].projectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("Shotgun");
|
||||
if (w != NULL)
|
||||
|
||||
static char *warnbotmissiles[] = { "PlasmaBall", "Ripper", "HornRodFX1" };
|
||||
for(int i=0;i<countof(warnbotmissiles);i++)
|
||||
{
|
||||
w->MoveCombatDist=24000000;
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("SuperShotgun");
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist=15000000;
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("Chaingun");
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist=27000000;
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("RocketLauncher");
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist=18350080;
|
||||
w->WeaponFlags|=WIF_BOT_REACTION_SKILL_THING|WIF_BOT_EXPLOSIVE;
|
||||
w->ProjectileType=PClass::FindClass("Rocket");
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("PlasmaRifle");
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist=27000000;
|
||||
w->ProjectileType=PClass::FindClass("PlasmaBall");
|
||||
}
|
||||
a = GetDefaultByName ("PlasmaBall");
|
||||
if (a != NULL)
|
||||
{
|
||||
a->flags3|=MF3_WARNBOT;
|
||||
}
|
||||
w = (AWeapon*)GetDefaultByName ("BFG9000");
|
||||
if (w != NULL)
|
||||
{
|
||||
w->MoveCombatDist=10000000;
|
||||
w->WeaponFlags|=WIF_BOT_REACTION_SKILL_THING|WIF_BOT_BFG;
|
||||
w->ProjectileType=PClass::FindClass("BFGBall");
|
||||
AActor *a = GetDefaultByName (warnbotmissiles[i]);
|
||||
if (a != NULL)
|
||||
{
|
||||
a->flags3|=MF3_WARNBOT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ Everything that is changed is marked (maybe commented) with "Added by MC"
|
|||
|
||||
static FRandom pr_botspawn ("BotSpawn");
|
||||
|
||||
void InitBotStuff();
|
||||
|
||||
//Externs
|
||||
FCajunMaster bglobal;
|
||||
|
||||
|
@ -315,6 +317,7 @@ bool FCajunMaster::SpawnBot (const char *name, int color)
|
|||
|
||||
waitingforspawn[playernumber] = true;
|
||||
|
||||
InitBotStuff();
|
||||
Net_WriteByte (DEM_ADDBOT);
|
||||
Net_WriteByte (playernumber);
|
||||
{
|
||||
|
|
|
@ -302,6 +302,8 @@ ACTOR(ClericAttack)
|
|||
ACTOR(FighterAttack)
|
||||
ACTOR(MageAttack)
|
||||
ACTOR(IceSetTics)
|
||||
ACTOR(PigPain)
|
||||
ACTOR(SnoutAttack)
|
||||
|
||||
ACTOR(TemplarAttack)
|
||||
ACTOR(SentinelAttack)
|
||||
|
|
|
@ -148,9 +148,6 @@ IMPLEMENT_POINTY_CLASS (ADehackedPickup)
|
|||
DECLARE_POINTER (RealPickup)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_STATELESS_DEFAULTS (ADehackedPickup, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
|
||||
TArray<PClass *> TouchedActors;
|
||||
|
||||
char *UnchangedSpriteNames;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
class ADehackedPickup : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ADehackedPickup, AInventory)
|
||||
DECLARE_CLASS (ADehackedPickup, AInventory)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Destroy ();
|
||||
|
|
|
@ -2426,7 +2426,6 @@ void D_DoomMain (void)
|
|||
I_FatalError ("No player classes defined");
|
||||
}
|
||||
|
||||
FActorInfo::StaticGameSet ();
|
||||
StartScreen->Progress ();
|
||||
|
||||
Printf ("R_Init: Init %s refresh subsystem.\n", GameNames[gameinfo.gametype]);
|
||||
|
|
|
@ -66,7 +66,7 @@ class player_t;
|
|||
|
||||
class APlayerPawn : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APlayerPawn, AActor)
|
||||
DECLARE_CLASS (APlayerPawn, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
|
@ -133,7 +133,7 @@ public:
|
|||
|
||||
class APlayerChunk : public APlayerPawn
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APlayerChunk, APlayerPawn)
|
||||
DECLARE_CLASS (APlayerChunk, APlayerPawn)
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
// Fighter Weapon Base Class ------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AFighterWeapon, Hexen, -1, 0)
|
||||
PROP_Weapon_Kickback (150)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AFighterWeapon)
|
||||
IMPLEMENT_CLASS (AClericWeapon)
|
||||
IMPLEMENT_CLASS (AMageWeapon)
|
||||
|
||||
bool AFighterWeapon::TryPickup (AActor *toucher)
|
||||
{
|
||||
|
@ -41,10 +41,6 @@ bool AFighterWeapon::TryPickup (AActor *toucher)
|
|||
|
||||
// Cleric Weapon Base Class -------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AClericWeapon, Hexen, -1, 0)
|
||||
PROP_Weapon_Kickback (150)
|
||||
END_DEFAULTS
|
||||
|
||||
bool AClericWeapon::TryPickup (AActor *toucher)
|
||||
{
|
||||
// The Doom and Hexen players are not excluded from pickup in case
|
||||
|
@ -70,10 +66,6 @@ bool AClericWeapon::TryPickup (AActor *toucher)
|
|||
|
||||
// Mage Weapon Base Class ---------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AMageWeapon, Hexen, -1, 0)
|
||||
PROP_Weapon_Kickback (150)
|
||||
END_DEFAULTS
|
||||
|
||||
bool AMageWeapon::TryPickup (AActor *toucher)
|
||||
{
|
||||
// The Doom and Hexen players are not excluded from pickup in case
|
||||
|
|
|
@ -24,21 +24,21 @@ public:
|
|||
|
||||
class AFighterWeapon : public AWeapon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AFighterWeapon, AWeapon);
|
||||
DECLARE_CLASS (AFighterWeapon, AWeapon);
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
||||
class AClericWeapon : public AWeapon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AClericWeapon, AWeapon);
|
||||
DECLARE_CLASS (AClericWeapon, AWeapon);
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
||||
class AMageWeapon : public AWeapon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMageWeapon, AWeapon);
|
||||
DECLARE_CLASS (AMageWeapon, AWeapon);
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
|
|
@ -17,148 +17,16 @@ static FRandom pr_pigplayerthink ("PigPlayerThink");
|
|||
|
||||
extern void AdjustPlayerAngle (AActor *, AActor *);
|
||||
|
||||
void A_SnoutAttack (AActor *actor);
|
||||
|
||||
void A_PigPain (AActor *);
|
||||
void A_PigAttack (AActor *);
|
||||
|
||||
// Snout puff ---------------------------------------------------------------
|
||||
|
||||
class ASnoutPuff : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ASnoutPuff, AActor)
|
||||
};
|
||||
|
||||
FState ASnoutPuff::States[] =
|
||||
{
|
||||
S_NORMAL (FHFX, 'S', 4, NULL , &States[1]),
|
||||
S_NORMAL (FHFX, 'T', 4, NULL , &States[2]),
|
||||
S_NORMAL (FHFX, 'U', 4, NULL , &States[3]),
|
||||
S_NORMAL (FHFX, 'V', 4, NULL , &States[4]),
|
||||
S_NORMAL (FHFX, 'W', 4, NULL , NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (ASnoutPuff, Hexen, -1, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
||||
PROP_RenderStyle (STYLE_Translucent)
|
||||
PROP_Alpha (HX_SHADOW)
|
||||
PROP_SpawnState (0)
|
||||
END_DEFAULTS
|
||||
|
||||
// Snout --------------------------------------------------------------------
|
||||
|
||||
class ASnout : public AWeapon
|
||||
{
|
||||
DECLARE_ACTOR (ASnout, AWeapon)
|
||||
};
|
||||
|
||||
FState ASnout::States[] =
|
||||
{
|
||||
#define S_SNOUTREADY 0
|
||||
S_NORMAL (WPIG, 'A', 1, A_WeaponReady , &States[S_SNOUTREADY]),
|
||||
|
||||
#define S_SNOUTDOWN 1
|
||||
S_NORMAL (WPIG, 'A', 1, A_Lower , &States[S_SNOUTDOWN]),
|
||||
|
||||
#define S_SNOUTUP 2
|
||||
S_NORMAL (WPIG, 'A', 1, A_Raise , &States[S_SNOUTUP]),
|
||||
|
||||
#define S_SNOUTATK 3
|
||||
S_NORMAL (WPIG, 'A', 4, A_SnoutAttack , &States[S_SNOUTATK+1]),
|
||||
S_NORMAL (WPIG, 'B', 8, A_SnoutAttack , &States[S_SNOUTREADY])
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (ASnout, Hexen, -1, 0)
|
||||
PROP_Weapon_SelectionOrder (10000)
|
||||
PROP_Weapon_Flags (WIF_DONTBOB|WIF_BOT_MELEE)
|
||||
PROP_Weapon_UpState (S_SNOUTUP)
|
||||
PROP_Weapon_DownState (S_SNOUTDOWN)
|
||||
PROP_Weapon_ReadyState (S_SNOUTREADY)
|
||||
PROP_Weapon_AtkState (S_SNOUTATK)
|
||||
PROP_Weapon_FlashState (S_SNOUTATK+1) // Not really - but it will do until this gets exported from the EXE
|
||||
PROP_Weapon_Kickback (150)
|
||||
PROP_Weapon_YAdjust (10)
|
||||
END_DEFAULTS
|
||||
|
||||
// Pig player ---------------------------------------------------------------
|
||||
|
||||
class APigPlayer : public APlayerPawn
|
||||
{
|
||||
DECLARE_ACTOR (APigPlayer, APlayerPawn)
|
||||
DECLARE_CLASS (APigPlayer, APlayerPawn)
|
||||
public:
|
||||
void MorphPlayerThink ();
|
||||
};
|
||||
|
||||
FState APigPlayer::States[] =
|
||||
{
|
||||
#define S_PIGPLAY 0
|
||||
S_NORMAL (PIGY, 'A', -1, NULL , NULL),
|
||||
|
||||
#define S_PIGPLAY_RUN1 (S_PIGPLAY+1)
|
||||
S_NORMAL (PIGY, 'A', 3, NULL , &States[S_PIGPLAY_RUN1+1]),
|
||||
S_NORMAL (PIGY, 'B', 3, NULL , &States[S_PIGPLAY_RUN1+2]),
|
||||
S_NORMAL (PIGY, 'C', 3, NULL , &States[S_PIGPLAY_RUN1+3]),
|
||||
S_NORMAL (PIGY, 'D', 3, NULL , &States[S_PIGPLAY_RUN1]),
|
||||
|
||||
#define S_PIGPLAY_PAIN (S_PIGPLAY_RUN1+4)
|
||||
S_NORMAL (PIGY, 'D', 4, A_PigPain , &States[S_PIGPLAY]),
|
||||
|
||||
#define S_PIGPLAY_ATK1 (S_PIGPLAY_PAIN+1)
|
||||
S_NORMAL (PIGY, 'A', 12, NULL , &States[S_PIGPLAY]),
|
||||
|
||||
#define S_PIGPLAY_DIE1 (S_PIGPLAY_ATK1+1)
|
||||
S_NORMAL (PIGY, 'E', 4, A_Scream , &States[S_PIGPLAY_DIE1+1]),
|
||||
S_NORMAL (PIGY, 'F', 3, A_NoBlocking , &States[S_PIGPLAY_DIE1+2]),
|
||||
S_NORMAL (PIGY, 'G', 4, NULL , &States[S_PIGPLAY_DIE1+3]),
|
||||
S_NORMAL (PIGY, 'H', 3, NULL , &States[S_PIGPLAY_DIE1+4]),
|
||||
S_NORMAL (PIGY, 'I', 4, NULL , &States[S_PIGPLAY_DIE1+5]),
|
||||
S_NORMAL (PIGY, 'J', 4, NULL , &States[S_PIGPLAY_DIE1+6]),
|
||||
S_NORMAL (PIGY, 'K', 4, NULL , &States[S_PIGPLAY_DIE1+7]),
|
||||
S_NORMAL (PIGY, 'L', -1, NULL , NULL),
|
||||
|
||||
#define S_PIGPLAY_ICE (S_PIGPLAY_DIE1+8)
|
||||
S_NORMAL (PIGY, 'M', 5, A_FreezeDeath , &States[S_PIGPLAY_ICE+1]),
|
||||
S_NORMAL (PIGY, 'M', 1, A_FreezeDeathChunks , &States[S_PIGPLAY_ICE+1]),
|
||||
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APigPlayer, Hexen, -1, 0)
|
||||
PROP_SpawnHealth (30)
|
||||
PROP_ReactionTime (0)
|
||||
PROP_PainChance (255)
|
||||
PROP_RadiusFixed (16)
|
||||
PROP_HeightFixed (24)
|
||||
PROP_SpeedFixed (1)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_NOTDMATCH|MF_FRIENDLY)
|
||||
PROP_Flags2 (MF2_WINDTHRUST|MF2_FLOORCLIP|MF2_SLIDE|MF2_PASSMOBJ|MF2_TELESTOMP|MF2_PUSHWALL)
|
||||
PROP_Flags3 (MF3_NOBLOCKMONST)
|
||||
PROP_Flags4 (MF4_NOSKIN)
|
||||
|
||||
PROP_SpawnState (S_PIGPLAY)
|
||||
PROP_SeeState (S_PIGPLAY_RUN1)
|
||||
PROP_PainState (S_PIGPLAY_PAIN)
|
||||
PROP_MissileState (S_PIGPLAY_ATK1)
|
||||
PROP_MeleeState (S_PIGPLAY_ATK1)
|
||||
PROP_DeathState (S_PIGPLAY_DIE1)
|
||||
PROP_IDeathState (S_PIGPLAY_ICE)
|
||||
|
||||
// [GRB]
|
||||
PROP_PlayerPawn_JumpZ (6*FRACUNIT)
|
||||
PROP_PlayerPawn_ViewHeight (28*FRACUNIT)
|
||||
PROP_PlayerPawn_ForwardMove1 (FRACUNIT * 0x18 / 0x19) // Yes, the pig is faster than a mage.
|
||||
PROP_PlayerPawn_ForwardMove2 (FRACUNIT * 0x31 / 0x32)
|
||||
PROP_PlayerPawn_SideMove1 (FRACUNIT * 0x17 / 0x18)
|
||||
PROP_PlayerPawn_SideMove2 (FRACUNIT * 0x27 / 0x28)
|
||||
PROP_PlayerPawn_MorphWeapon ("Snout")
|
||||
|
||||
PROP_PainSound ("PigPain")
|
||||
PROP_DeathSound ("PigDeath")
|
||||
END_DEFAULTS
|
||||
|
||||
AT_GAME_SET(PigPlayer)
|
||||
{
|
||||
RUNTIME_CLASS(APigPlayer)->Meta.SetMetaString(APMETA_SoundClass, "pig");
|
||||
}
|
||||
IMPLEMENT_CLASS (APigPlayer)
|
||||
|
||||
void APigPlayer::MorphPlayerThink ()
|
||||
{
|
||||
|
@ -181,71 +49,6 @@ void APigPlayer::MorphPlayerThink ()
|
|||
}
|
||||
}
|
||||
|
||||
// Pig (non-player) ---------------------------------------------------------
|
||||
|
||||
class APig : public AMorphedMonster
|
||||
{
|
||||
DECLARE_ACTOR (APig, AMorphedMonster)
|
||||
};
|
||||
|
||||
FState APig::States[] =
|
||||
{
|
||||
#define S_PIG_LOOK1 0
|
||||
S_NORMAL (PIGY, 'B', 10, A_Look , &States[S_PIG_LOOK1]),
|
||||
|
||||
#define S_PIG_WALK1 (S_PIG_LOOK1+1)
|
||||
S_NORMAL (PIGY, 'A', 3, A_Chase , &States[S_PIG_WALK1+1]),
|
||||
S_NORMAL (PIGY, 'B', 3, A_Chase , &States[S_PIG_WALK1+2]),
|
||||
S_NORMAL (PIGY, 'C', 3, A_Chase , &States[S_PIG_WALK1+3]),
|
||||
S_NORMAL (PIGY, 'D', 3, A_Chase , &States[S_PIG_WALK1]),
|
||||
|
||||
#define S_PIG_PAIN (S_PIG_WALK1+4)
|
||||
S_NORMAL (PIGY, 'D', 4, A_PigPain , &States[S_PIG_WALK1]),
|
||||
|
||||
#define S_PIG_ATK1 (S_PIG_PAIN+1)
|
||||
S_NORMAL (PIGY, 'A', 5, A_FaceTarget , &States[S_PIG_ATK1+1]),
|
||||
S_NORMAL (PIGY, 'A', 10, A_PigAttack , &States[S_PIG_WALK1]),
|
||||
|
||||
#define S_PIG_DIE1 (S_PIG_ATK1+2)
|
||||
S_NORMAL (PIGY, 'E', 4, A_Scream , &States[S_PIG_DIE1+1]),
|
||||
S_NORMAL (PIGY, 'F', 3, A_NoBlocking , &States[S_PIG_DIE1+2]),
|
||||
S_NORMAL (PIGY, 'G', 4, A_QueueCorpse , &States[S_PIG_DIE1+3]),
|
||||
S_NORMAL (PIGY, 'H', 3, NULL , &States[S_PIG_DIE1+4]),
|
||||
S_NORMAL (PIGY, 'I', 4, NULL , &States[S_PIG_DIE1+5]),
|
||||
S_NORMAL (PIGY, 'J', 4, NULL , &States[S_PIG_DIE1+6]),
|
||||
S_NORMAL (PIGY, 'K', 4, NULL , &States[S_PIG_DIE1+7]),
|
||||
S_NORMAL (PIGY, 'L', -1, NULL , NULL),
|
||||
|
||||
#define S_PIG_ICE (S_PIG_DIE1+8)
|
||||
S_NORMAL (PIGY, 'M', 5, A_FreezeDeath , &States[S_PIG_ICE+1]),
|
||||
S_NORMAL (PIGY, 'M', 1, A_FreezeDeathChunks , &States[S_PIG_ICE+1]),
|
||||
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APig, Hexen, -1, 0)
|
||||
PROP_SpawnHealth (25)
|
||||
PROP_PainChance (128)
|
||||
PROP_SpeedFixed (10)
|
||||
PROP_RadiusFixed (12)
|
||||
PROP_HeightFixed (22)
|
||||
PROP_Mass (60)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE)
|
||||
PROP_Flags2 (MF2_WINDTHRUST|MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_TELESTOMP|MF2_PUSHWALL)
|
||||
PROP_Flags3 (MF3_DONTMORPH|MF3_ISMONSTER)
|
||||
|
||||
PROP_SpawnState (S_PIG_LOOK1)
|
||||
PROP_SeeState (S_PIG_WALK1)
|
||||
PROP_PainState (S_PIG_PAIN)
|
||||
PROP_MeleeState (S_PIG_ATK1)
|
||||
PROP_DeathState (S_PIG_DIE1)
|
||||
PROP_IDeathState (S_PIG_ICE)
|
||||
|
||||
PROP_SeeSound ("PigActive1")
|
||||
PROP_PainSound ("PigPain")
|
||||
PROP_DeathSound ("PigDeath")
|
||||
PROP_ActiveSound ("PigActive1")
|
||||
END_DEFAULTS
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_SnoutAttack
|
||||
|
@ -269,7 +72,7 @@ void A_SnoutAttack (AActor *actor)
|
|||
damage = 3+(pr_snoutattack()&3);
|
||||
angle = player->mo->angle;
|
||||
slope = P_AimLineAttack(player->mo, angle, MELEERANGE, &linetarget);
|
||||
puff = P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(ASnoutPuff), true);
|
||||
puff = P_LineAttack(player->mo, angle, MELEERANGE, slope, damage, NAME_Melee, "SnoutPuff", true);
|
||||
S_Sound(player->mo, CHAN_VOICE, "PigActive", 1, ATTN_NORM);
|
||||
if(linetarget)
|
||||
{
|
||||
|
@ -281,25 +84,6 @@ void A_SnoutAttack (AActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigAttack
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_PigAttack (AActor *actor)
|
||||
{
|
||||
if (!actor->target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (actor->CheckMeleeRange ())
|
||||
{
|
||||
P_DamageMobj(actor->target, actor, actor, 2+(pr_pigattack()&1), NAME_Melee);
|
||||
S_Sound(actor, CHAN_WEAPON, "PigAttack", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_PigPain
|
||||
|
|
|
@ -13,7 +13,7 @@ void A_Summon (AActor *);
|
|||
|
||||
class AArtiDarkServant : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (AArtiDarkServant, AInventory)
|
||||
DECLARE_CLASS (AArtiDarkServant, AInventory)
|
||||
public:
|
||||
bool Use (bool pickup);
|
||||
};
|
||||
|
|
|
@ -7,29 +7,11 @@
|
|||
#include "templates.h"
|
||||
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AArmor, Any, -1, 0)
|
||||
PROP_Inventory_PickupSound ("misc/armor_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmor, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_KEEPDEPLETED)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmorPickup, Any, -1, 0)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmorBonus, Any, -1, 0)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
|
||||
PROP_BasicArmorBonus_SavePercent (FRACUNIT/3)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHexenArmor, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_UNDROPPABLE | IF_KEEPDEPLETED)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AArmor)
|
||||
IMPLEMENT_CLASS (ABasicArmor)
|
||||
IMPLEMENT_CLASS (ABasicArmorPickup)
|
||||
IMPLEMENT_CLASS (ABasicArmorBonus)
|
||||
IMPLEMENT_CLASS (AHexenArmor)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -32,7 +32,7 @@ static FRandom pr_torch ("Torch");
|
|||
|
||||
EXTERN_CVAR (Bool, r_drawfuzz);
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (APowerup)
|
||||
IMPLEMENT_CLASS (APowerup)
|
||||
|
||||
// Powerup-Giver -------------------------------------------------------------
|
||||
|
||||
|
@ -340,10 +340,7 @@ void APowerup::OwnerDied ()
|
|||
|
||||
// Invulnerability Powerup ---------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerInvulnerable, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVULNTICS)
|
||||
PROP_Inventory_Icon ("SPSHLD0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerInvulnerable)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -475,11 +472,7 @@ int APowerInvulnerable::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Strength (aka Berserk) Powerup --------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerStrength, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (1)
|
||||
PROP_Powerup_Color (128, 255, 0, 0)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerStrength)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -543,9 +536,7 @@ PalEntry APowerStrength::GetBlend ()
|
|||
|
||||
// Invisibility Powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerInvisibility, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVISTICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerInvisibility)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -625,9 +616,7 @@ int APowerInvisibility::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Ghost Powerup (Heretic's version of invisibility) -------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerGhost, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVISTICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerGhost)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -670,10 +659,7 @@ int APowerGhost::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Shadow Powerup (Strife's version of invisibility) -------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerShadow, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (55*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerShadow)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -754,10 +740,7 @@ int APowerShadow::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Ironfeet Powerup ----------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerIronFeet, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (IRONTICS)
|
||||
PROP_Powerup_Color (32, 0, 255, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerIronFeet)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -783,12 +766,7 @@ void APowerIronFeet::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
|
||||
// Strife Environment Suit Powerup -------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerMask, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (80*TICRATE)
|
||||
PROP_Powerup_Color (0, 0, 0, 0)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
PROP_Inventory_Icon ("I_MASK")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerMask)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -825,9 +803,7 @@ void APowerMask::DoEffect ()
|
|||
|
||||
// Light-Amp Powerup ---------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerLightAmp, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INFRATICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerLightAmp)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -868,9 +844,7 @@ void APowerLightAmp::EndEffect ()
|
|||
|
||||
// Torch Powerup -------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerTorch, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INFRATICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerTorch)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -932,10 +906,7 @@ void APowerTorch::DoEffect ()
|
|||
|
||||
// Flight (aka Wings of Wrath) powerup ---------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerFlight, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (FLIGHTTICS)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerFlight)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1066,10 +1037,7 @@ bool APowerFlight::DrawPowerup (int x, int y)
|
|||
|
||||
// Weapon Level 2 (aka Tome of Power) Powerup --------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerWeaponLevel2, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (WPNLEV2TICS)
|
||||
PROP_Inventory_Icon ("SPINBK0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerWeaponLevel2)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1138,16 +1106,12 @@ void APowerWeaponLevel2::EndEffect ()
|
|||
|
||||
class APlayerSpeedTrail : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APlayerSpeedTrail, AActor)
|
||||
DECLARE_CLASS (APlayerSpeedTrail, AActor)
|
||||
public:
|
||||
void Tick ();
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APlayerSpeedTrail, Any, -1, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
||||
PROP_Alpha (FRACUNIT*6/10)
|
||||
PROP_RenderStyle (STYLE_Translucent)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APlayerSpeedTrail)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1170,11 +1134,7 @@ void APlayerSpeedTrail::Tick ()
|
|||
|
||||
// Speed Powerup -------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerSpeed, Any, -1, 0)
|
||||
PROP_SpeedLong(3*FRACUNIT/2)
|
||||
PROP_Powerup_EffectTics (SPEEDTICS)
|
||||
PROP_Inventory_Icon ("SPBOOT0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerSpeed)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1238,24 +1198,11 @@ void APowerSpeed::DoEffect ()
|
|||
|
||||
// Minotaur (aka Dark Servant) powerup ---------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerMinotaur, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (MAULATORTICS)
|
||||
PROP_Inventory_Icon ("SPMINO0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerMinotaur)
|
||||
|
||||
// Targeter powerup ---------------------------------------------------------
|
||||
|
||||
FState APowerTargeter::States[] =
|
||||
{
|
||||
S_NORMAL (TRGT, 'A', -1, NULL, NULL),
|
||||
S_NORMAL (TRGT, 'B', -1, NULL, NULL),
|
||||
S_NORMAL (TRGT, 'C', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APowerTargeter, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (160*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerTargeter)
|
||||
|
||||
void APowerTargeter::Travelled ()
|
||||
{
|
||||
|
@ -1269,9 +1216,14 @@ void APowerTargeter::InitEffect ()
|
|||
if ((player = Owner->player) == NULL)
|
||||
return;
|
||||
|
||||
P_SetPsprite (player, ps_targetcenter, &States[0]);
|
||||
P_SetPsprite (player, ps_targetleft, &States[1]);
|
||||
P_SetPsprite (player, ps_targetright, &States[2]);
|
||||
FState *state = FindState("Targeter");
|
||||
|
||||
if (state != NULL)
|
||||
{
|
||||
P_SetPsprite (player, ps_targetcenter, state + 0);
|
||||
P_SetPsprite (player, ps_targetleft, state + 1);
|
||||
P_SetPsprite (player, ps_targetright, state + 2);
|
||||
}
|
||||
|
||||
player->psprites[ps_targetcenter].sx = (160-3)*FRACUNIT;
|
||||
player->psprites[ps_targetcenter].sy =
|
||||
|
@ -1328,9 +1280,7 @@ void APowerTargeter::PositionAccuracy ()
|
|||
|
||||
// Frightener Powerup --------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerFrightener, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (60*TICRATE)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerFrightener)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1362,17 +1312,11 @@ void APowerFrightener::EndEffect ()
|
|||
|
||||
// Scanner powerup ----------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerScanner, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (80*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (APowerScanner)
|
||||
|
||||
// Time freezer powerup -----------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerTimeFreezer, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( TIMEFREEZE_TICS )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerTimeFreezer)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1487,9 +1431,7 @@ void APowerTimeFreezer::EndEffect( )
|
|||
|
||||
// Damage powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerDamage, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 25*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerDamage)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1543,9 +1485,7 @@ void APowerDamage::ModifyDamage(int damage, FName damageType, int &newdamage, bo
|
|||
|
||||
// Quarter damage powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerProtection, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 25*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerProtection)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1598,9 +1538,7 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage
|
|||
|
||||
// Drain rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerDrain, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 60*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerDrain)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1636,9 +1574,7 @@ void APowerDrain::EndEffect( )
|
|||
|
||||
// Regeneration rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerRegeneration, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 120*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerRegeneration)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1673,8 +1609,7 @@ void APowerRegeneration::EndEffect( )
|
|||
|
||||
// High jump rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerHighJump, Any, -1, 0 )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerHighJump)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1709,9 +1644,7 @@ void APowerHighJump::EndEffect( )
|
|||
|
||||
// Morph powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerMorph, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( MORPHTICS )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerMorph)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -26,7 +26,7 @@ class player_t;
|
|||
// owner while it is present.
|
||||
class APowerup : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerup, AInventory)
|
||||
DECLARE_CLASS (APowerup, AInventory)
|
||||
public:
|
||||
virtual void Tick ();
|
||||
virtual void Destroy ();
|
||||
|
@ -51,7 +51,7 @@ protected:
|
|||
// An artifact is an item that gives the player a powerup when activated.
|
||||
class APowerupGiver : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerupGiver, AInventory)
|
||||
DECLARE_CLASS (APowerupGiver, AInventory)
|
||||
public:
|
||||
virtual bool Use (bool pickup);
|
||||
virtual void Serialize (FArchive &arc);
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
class APowerInvulnerable : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerInvulnerable, APowerup)
|
||||
DECLARE_CLASS (APowerInvulnerable, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
@ -74,7 +74,7 @@ protected:
|
|||
|
||||
class APowerStrength : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerStrength, APowerup)
|
||||
DECLARE_CLASS (APowerStrength, APowerup)
|
||||
public:
|
||||
PalEntry GetBlend ();
|
||||
protected:
|
||||
|
@ -85,7 +85,7 @@ protected:
|
|||
|
||||
class APowerInvisibility : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerInvisibility, APowerup)
|
||||
DECLARE_CLASS (APowerInvisibility, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
@ -95,7 +95,7 @@ protected:
|
|||
|
||||
class APowerGhost : public APowerInvisibility
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerGhost, APowerInvisibility)
|
||||
DECLARE_CLASS (APowerGhost, APowerInvisibility)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
int AlterWeaponSprite (vissprite_t *vis);
|
||||
|
@ -103,7 +103,7 @@ protected:
|
|||
|
||||
class APowerShadow : public APowerInvisibility
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerShadow, APowerInvisibility)
|
||||
DECLARE_CLASS (APowerShadow, APowerInvisibility)
|
||||
protected:
|
||||
bool HandlePickup (AInventory *item);
|
||||
void InitEffect ();
|
||||
|
@ -112,14 +112,14 @@ protected:
|
|||
|
||||
class APowerIronFeet : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerIronFeet, APowerup)
|
||||
DECLARE_CLASS (APowerIronFeet, APowerup)
|
||||
public:
|
||||
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
};
|
||||
|
||||
class APowerMask : public APowerIronFeet
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerMask, APowerIronFeet)
|
||||
DECLARE_CLASS (APowerMask, APowerIronFeet)
|
||||
public:
|
||||
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
void DoEffect ();
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
|
||||
class APowerLightAmp : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerLightAmp, APowerup)
|
||||
DECLARE_CLASS (APowerLightAmp, APowerup)
|
||||
protected:
|
||||
void DoEffect ();
|
||||
void EndEffect ();
|
||||
|
@ -135,7 +135,7 @@ protected:
|
|||
|
||||
class APowerTorch : public APowerLightAmp
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerTorch, APowerLightAmp)
|
||||
DECLARE_CLASS (APowerTorch, APowerLightAmp)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
protected:
|
||||
|
@ -145,7 +145,7 @@ protected:
|
|||
|
||||
class APowerFlight : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerFlight, APowerup)
|
||||
DECLARE_CLASS (APowerFlight, APowerup)
|
||||
public:
|
||||
bool DrawPowerup (int x, int y);
|
||||
void Serialize (FArchive &arc);
|
||||
|
@ -160,7 +160,7 @@ protected:
|
|||
|
||||
class APowerWeaponLevel2 : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerWeaponLevel2, APowerup)
|
||||
DECLARE_CLASS (APowerWeaponLevel2, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
@ -168,7 +168,7 @@ protected:
|
|||
|
||||
class APowerSpeed : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerSpeed, APowerup)
|
||||
DECLARE_CLASS (APowerSpeed, APowerup)
|
||||
protected:
|
||||
void DoEffect ();
|
||||
fixed_t GetSpeedFactor();
|
||||
|
@ -176,17 +176,17 @@ protected:
|
|||
|
||||
class APowerMinotaur : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerMinotaur, APowerup)
|
||||
DECLARE_CLASS (APowerMinotaur, APowerup)
|
||||
};
|
||||
|
||||
class APowerScanner : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerScanner, APowerup)
|
||||
DECLARE_CLASS (APowerScanner, APowerup)
|
||||
};
|
||||
|
||||
class APowerTargeter : public APowerup
|
||||
{
|
||||
DECLARE_ACTOR (APowerTargeter, APowerup)
|
||||
DECLARE_CLASS (APowerTargeter, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
@ -197,7 +197,7 @@ protected:
|
|||
|
||||
class APowerFrightener : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerFrightener, APowerup)
|
||||
DECLARE_CLASS (APowerFrightener, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
@ -205,7 +205,7 @@ protected:
|
|||
|
||||
class APowerTimeFreezer : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerTimeFreezer, APowerup )
|
||||
DECLARE_CLASS( APowerTimeFreezer, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void DoEffect( );
|
||||
|
@ -214,7 +214,7 @@ protected:
|
|||
|
||||
class APowerDamage : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerDamage, APowerup )
|
||||
DECLARE_CLASS( APowerDamage, APowerup )
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
@ -223,7 +223,7 @@ protected:
|
|||
|
||||
class APowerProtection : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerProtection, APowerup )
|
||||
DECLARE_CLASS( APowerProtection, APowerup )
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
@ -232,7 +232,7 @@ protected:
|
|||
|
||||
class APowerDrain : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerDrain, APowerup )
|
||||
DECLARE_CLASS( APowerDrain, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
@ -240,7 +240,7 @@ protected:
|
|||
|
||||
class APowerRegeneration : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerRegeneration, APowerup )
|
||||
DECLARE_CLASS( APowerRegeneration, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
@ -248,7 +248,7 @@ protected:
|
|||
|
||||
class APowerHighJump : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerHighJump, APowerup )
|
||||
DECLARE_CLASS( APowerHighJump, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
@ -256,7 +256,7 @@ protected:
|
|||
|
||||
class APowerMorph : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerMorph, APowerup )
|
||||
DECLARE_CLASS( APowerMorph, APowerup )
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
|
||||
|
|
|
@ -429,10 +429,7 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AKey, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_INTERHUBSTRIP)
|
||||
PROP_Inventory_PickupSound ("misc/k_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AKey)
|
||||
|
||||
bool AKey::HandlePickup (AInventory *item)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
class AKey : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AKey, AInventory)
|
||||
DECLARE_CLASS (AKey, AInventory)
|
||||
public:
|
||||
virtual bool HandlePickup (AInventory *item);
|
||||
|
||||
|
|
|
@ -530,11 +530,7 @@ bool P_MorphedDeath(AActor *actor, AActor **morphed, int *morphedstyle, int *mor
|
|||
|
||||
// Base class for morphing projectiles --------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR(AMorphProjectile, Any, -1, 0)
|
||||
PROP_Damage (1)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
|
||||
PROP_Flags2 (MF2_NOTELEPORT)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS(AMorphProjectile)
|
||||
|
||||
int AMorphProjectile::DoSpecialDamage (AActor *target, int damage)
|
||||
{
|
||||
|
@ -566,12 +562,6 @@ IMPLEMENT_POINTY_CLASS (AMorphedMonster)
|
|||
DECLARE_POINTER (UnmorphedMe)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_STATELESS_DEFAULTS (AMorphedMonster, Any, -1, 0)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE)
|
||||
PROP_Flags2 (MF2_MCROSS|MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL)
|
||||
PROP_Flags3 (MF3_DONTMORPH|MF3_ISMONSTER)
|
||||
END_DEFAULTS
|
||||
|
||||
void AMorphedMonster::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
void Tick () {} // Does absolutely nothing itself
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AInterpolationSpecial, Any, 9075, 0)
|
||||
IMPLEMENT_CLASS (AInterpolationSpecial)
|
||||
|
||||
/*
|
||||
== PathFollower: something that follows a camera path
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
|
||||
static FRandom pr_restore ("RestorePos");
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AAmmo, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_KEEPDEPLETED)
|
||||
PROP_Inventory_PickupSound ("misc/ammo_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AAmmo)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -366,32 +363,6 @@ void A_RestoreSpecialPosition (AActor *self)
|
|||
}
|
||||
}
|
||||
|
||||
// Pickup flash -------------------------------------------------------------
|
||||
|
||||
class APickupFlash : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (APickupFlash, AActor)
|
||||
};
|
||||
|
||||
FState APickupFlash::States[] =
|
||||
{
|
||||
S_NORMAL (ACLO, 'D', 3, NULL , &States[1]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[2]),
|
||||
S_NORMAL (ACLO, 'D', 3, NULL , &States[3]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[4]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[5]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[6]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[7]),
|
||||
S_NORMAL (ACLO, 'A', 3, NULL , &States[8]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[9]),
|
||||
S_NORMAL (ACLO, 'A', 3, NULL , NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APickupFlash, Raven, -1, 0)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Flags (MF_NOGRAVITY)
|
||||
END_DEFAULTS
|
||||
|
||||
/***************************************************************************/
|
||||
/* AInventory implementation */
|
||||
/***************************************************************************/
|
||||
|
@ -1154,11 +1125,7 @@ bool AInventory::DrawPowerup (int x, int y)
|
|||
/* AArtifact implementation */
|
||||
/***************************************************************************/
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerupGiver, Any, -1, 0)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerupGiver)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1349,8 +1316,7 @@ void AInventory::DetachFromOwner ()
|
|||
{
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ACustomInventory, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ACustomInventory)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1396,12 +1362,7 @@ bool ACustomInventory::TryPickup (AActor *toucher)
|
|||
return useok;
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHealth, Any, -1, 0)
|
||||
PROP_Inventory_Amount (1)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_PickupSound ("misc/health_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AHealth)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1493,10 +1454,7 @@ bool AHealth::TryPickup (AActor *other)
|
|||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHealthPickup, Any, -1, 0)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AHealthPickup)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -1724,9 +1682,9 @@ void ABackpackItem::DetachFromOwner ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR(ABackpackItem)
|
||||
IMPLEMENT_CLASS(ABackpackItem)
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AMapRevealer)
|
||||
IMPLEMENT_CLASS (AMapRevealer)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -175,7 +175,7 @@ private:
|
|||
// CustomInventory: Supports the Use, Pickup, and Drop states from 96x
|
||||
class ACustomInventory : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ACustomInventory, AInventory)
|
||||
DECLARE_CLASS (ACustomInventory, AInventory)
|
||||
public:
|
||||
|
||||
// This is used when an inventory item's use state sequence is executed.
|
||||
|
@ -189,7 +189,7 @@ public:
|
|||
// Ammo: Something a weapon needs to operate
|
||||
class AAmmo : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AAmmo, AInventory)
|
||||
DECLARE_CLASS (AAmmo, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
|
@ -203,7 +203,7 @@ public:
|
|||
// A weapon is just that.
|
||||
class AWeapon : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (AWeapon, AInventory)
|
||||
DECLARE_CLASS (AWeapon, AInventory)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
DWORD WeaponFlags;
|
||||
|
@ -295,7 +295,7 @@ enum
|
|||
// Health is some item that gives the player health when picked up.
|
||||
class AHealth : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHealth, AInventory)
|
||||
DECLARE_CLASS (AHealth, AInventory)
|
||||
|
||||
int PrevHealth;
|
||||
public:
|
||||
|
@ -306,7 +306,7 @@ public:
|
|||
// HealthPickup is some item that gives the player health when used.
|
||||
class AHealthPickup : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHealthPickup, AInventory)
|
||||
DECLARE_CLASS (AHealthPickup, AInventory)
|
||||
public:
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
virtual AInventory *CreateTossable ();
|
||||
|
@ -317,7 +317,7 @@ public:
|
|||
// Armor absorbs some damage for the player.
|
||||
class AArmor : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AArmor, AInventory)
|
||||
DECLARE_CLASS (AArmor, AInventory)
|
||||
};
|
||||
|
||||
// Basic armor absorbs a specific percent of the damage. You should
|
||||
|
@ -325,7 +325,7 @@ class AArmor : public AInventory
|
|||
// or BasicArmorBonus and those gives you BasicArmor when it activates.
|
||||
class ABasicArmor : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmor, AArmor)
|
||||
DECLARE_CLASS (ABasicArmor, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual void Tick ();
|
||||
|
@ -340,7 +340,7 @@ public:
|
|||
// BasicArmorPickup replaces the armor you have.
|
||||
class ABasicArmorPickup : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmorPickup, AArmor)
|
||||
DECLARE_CLASS (ABasicArmorPickup, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
@ -353,7 +353,7 @@ public:
|
|||
// BasicArmorBonus adds to the armor you have.
|
||||
class ABasicArmorBonus : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmorBonus, AArmor)
|
||||
DECLARE_CLASS (ABasicArmorBonus, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
@ -370,7 +370,7 @@ public:
|
|||
// type (the player himself) that work together as a single armor.
|
||||
class AHexenArmor : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHexenArmor, AArmor)
|
||||
DECLARE_CLASS (AHexenArmor, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
@ -388,7 +388,7 @@ protected:
|
|||
// PuzzleItems work in conjunction with the UsePuzzleItem special
|
||||
class APuzzleItem : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APuzzleItem, AInventory)
|
||||
DECLARE_CLASS (APuzzleItem, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
bool ShouldStay ();
|
||||
|
@ -401,7 +401,7 @@ public:
|
|||
// A MapRevealer reveals the whole map for the player who picks it up.
|
||||
class AMapRevealer : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMapRevealer, AInventory)
|
||||
DECLARE_CLASS (AMapRevealer, AInventory)
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
@ -410,7 +410,7 @@ public:
|
|||
// normal maximum ammo amounts.
|
||||
class ABackpackItem : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (ABackpackItem, AInventory)
|
||||
DECLARE_CLASS (ABackpackItem, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
bool HandlePickup (AInventory *item);
|
||||
|
|
|
@ -7,13 +7,7 @@
|
|||
#include "s_sound.h"
|
||||
#include "c_console.h"
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APuzzleItem, Any, -1, 0)
|
||||
PROP_Flags (MF_SPECIAL|MF_NOGRAVITY)
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_UseSound ("PuzzleSuccess")
|
||||
PROP_Inventory_PickupSound ("misc/i_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APuzzleItem)
|
||||
|
||||
void APuzzleItem::Serialize (FArchive &arc)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ static FRandom pr_randomspawn("RandomSpawn");
|
|||
|
||||
class ARandomSpawner : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ARandomSpawner, AActor)
|
||||
DECLARE_CLASS (ARandomSpawner, AActor)
|
||||
|
||||
void PostBeginPlay()
|
||||
{
|
||||
|
@ -84,6 +84,5 @@ class ARandomSpawner : public AActor
|
|||
}
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ARandomSpawner, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ARandomSpawner)
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ private:
|
|||
|
||||
class AMorphProjectile : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AMorphProjectile, AActor)
|
||||
DECLARE_CLASS (AMorphProjectile, AActor)
|
||||
public:
|
||||
int DoSpecialDamage (AActor *target, int damage);
|
||||
void Serialize (FArchive &arc);
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
class AMorphedMonster : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AMorphedMonster, AActor)
|
||||
DECLARE_CLASS (AMorphedMonster, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Tick ();
|
||||
|
|
|
@ -2,17 +2,11 @@
|
|||
#include "a_weaponpiece.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AWeaponHolder, Any, -1, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOSECTOR)
|
||||
PROP_Inventory_FlagsSet (IF_UNDROPPABLE)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AWeaponHolder)
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (AWeaponPiece)
|
||||
DECLARE_POINTER (FullWeapon)
|
||||
END_POINTERS
|
||||
BEGIN_STATELESS_DEFAULTS (AWeaponPiece, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
|
||||
|
||||
void AWeaponPiece::Serialize (FArchive &arc)
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
// [BL] Needs to be available for SBarInfo to check weaponpieces
|
||||
class AWeaponHolder : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR(AWeaponHolder, AInventory)
|
||||
DECLARE_CLASS(AWeaponHolder, AInventory)
|
||||
|
||||
public:
|
||||
int PieceMask;
|
||||
|
|
|
@ -17,21 +17,12 @@
|
|||
|
||||
#define BONUSADD 6
|
||||
|
||||
FState AWeapon::States[] =
|
||||
{
|
||||
S_NORMAL (SHTG, 'E', 0, A_Light0 , NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (AWeapon)
|
||||
DECLARE_POINTER (Ammo1)
|
||||
DECLARE_POINTER (Ammo2)
|
||||
DECLARE_POINTER (SisterWeapon)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_DEFAULTS (AWeapon, Any, -1, 0)
|
||||
PROP_Inventory_PickupSound ("misc/w_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: Serialize
|
||||
|
@ -584,13 +575,13 @@ FState *AWeapon::GetAltAtkState (bool hold)
|
|||
|
||||
class AWeaponGiver : public AWeapon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR(AWeaponGiver, AWeapon)
|
||||
DECLARE_CLASS(AWeaponGiver, AWeapon)
|
||||
|
||||
public:
|
||||
bool TryPickup(AActor *toucher);
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR(AWeaponGiver)
|
||||
IMPLEMENT_CLASS(AWeaponGiver)
|
||||
|
||||
bool AWeaponGiver::TryPickup(AActor *toucher)
|
||||
{
|
||||
|
|
16
src/info.cpp
16
src/info.cpp
|
@ -281,22 +281,6 @@ void FActorInfo::StaticInit ()
|
|||
LoadDecorations ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Called after the IWAD has been identified
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FActorInfo::StaticGameSet ()
|
||||
{
|
||||
// Run every AT_GAME_SET function
|
||||
TAutoSegIteratorNoArrow<void (*)(), &GRegHead, &GRegTail> setters;
|
||||
while (++setters != NULL)
|
||||
{
|
||||
((void (*)())setters) ();
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Called after Dehacked patches are applied
|
||||
|
|
|
@ -385,7 +385,6 @@ typedef TMap<FName, BYTE> PainChanceList;
|
|||
struct FActorInfo
|
||||
{
|
||||
static void StaticInit ();
|
||||
static void StaticGameSet ();
|
||||
static void StaticSetActorNums ();
|
||||
|
||||
void BuildDefaults ();
|
||||
|
|
|
@ -68,7 +68,6 @@ typedef void (*voidfunc_)();
|
|||
#pragma warning(disable: 4207) // nonstandard extension used : extended initializer form
|
||||
|
||||
#pragma data_seg(".areg$u") // ActorInfo initializer list
|
||||
#pragma data_seg(".greg$u") // AT_GAME_SET list
|
||||
#pragma data_seg()
|
||||
|
||||
#define DOOMEDNUMOF(actor) actor##ActorInfo.DoomEdNum
|
||||
|
@ -97,12 +96,6 @@ typedef void (*voidfunc_)();
|
|||
#define ADD_STRING_PROP(prop1,prop2,val) prop2 "\0" val "\0"
|
||||
#endif
|
||||
|
||||
// Define a function that gets called when the game is started.
|
||||
#define AT_GAME_SET(ns) \
|
||||
extern void ns##_gs(); \
|
||||
__declspec(allocate(".greg$u")) voidfunc_ ns##_gsr = ns##_gs; \
|
||||
void ns##_gs ()
|
||||
|
||||
#else
|
||||
|
||||
/***********************************************
|
||||
|
@ -137,21 +130,10 @@ extern void ApplyActorDefault (int defnum, int dataint);
|
|||
#define ADD_LONG_PROP(prop,val) ApplyActorDefault (prop, (val));
|
||||
#define ADD_STRING_PROP(prop1,prop2,val) ApplyActorDefault (prop1, (val));
|
||||
|
||||
#define AT_GAME_SET(ns) \
|
||||
extern void ns##_gs(); \
|
||||
voidfunc_ ns##_gsr __attribute__((section(GREG_SECTION))) = ns##_gs; \
|
||||
void ns##_gs ()
|
||||
|
||||
//typedef void (*speedfunc)(EGameSpeed);
|
||||
|
||||
#endif
|
||||
|
||||
// Common macros
|
||||
|
||||
#define SimpleSpeedSetter(T,normalSpeed,fastSpeed,speed) \
|
||||
{ GetDefault<T>()->Speed = (speed == SPEED_Fast) ? fastSpeed : normalSpeed; }
|
||||
|
||||
#define AT_GAME_SET_FRIEND(ns) friend void ns##_gs();
|
||||
|
||||
#define DECLARE_STATELESS_ACTOR(cls,parent) \
|
||||
DECLARE_CLASS(cls,parent) \
|
||||
|
|
|
@ -400,34 +400,7 @@ IMPLEMENT_POINTY_CLASS (APlayerPawn)
|
|||
DECLARE_POINTER(InvSel)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_STATELESS_DEFAULTS (APlayerPawn, Any, -1, 0)
|
||||
PROP_SpawnHealth (100)
|
||||
PROP_RadiusFixed (16)
|
||||
PROP_HeightFixed (56)
|
||||
PROP_Mass (100)
|
||||
PROP_PainChance (255)
|
||||
PROP_SpeedFixed (1)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_PICKUP|MF_NOTDMATCH|MF_FRIENDLY)
|
||||
PROP_Flags2 (MF2_SLIDE|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP|MF2_WINDTHRUST|MF2_TELESTOMP)
|
||||
PROP_Flags3 (MF3_NOBLOCKMONST)
|
||||
PROP_PlayerPawn_AttackZOffset (8)
|
||||
// [GRB]
|
||||
PROP_PlayerPawn_JumpZ (8*FRACUNIT)
|
||||
PROP_PlayerPawn_ViewHeight (41*FRACUNIT)
|
||||
PROP_PlayerPawn_ForwardMove1 (FRACUNIT)
|
||||
PROP_PlayerPawn_ForwardMove2 (FRACUNIT)
|
||||
PROP_PlayerPawn_SideMove1 (FRACUNIT)
|
||||
PROP_PlayerPawn_SideMove2 (FRACUNIT)
|
||||
PROP_PlayerPawn_ColorRange (0, 0)
|
||||
PROP_PlayerPawn_SoundClass ("player")
|
||||
PROP_PlayerPawn_Face ("None")
|
||||
PROP_PlayerPawn_MorphWeapon ("None")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APlayerChunk, Any, -1, 0)
|
||||
PROP_Flags (MF_DROPOFF)
|
||||
PROP_Flags2 (MF2_PASSMOBJ)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APlayerChunk)
|
||||
|
||||
void APlayerPawn::Serialize (FArchive &arc)
|
||||
{
|
||||
|
|
|
@ -890,7 +890,7 @@ void R_InitSprites ()
|
|||
const char *pclassface = basetype->Meta.GetMetaString (APMETA_Face);
|
||||
|
||||
strcpy (skins[i].name, "Base");
|
||||
if (strcmp(pclassface, "None") == 0)
|
||||
if (pclassface == NULL || strcmp(pclassface, "None") == 0)
|
||||
{
|
||||
skins[i].face[0] = 'S';
|
||||
skins[i].face[1] = 'T';
|
||||
|
|
|
@ -69,7 +69,7 @@ struct FExtraInfo
|
|||
|
||||
class AFakeInventory : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AFakeInventory, AInventory);
|
||||
DECLARE_CLASS (AFakeInventory, AInventory);
|
||||
public:
|
||||
bool Respawnable;
|
||||
|
||||
|
@ -96,9 +96,7 @@ public:
|
|||
// The special was already executed by TryPickup, so do nothing here
|
||||
}
|
||||
};
|
||||
IMPLEMENT_STATELESS_ACTOR (AFakeInventory, Any, -1, 0)
|
||||
PROP_Flags (MF_SPECIAL)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AFakeInventory)
|
||||
|
||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||
|
||||
|
|
|
@ -442,13 +442,6 @@ static FActorInfo *CreateNewActor(FScanner &sc, FActorInfo **parentc, Baggage *b
|
|||
}
|
||||
|
||||
info->DoomEdNum = DoomEdNum;
|
||||
|
||||
if (parent == RUNTIME_CLASS(AWeapon))
|
||||
{
|
||||
// preinitialize kickback to the default for the game
|
||||
((AWeapon*)(info->Class->Defaults))->Kickback=gameinfo.defKickback;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -551,15 +544,24 @@ void FinishThingdef()
|
|||
isRuntimeActor=true;
|
||||
}
|
||||
|
||||
// Friendlies never count as kills!
|
||||
if (GetDefaultByType(ti)->flags & MF_FRIENDLY)
|
||||
AActor *def = GetDefaultByType(ti);
|
||||
|
||||
if (!def)
|
||||
{
|
||||
GetDefaultByType(ti)->flags &=~MF_COUNTKILL;
|
||||
Printf("No ActorInfo defined for class '%s'\n", ti->TypeName.GetChars());
|
||||
errorcount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Friendlies never count as kills!
|
||||
if (def->flags & MF_FRIENDLY)
|
||||
{
|
||||
def->flags &=~MF_COUNTKILL;
|
||||
}
|
||||
|
||||
if (ti->IsDescendantOf(RUNTIME_CLASS(AInventory)))
|
||||
{
|
||||
AInventory * defaults=(AInventory *)ti->Defaults;
|
||||
AInventory * defaults=(AInventory *)def;
|
||||
fuglyname v;
|
||||
|
||||
v = defaults->PickupFlash;
|
||||
|
@ -580,7 +582,7 @@ void FinishThingdef()
|
|||
if (ti->IsDescendantOf(RUNTIME_CLASS(APowerupGiver)) && ti != RUNTIME_CLASS(APowerupGiver))
|
||||
{
|
||||
FString typestr;
|
||||
APowerupGiver * defaults=(APowerupGiver *)ti->Defaults;
|
||||
APowerupGiver * defaults=(APowerupGiver *)def;
|
||||
fuglyname v;
|
||||
|
||||
v = defaults->PowerupType;
|
||||
|
@ -615,7 +617,7 @@ void FinishThingdef()
|
|||
// the typeinfo properties of weapons have to be fixed here after all actors have been declared
|
||||
if (ti->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
AWeapon * defaults=(AWeapon *)ti->Defaults;
|
||||
AWeapon * defaults=(AWeapon *)def;
|
||||
fuglyname v;
|
||||
|
||||
v = defaults->AmmoType1;
|
||||
|
@ -714,7 +716,7 @@ void FinishThingdef()
|
|||
// same for the weapon type of weapon pieces.
|
||||
else if (ti->IsDescendantOf(RUNTIME_CLASS(AWeaponPiece)))
|
||||
{
|
||||
AWeaponPiece * defaults=(AWeaponPiece *)ti->Defaults;
|
||||
AWeaponPiece * defaults=(AWeaponPiece *)def;
|
||||
fuglyname v;
|
||||
|
||||
v = defaults->WeaponClass;
|
||||
|
|
|
@ -2079,6 +2079,14 @@ static void WeaponKickback (FScanner &sc, AWeapon *defaults, Baggage &bag)
|
|||
defaults->Kickback=sc.Number;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
static void WeaponDefKickback (FScanner &sc, AWeapon *defaults, Baggage &bag)
|
||||
{
|
||||
defaults->Kickback = gameinfo.defKickback;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
@ -2151,6 +2159,20 @@ static void PowerupColor (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
|
|||
int g;
|
||||
int b;
|
||||
int alpha;
|
||||
PalEntry * pBlendColor;
|
||||
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerup)))
|
||||
{
|
||||
pBlendColor = &((APowerup*)defaults)->BlendColor;
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerupGiver)))
|
||||
{
|
||||
pBlendColor = &((APowerupGiver*)defaults)->BlendColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.ScriptError("\"%s\" requires an actor of type \"Powerup\"\n", sc.String);
|
||||
}
|
||||
|
||||
if (sc.CheckNumber())
|
||||
{
|
||||
|
@ -2197,8 +2219,8 @@ static void PowerupColor (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
|
|||
sc.MustGetFloat();
|
||||
alpha=int(sc.Float*255);
|
||||
alpha=clamp<int>(alpha, 0, 255);
|
||||
if (alpha!=0) defaults->BlendColor = MAKEARGB(alpha, r, g, b);
|
||||
else defaults->BlendColor = 0;
|
||||
if (alpha!=0) *pBlendColor = MAKEARGB(alpha, r, g, b);
|
||||
else *pBlendColor = 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -2206,8 +2228,23 @@ static void PowerupColor (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
|
|||
//==========================================================================
|
||||
static void PowerupDuration (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
|
||||
{
|
||||
int *pEffectTics;
|
||||
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerup)))
|
||||
{
|
||||
pEffectTics = &((APowerup*)defaults)->EffectTics;
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerupGiver)))
|
||||
{
|
||||
pEffectTics = &((APowerupGiver*)defaults)->EffectTics;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.ScriptError("\"%s\" requires an actor of type \"Powerup\"\n", sc.String);
|
||||
}
|
||||
|
||||
sc.MustGetNumber();
|
||||
defaults->EffectTics = sc.Number;
|
||||
*pEffectTics = sc.Number>=0? sc.Number : -sc.Number*TICRATE;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -2748,8 +2785,8 @@ static const ActorProps props[] =
|
|||
{ "powermorph.morphstyle", (apf)PowerMorphMorphStyle, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powermorph.playerclass", (apf)PowerMorphPlayerClass, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powermorph.unmorphflash", (apf)PowerMorphUnMorphFlash, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powerup.color", (apf)PowerupColor, RUNTIME_CLASS(APowerupGiver) },
|
||||
{ "powerup.duration", (apf)PowerupDuration, RUNTIME_CLASS(APowerupGiver) },
|
||||
{ "powerup.color", (apf)PowerupColor, RUNTIME_CLASS(AInventory) },
|
||||
{ "powerup.duration", (apf)PowerupDuration, RUNTIME_CLASS(AInventory) },
|
||||
{ "powerup.mode", (apf)PowerupMode, RUNTIME_CLASS(APowerupGiver) },
|
||||
{ "powerup.type", (apf)PowerupType, RUNTIME_CLASS(APowerupGiver) },
|
||||
{ "projectile", ActorProjectile, RUNTIME_CLASS(AActor) },
|
||||
|
@ -2782,6 +2819,7 @@ static const ActorProps props[] =
|
|||
{ "weapon.ammouse", (apf)WeaponAmmoUse1, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.ammouse1", (apf)WeaponAmmoUse1, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.ammouse2", (apf)WeaponAmmoUse2, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.defaultkickback", (apf)WeaponDefKickback, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.kickback", (apf)WeaponKickback, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.readysound", (apf)WeaponReadySound, RUNTIME_CLASS(AWeapon) },
|
||||
{ "weapon.selectionorder", (apf)WeaponSelectionOrder, RUNTIME_CLASS(AWeapon) },
|
||||
|
|
|
@ -474,6 +474,7 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in
|
|||
to[i] = t;
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if (CPU.bSSE2)
|
||||
{
|
||||
if (count >= 4)
|
||||
|
@ -489,6 +490,7 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in
|
|||
to += not3count;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#ifdef X86_ASM
|
||||
else if (CPU.bMMX)
|
||||
{
|
||||
|
|
|
@ -345,7 +345,7 @@ void SetLanguageIDs ()
|
|||
|
||||
void I_Init (void)
|
||||
{
|
||||
CheckCPUID(&CPU);
|
||||
//CheckCPUID(&CPU);
|
||||
CalculateCPUSpeed ();
|
||||
|
||||
// Why does Intel right-justify this string?
|
||||
|
|
14
wadsrc/static/actors/hexen/baseweapons.txt
Normal file
14
wadsrc/static/actors/hexen/baseweapons.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
ACTOR FighterWeapon : Weapon native
|
||||
{
|
||||
Weapon.Kickback 150
|
||||
}
|
||||
|
||||
ACTOR ClericWeapon : Weapon native
|
||||
{
|
||||
Weapon.Kickback 150
|
||||
}
|
||||
|
||||
ACTOR MageWeapon : Weapon native
|
||||
{
|
||||
Weapon.Kickback 150
|
||||
}
|
|
@ -5,7 +5,7 @@ ACTOR ArtiBlastRadius : Inventory 10110 native
|
|||
SpawnID 74
|
||||
+FLOATBOB
|
||||
Inventory.DefMaxAmount
|
||||
Inventory.PickupFlash 1
|
||||
Inventory.PickupFlash "PickupFlash"
|
||||
+INVBAR +FANCYPICKUPSOUND
|
||||
Inventory.Icon "ARTIBLST"
|
||||
Inventory.PickupSound "misc/p_pkup"
|
||||
|
|
|
@ -8,7 +8,7 @@ ACTOR ArtiBoostArmor : Inventory 8041 native
|
|||
+COUNTITEM
|
||||
+FLOATBOB
|
||||
Inventory.DefMaxAmount
|
||||
Inventory.PickupFlash 1
|
||||
Inventory.PickupFlash "PickupFlash"
|
||||
+INVBAR +FANCYPICKUPSOUND
|
||||
Inventory.Icon "ARTIBRAC"
|
||||
Inventory.PickupSound "misc/p_pkup"
|
||||
|
|
|
@ -100,7 +100,7 @@ ACTOR ArtiPoisonBag : Inventory 8000 native
|
|||
SpawnID 72
|
||||
+FLOATBOB
|
||||
Inventory.DefMaxAmount
|
||||
Inventory.PickupFlash 1
|
||||
Inventory.PickupFlash "PickupFlash"
|
||||
+INVBAR +FANCYPICKUPSOUND
|
||||
Inventory.Icon "ARTIPSBG"
|
||||
Inventory.PickupSound "misc/p_pkup"
|
||||
|
|
154
wadsrc/static/actors/hexen/pig.txt
Normal file
154
wadsrc/static/actors/hexen/pig.txt
Normal file
|
@ -0,0 +1,154 @@
|
|||
|
||||
|
||||
// Snout puff ---------------------------------------------------------------
|
||||
|
||||
ACTOR SnoutPuff
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOGRAVITY
|
||||
Renderstyle Translucent
|
||||
Alpha 0.6
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FHFX STUVW 4
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Snout --------------------------------------------------------------------
|
||||
|
||||
ACTOR Snout : Weapon
|
||||
{
|
||||
Weapon.SelectionOrder 10000
|
||||
+WEAPON.DONTBOB
|
||||
+WEAPON.MELEEWEAPON
|
||||
Weapon.Kickback 150
|
||||
Weapon.YAdjust 10
|
||||
|
||||
action native A_SnoutAttack ();
|
||||
|
||||
States
|
||||
{
|
||||
Ready:
|
||||
WPIG A 1 A_WeaponReady
|
||||
Loop
|
||||
Deselect:
|
||||
WPIG A 1 A_Lower
|
||||
Loop
|
||||
Select:
|
||||
WPIG A 1 A_Raise
|
||||
Fire:
|
||||
WPIG A 4 A_SnoutAttack
|
||||
WPIG B 8 A_SnoutAttack
|
||||
Goto Ready
|
||||
Grunt:
|
||||
WPIG B 8
|
||||
Goto Ready
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Pig player ---------------------------------------------------------------
|
||||
|
||||
ACTOR PigPlayer : PlayerPawn native
|
||||
{
|
||||
Health 30
|
||||
ReactionTime 0
|
||||
PainChance 255
|
||||
Radius 16
|
||||
Height 24
|
||||
Speed 1
|
||||
+NOSKIN
|
||||
PainSound "PigPain"
|
||||
DeathSound "PigDeath"
|
||||
Player.JumpZ 6
|
||||
Player.Viewheight 28
|
||||
Player.ForwardMove 0.96, 0.98
|
||||
Player.SideMove 0.95833333, 0.975
|
||||
Player.SpawnClass "Pig"
|
||||
Player.SoundClass "Pig"
|
||||
Player.DisplayName "Pig"
|
||||
Player.MorphWeapon "Snout"
|
||||
-PICKUP
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
PIGY A -1
|
||||
Stop
|
||||
See:
|
||||
PIGY ABCD 3
|
||||
Loop
|
||||
Pain:
|
||||
PIGY D 4 A_PigPain
|
||||
Goto Spawn
|
||||
Melee:
|
||||
Missile:
|
||||
PIGY A 12
|
||||
Goto Spawn
|
||||
Death:
|
||||
PIGY E 4 A_Scream
|
||||
PIGY F 3 A_NoBlocking
|
||||
PIGY G 4
|
||||
PIGY H 3
|
||||
PIGY IJK 4
|
||||
PIGY L -1
|
||||
Stop
|
||||
Ice:
|
||||
PIGY M 5 A_FreezeDeath
|
||||
PIGY M 1 A_FreezeDeathChunks
|
||||
Wait
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Pig (non-player) ---------------------------------------------------------
|
||||
|
||||
ACTOR Pig : MorphedMonster
|
||||
{
|
||||
Health 25
|
||||
Painchance 128
|
||||
Speed 10
|
||||
Radius 12
|
||||
Height 22
|
||||
Mass 60
|
||||
Monster
|
||||
-COUNTKILL
|
||||
+WINDTHRUST
|
||||
+DONTMORPH
|
||||
SeeSound "PigActive1"
|
||||
PainSound "PigPain"
|
||||
DeathSound "PigDeath"
|
||||
ActiveSound "PigActive1"
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
PIGY B 10 A_Look
|
||||
Loop
|
||||
See:
|
||||
PIGY ABCD 3 A_Chase
|
||||
Loop
|
||||
Pain:
|
||||
PIGY D 4 A_PigPain
|
||||
Goto See
|
||||
Melee:
|
||||
PIGY A 5 A_FaceTarget
|
||||
PIGY A 10 A_CustomMeleeAttack(random[PigAttack](2,3), "PigAttack")
|
||||
Goto See
|
||||
Death:
|
||||
PIGY E 4 A_Scream
|
||||
PIGY F 3 A_NoBlocking
|
||||
PIGY G 4
|
||||
PIGY H 3
|
||||
PIGY IJK 4
|
||||
PIGY L -1
|
||||
Stop
|
||||
Ice:
|
||||
PIGY M 5 A_FreezeDeath
|
||||
PIGY M 1 A_FreezeDeathChunks
|
||||
Wait
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ ACTOR ArtiDarkServant : Inventory 86 native
|
|||
+FLOATBOB
|
||||
Inventory.RespawnTics 4230
|
||||
Inventory.DefMaxAmount
|
||||
Inventory.PickupFlash 1
|
||||
Inventory.PickupFlash "PickupFlash"
|
||||
+INVBAR +FANCYPICKUPSOUND
|
||||
Inventory.Icon "ARTISUMN"
|
||||
Inventory.PickupSound "misc/p_pkup"
|
||||
|
|
|
@ -187,8 +187,10 @@ class Actor extends Thinker
|
|||
action native A_GiveQuestItem(eval int itemno);
|
||||
action native A_RemoveForcefield();
|
||||
action native A_DropWeaponPieces(class<Actor> p1, class<Actor> p2, class<Actor> p3);
|
||||
action native A_PigPain ();
|
||||
}
|
||||
|
||||
|
||||
class Inventory extends Actor
|
||||
native
|
||||
{
|
||||
|
@ -229,3 +231,348 @@ class Inventory extends Actor
|
|||
action native A_ResetReloadCounter();
|
||||
}
|
||||
|
||||
/*
|
||||
ACTOR Inventory native
|
||||
{
|
||||
Inventory.Amount 1
|
||||
Inventory.MaxAmount 1
|
||||
Inventory.UseSound "misc/invuse"
|
||||
Inventory.PickupSound "misc/i_pkup"
|
||||
|
||||
action native A_JumpIfNoAmmo(state label);
|
||||
action native A_CustomPunch(eval int damage, optional eval bool norandom, optional evalnot bool useammo, optional class<Actor> pufftype, optional eval float range);
|
||||
action native A_FireBullets(eval float spread_xy, eval float spread_z, eval int numbullets, eval int damageperbullet, optional class<Actor> pufftype, optional evalnot bool useammo, optional eval float range);
|
||||
action native A_FireCustomMissile(class<Actor> missiletype, optional eval float angle, optional evalnot bool useammo, optional eval int spawnofs_xy, optional eval float spawnheight, optional eval bool aimatangle);
|
||||
action native A_RailAttack(eval int damage, optional eval int spawnofs_xy, optional evalnot int useammo, optional color color1, optional color color2, optional eval bool silent, optional eval float maxdiff, optional class<Actor> pufftype);
|
||||
action native A_Light(eval int extralight);
|
||||
action native A_Light0();
|
||||
action native A_Light1();
|
||||
action native A_Light2();
|
||||
action native A_LightInverse();
|
||||
action native A_WeaponReady();
|
||||
action native A_Lower();
|
||||
action native A_Raise();
|
||||
action native A_FirePistol();
|
||||
action native A_FireShotgun();
|
||||
action native A_FireShotgun2();
|
||||
action native A_OpenShotgun2();
|
||||
action native A_LoadShotgun2();
|
||||
action native A_CloseShotgun2();
|
||||
action native A_FireCGun();
|
||||
action native A_FireMissile();
|
||||
action native A_FirePlasma();
|
||||
action native A_FireRailgun();
|
||||
action native A_FireRailgunLeft();
|
||||
action native A_FireRailgunRight();
|
||||
action native A_RailWait();
|
||||
action native A_BFGsound();
|
||||
action native A_FireBFG();
|
||||
action native A_ReFire();
|
||||
action native A_ClearReFire();
|
||||
action native A_CheckReload();
|
||||
action native A_GunFlash();
|
||||
action native A_Saw(optional coerce sound fullsound, optional coerce sound hitsound, optional eval int damage, optional class<Actor> pufftype);
|
||||
action native A_CheckForReload(eval int counter, state label);
|
||||
action native A_ResetReloadCounter();
|
||||
action native A_RestoreSpecialPosition();
|
||||
action native A_RestoreSpecialDoomThing();
|
||||
action native A_RestoreSpecialThing1();
|
||||
action native A_RestoreSpecialThing2();
|
||||
|
||||
States
|
||||
{
|
||||
HideDoomish:
|
||||
TNT1 A 1050
|
||||
TNT1 A 0 A_RestoreSpecialPosition
|
||||
TNT1 A 1 A_RestoreSpecialDoomThing
|
||||
Stop
|
||||
HideSpecial:
|
||||
ACLO E 1400
|
||||
ACLO A 0 A_RestoreSpecialPosition
|
||||
ACLO A 4 A_RestoreSpecialThing1
|
||||
ACLO BABCBCDC 4
|
||||
ACLO D 4 A_RestoreSpecialThing2
|
||||
Stop
|
||||
Held:
|
||||
TNT1 A -1
|
||||
Stop
|
||||
HoldAndDestroy:
|
||||
TNT1 A 1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
Actor Ammo : Inventory native
|
||||
{
|
||||
+INVENTORY.KEEPDEPLETED
|
||||
Inventory.PickupSound "misc/ammo_pkup"
|
||||
}
|
||||
|
||||
Actor BackpackItem : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR Armor : Inventory native
|
||||
{
|
||||
Inventory.PickupSound "misc/armor_pkup"
|
||||
}
|
||||
|
||||
ACTOR BasicArmor : Armor native
|
||||
{
|
||||
+Inventory.KEEPDEPLETED
|
||||
}
|
||||
|
||||
ACTOR BasicArmorBonus : Armor native
|
||||
{
|
||||
+Inventory.AUTOACTIVATE
|
||||
+Inventory.ALWAYSPICKUP
|
||||
Inventory.MaxAmount 0
|
||||
Armor.SavePercent 0.333333
|
||||
|
||||
}
|
||||
|
||||
ACTOR BasicArmorPickup : Armor native
|
||||
{
|
||||
+Inventory.AUTOACTIVATE
|
||||
Inventory.MaxAmount 0
|
||||
}
|
||||
|
||||
ACTOR HexenArmor : Armor native
|
||||
{
|
||||
+Inventory.KEEPDEPLETED
|
||||
+Inventory.UNDROPPABLE
|
||||
}
|
||||
|
||||
ACTOR DehackedPickup : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR FakeInventory : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR CustomInventory : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
Actor Health : Inventory native
|
||||
{
|
||||
Inventory.Amount 1
|
||||
Inventory.MaxAmount 0
|
||||
Inventory.PickupSound "misc/health_pkup"
|
||||
}
|
||||
|
||||
Actor HealthPickup : Inventory native
|
||||
{
|
||||
Inventory.DefMaxAmount
|
||||
+INVENTORY.INVBAR
|
||||
}
|
||||
|
||||
Actor Key : Inventory native
|
||||
{
|
||||
+INVENTORY.INTERHUBSTRIP
|
||||
Inventory.PickupSound "misc/k_pkup"
|
||||
}
|
||||
|
||||
ACTOR PowerupGiver : Inventory native
|
||||
{
|
||||
Inventory.DefMaxAmount
|
||||
+INVENTORY.INVBAR
|
||||
+INVENTORY.FANCYPICKUPSOUND
|
||||
Inventory.PickupSound "misc/p_pkup"
|
||||
}
|
||||
|
||||
ACTOR Powerup : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR PowerInvulnerable : Powerup native
|
||||
{
|
||||
Powerup.Duration -30
|
||||
inventory.icon "SPSHLD0"
|
||||
}
|
||||
|
||||
ACTOR PowerStrength : Powerup native
|
||||
{
|
||||
Powerup.Duration 1
|
||||
Powerup.Color 255,0,0,0.5
|
||||
+INVENTORY.HUBPOWER
|
||||
}
|
||||
|
||||
ACTOR PowerInvisibility : Powerup native
|
||||
{
|
||||
Powerup.Duration -60
|
||||
}
|
||||
|
||||
ACTOR PowerGhost : PowerInvisibility native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR PowerShadow : PowerInvisibility native
|
||||
{
|
||||
Powerup.Duration -55
|
||||
+INVENTORY.HUBPOWER
|
||||
}
|
||||
|
||||
ACTOR PowerIronFeet : Powerup native
|
||||
{
|
||||
Powerup.Duration -60
|
||||
Powerup.Color 0, 255, 0, 0.125
|
||||
}
|
||||
|
||||
ACTOR PowerMask : PowerIronFeet native
|
||||
{
|
||||
Powerup.Duration -80
|
||||
Powerup.Color 0,0,0,0
|
||||
+INVENTORY.HUBPOWER
|
||||
Inventory.Icon "I_MASK"
|
||||
}
|
||||
|
||||
ACTOR PowerLightAmp : Powerup native
|
||||
{
|
||||
Powerup.Duration -120
|
||||
}
|
||||
|
||||
ACTOR PowerTorch : PowerLightAmp native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR PowerFlight : Powerup native
|
||||
{
|
||||
Powerup.Duration -60
|
||||
+INVENTORY.HUBPOWER
|
||||
}
|
||||
|
||||
ACTOR PowerWeaponLevel2 : Powerup native
|
||||
{
|
||||
Powerup.Duration -40
|
||||
Inventory.Icon "SPINBK0"
|
||||
}
|
||||
|
||||
ACTOR PowerSpeed: Powerup native
|
||||
{
|
||||
Powerup.Duration -45
|
||||
Speed 1.5
|
||||
Inventory.Icon "SPBOOT0"
|
||||
}
|
||||
|
||||
// Player Speed Trail (used by the Speed Powerup) ----------------------------
|
||||
|
||||
ACTOR PlayerSpeedTrail native
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOGRAVITY
|
||||
Alpha 0.6
|
||||
RenderStyle Translucent
|
||||
}
|
||||
|
||||
ACTOR PowerMinotaur : Powerup native
|
||||
{
|
||||
Powerup.Duration -25
|
||||
Inventory.Icon "SPMINO0"
|
||||
}
|
||||
|
||||
ACTOR PowerTargeter : Powerup native
|
||||
{
|
||||
Powerup.Duration -160
|
||||
+INVENTORY.HUBPOWER
|
||||
States
|
||||
{
|
||||
Targeter:
|
||||
TRGT A -1
|
||||
Stop
|
||||
TRGT B -1
|
||||
Stop
|
||||
TRGT C -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
ACTOR PowerFrightener : Powerup native
|
||||
{
|
||||
Powerup.Duration -60
|
||||
}
|
||||
|
||||
ACTOR PowerScanner : Powerup native
|
||||
{
|
||||
Powerup.Duration -80
|
||||
+INVENTORY.HUBPOWER
|
||||
}
|
||||
|
||||
ACTOR PowerTimeFreezer : Powerup native
|
||||
{
|
||||
Powerup.Duration -12
|
||||
}
|
||||
|
||||
ACTOR PowerDamage : Powerup native
|
||||
{
|
||||
Powerup.Duration -25
|
||||
}
|
||||
|
||||
ACTOR PowerProtection : Powerup native
|
||||
{
|
||||
Powerup.Duration -25
|
||||
}
|
||||
|
||||
ACTOR PowerDrain : Powerup native
|
||||
{
|
||||
Powerup.Duration -60
|
||||
}
|
||||
|
||||
ACTOR PowerRegeneration : Powerup native
|
||||
{
|
||||
Powerup.Duration -120
|
||||
}
|
||||
|
||||
ACTOR PowerHighJump : Powerup native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR PowerMorph : Powerup native
|
||||
{
|
||||
Powerup.Duration -40
|
||||
}
|
||||
|
||||
ACTOR MapRevealer : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
ACTOR PuzzleItem : Inventory native
|
||||
{
|
||||
+NOGRAVITY
|
||||
+INVENTORY.INVBAR
|
||||
Inventory.DefMaxAmount
|
||||
Inventory.UseSound "PuzzleSuccess"
|
||||
Inventory.PickupSound "misc/i_pkup"
|
||||
}
|
||||
|
||||
Actor Weapon : Inventory native
|
||||
{
|
||||
|
||||
Inventory.PickupSound "misc/w_pkup"
|
||||
Weapon.DefaultKickback
|
||||
States
|
||||
{
|
||||
LightDone:
|
||||
SHTG E 0 A_Light0
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
ACTOR WeaponGiver : Weapon native
|
||||
{
|
||||
}
|
||||
|
||||
Actor WeaponHolder : Inventory native
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOSECTOR
|
||||
+INVENTORY.UNDROPPABLE
|
||||
}
|
||||
|
||||
Actor WeaponPiece : Inventory native
|
||||
{
|
||||
}
|
||||
|
||||
|
|
15
wadsrc/static/actors/shared/morph.txt
Normal file
15
wadsrc/static/actors/shared/morph.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
ACTOR MorphProjectile native
|
||||
{
|
||||
Damage 1
|
||||
Projectile
|
||||
-ACTIVATEIMPACT
|
||||
-ACTIVATEPCROSS
|
||||
}
|
||||
|
||||
ACTOR MorphedMonster native
|
||||
{
|
||||
Monster
|
||||
-COUNTKILL
|
||||
+FLOORCLIP
|
||||
}
|
||||
|
|
@ -16,3 +16,16 @@ ACTOR ItemFog
|
|||
}
|
||||
}
|
||||
|
||||
// Pickup flash -------------------------------------------------------------
|
||||
|
||||
ACTOR PickupFlash
|
||||
{
|
||||
+NOGRAVITY
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
ACLO DCDCBCBABA 3
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
43
wadsrc/static/actors/shared/player.txt
Normal file
43
wadsrc/static/actors/shared/player.txt
Normal file
|
@ -0,0 +1,43 @@
|
|||
Actor PlayerPawn : Actor native
|
||||
{
|
||||
Health 100
|
||||
Radius 16
|
||||
Height 56
|
||||
Mass 100
|
||||
Painchance 255
|
||||
Speed 1
|
||||
+SOLID
|
||||
+SHOOTABLE
|
||||
+DROPOFF
|
||||
+PICKUP
|
||||
+NOTDMATCH
|
||||
+FRIENDLY
|
||||
+SLIDESONWALLS
|
||||
+CANPASS
|
||||
+CANPUSHWALLS
|
||||
+FLOORCLIP
|
||||
+WINDTHRUST
|
||||
+TELESTOMP
|
||||
+NOBLOCKMONST
|
||||
Player.AttackZOffset 8
|
||||
Player.JumpZ 8
|
||||
Player.ViewHeight 41
|
||||
Player.ForwardMove 1,1
|
||||
Player.SideMove 1,1
|
||||
Player.ColorRange 0,0
|
||||
Player.SoundClass "player"
|
||||
}
|
||||
|
||||
Actor PlayerChunk : PlayerPawn native
|
||||
{
|
||||
-SOLID
|
||||
-SHOOTABLE
|
||||
-PICKUP
|
||||
-NOTDMATCH
|
||||
-FRIENDLY
|
||||
-SLIDESONWALLS
|
||||
-CANPUSHWALLS
|
||||
-FLOORCLIP
|
||||
-WINDTHRUST
|
||||
-TELESTOMP
|
||||
}
|
|
@ -130,3 +130,13 @@ ACTOR SwitchingDecoration : SwitchableDecoration native
|
|||
{
|
||||
}
|
||||
|
||||
// Random spawner -----------------------------------------------------------
|
||||
|
||||
ACTOR RandomSpawner native
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOSECTOR
|
||||
+NOGRAVITY
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "actors/nativeclasses.txt"
|
||||
#include "actors/constants.txt"
|
||||
|
||||
#include "actors/shared/player.txt"
|
||||
#include "actors/shared/morph.txt"
|
||||
#include "actors/shared/botstuff.txt"
|
||||
#include "actors/shared/sharedmisc.txt"
|
||||
#include "actors/shared/blood.txt"
|
||||
|
@ -81,10 +83,12 @@
|
|||
#include "actors/heretic/dsparil.txt"
|
||||
#include "actors/heretic/chicken.txt"
|
||||
|
||||
#include "actors/hexen/baseweapons.txt"
|
||||
#include "actors/hexen/korax.txt"
|
||||
#include "actors/hexen/fighterplayer.txt"
|
||||
#include "actors/hexen/clericplayer.txt"
|
||||
#include "actors/hexen/mageplayer.txt"
|
||||
#include "actors/hexen/pig.txt"
|
||||
#include "actors/hexen/flame.txt"
|
||||
#include "actors/hexen/hexenarmor.txt"
|
||||
#include "actors/hexen/hexendecorations.txt"
|
||||
|
|
Loading…
Reference in a new issue