diff --git a/src/codepointers.h b/src/codepointers.h index 1a2a89e7f8..939cf05c96 100644 --- a/src/codepointers.h +++ b/src/codepointers.h @@ -205,7 +205,7 @@ ACTOR(MinotaurRoam) ACTOR(MinotaurChase) ACTOR(MinotaurDeath) - +// Hexen stuff ACTOR(BatSpawnInit) ACTOR(BatSpawn) ACTOR(BatMove) @@ -255,6 +255,18 @@ ACTOR(FiredSplotch) ACTOR(SmBounce) ACTOR(FogSpawn) ACTOR(FogMove) +WEAPON(FPunchAttack) +WEAPON(FAxeCheckUp) +WEAPON(FAxeCheckReady) +WEAPON(FAxeCheckAtk) +WEAPON(FAxeAttack) +WEAPON(FAxeCheckUpG) +WEAPON(FAxeCheckReadyG) +WEAPON(FHammerAttack) +WEAPON(FHammerThrow) +ACTOR(DropQuietusPieces) +WEAPON(FSwordAttack) +WEAPON(FSwordFlames) ACTOR(Summon) ACTOR(PoisonBagInit) ACTOR(CheckThrowBomb) diff --git a/src/g_hexen/a_clericmace.cpp b/src/g_hexen/a_clericmace.cpp index 8481867837..2db97ca212 100644 --- a/src/g_hexen/a_clericmace.cpp +++ b/src/g_hexen/a_clericmace.cpp @@ -33,7 +33,7 @@ void A_CMaceAttack (AActor *actor) slope = P_AimLineAttack (player->mo, angle, 2*MELEERANGE, &linetarget); if (linetarget) { - P_LineAttack (player->mo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff), true); + P_LineAttack (player->mo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true); AdjustPlayerAngle (player->mo, linetarget); // player->mo->angle = R_PointToAngle2(player->mo->x, // player->mo->y, linetarget->x, linetarget->y); @@ -43,7 +43,7 @@ void A_CMaceAttack (AActor *actor) slope = P_AimLineAttack (player->mo, angle, 2*MELEERANGE, &linetarget); if (linetarget) { - P_LineAttack (player->mo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff), true); + P_LineAttack (player->mo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true); AdjustPlayerAngle (player->mo, linetarget); // player->mo->angle = R_PointToAngle2(player->mo->x, // player->mo->y, linetarget->x, linetarget->y); @@ -55,7 +55,7 @@ void A_CMaceAttack (AActor *actor) angle = player->mo->angle; slope = P_AimLineAttack (player->mo, angle, MELEERANGE, &linetarget); - P_LineAttack (player->mo, angle, MELEERANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff)); + P_LineAttack (player->mo, angle, MELEERANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff")); macedone: return; } diff --git a/src/g_hexen/a_fighteraxe.cpp b/src/g_hexen/a_fighteraxe.cpp index 26ab1a0132..5512c53d07 100644 --- a/src/g_hexen/a_fighteraxe.cpp +++ b/src/g_hexen/a_fighteraxe.cpp @@ -31,7 +31,7 @@ EXTERN_CVAR (Int, cl_bloodtype) class AFWeapAxe : public AFighterWeapon { - DECLARE_ACTOR (AFWeapAxe, AFighterWeapon) + DECLARE_CLASS (AFWeapAxe, AFighterWeapon) public: FState *GetUpState (); FState *GetDownState (); @@ -39,157 +39,28 @@ public: FState *GetAtkState (bool hold); }; -FState AFWeapAxe::States[] = -{ -#define S_AXE 0 - S_NORMAL (WFAX, 'A', -1, NULL , NULL), - -#define S_FAXEREADY (S_AXE+1) - S_NORMAL (FAXE, 'A', 1, A_FAxeCheckReady , &States[S_FAXEREADY]), - -#define S_FAXEDOWN (S_FAXEREADY+1) - S_NORMAL (FAXE, 'A', 1, A_Lower , &States[S_FAXEDOWN]), - -#define S_FAXEUP (S_FAXEDOWN+1) - S_NORMAL (FAXE, 'A', 1, A_FAxeCheckUp , &States[S_FAXEUP]), - -#define S_FAXEATK (S_FAXEUP+1) - S_NORMAL2 (FAXE, 'B', 4, A_FAxeCheckAtk , &States[S_FAXEATK+1], 15, 32), - S_NORMAL2 (FAXE, 'C', 3, NULL , &States[S_FAXEATK+2], 15, 32), - S_NORMAL2 (FAXE, 'D', 2, NULL , &States[S_FAXEATK+3], 15, 32), - S_NORMAL2 (FAXE, 'D', 1, A_FAxeAttack , &States[S_FAXEATK+4], -5, 70), - S_NORMAL2 (FAXE, 'D', 2, NULL , &States[S_FAXEATK+5], -25, 90), - S_NORMAL2 (FAXE, 'E', 1, NULL , &States[S_FAXEATK+6], 15, 32), - S_NORMAL2 (FAXE, 'E', 2, NULL , &States[S_FAXEATK+7], 10, 54), - S_NORMAL2 (FAXE, 'E', 7, NULL , &States[S_FAXEATK+8], 10, 150), - S_NORMAL2 (FAXE, 'A', 1, A_ReFire , &States[S_FAXEATK+9], 0, 60), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK+10], 0, 52), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK+11], 0, 44), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK+12], 0, 36), - S_NORMAL (FAXE, 'A', 1, NULL , &States[S_FAXEREADY]), - -#define S_FAXEREADY_G (S_FAXEATK+13) - S_NORMAL (FAXE, 'L', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G+1]), - S_NORMAL (FAXE, 'L', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G+2]), - S_NORMAL (FAXE, 'L', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G+3]), - S_NORMAL (FAXE, 'M', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G+4]), - S_NORMAL (FAXE, 'M', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G+5]), - S_NORMAL (FAXE, 'M', 1, A_FAxeCheckReadyG , &States[S_FAXEREADY_G]), - -#define S_FAXEDOWN_G (S_FAXEREADY_G+6) - S_NORMAL (FAXE, 'L', 1, A_Lower , &States[S_FAXEDOWN_G]), - -#define S_FAXEUP_G (S_FAXEDOWN_G+1) - S_NORMAL (FAXE, 'L', 1, A_FAxeCheckUpG , &States[S_FAXEUP_G]), - -#define S_FAXEATK_G (S_FAXEUP_G+1) - S_NORMAL2 (FAXE, 'N', 4, NULL , &States[S_FAXEATK_G+1], 15, 32), - S_NORMAL2 (FAXE, 'O', 3, NULL , &States[S_FAXEATK_G+2], 15, 32), - S_NORMAL2 (FAXE, 'P', 2, NULL , &States[S_FAXEATK_G+3], 15, 32), - S_NORMAL2 (FAXE, 'P', 1, A_FAxeAttack , &States[S_FAXEATK_G+4], -5, 70), - S_NORMAL2 (FAXE, 'P', 2, NULL , &States[S_FAXEATK_G+5], -25, 90), - S_NORMAL2 (FAXE, 'Q', 1, NULL , &States[S_FAXEATK_G+6], 15, 32), - S_NORMAL2 (FAXE, 'Q', 2, NULL , &States[S_FAXEATK_G+7], 10, 54), - S_NORMAL2 (FAXE, 'Q', 7, NULL , &States[S_FAXEATK_G+8], 10, 150), - S_NORMAL2 (FAXE, 'A', 1, A_ReFire , &States[S_FAXEATK_G+9], 0, 60), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK_G+10], 0, 52), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK_G+11], 0, 44), - S_NORMAL2 (FAXE, 'A', 1, NULL , &States[S_FAXEATK_G+12], 0, 36), - S_NORMAL (FAXE, 'A', 1, NULL , &States[S_FAXEREADY_G]), -}; - -IMPLEMENT_ACTOR (AFWeapAxe, Hexen, 8010, 27) - PROP_Flags (MF_SPECIAL) - PROP_SpawnState (S_AXE) - - PROP_Weapon_SelectionOrder (1500) - PROP_Weapon_Flags (WIF_AXEBLOOD|WIF_AMMO_OPTIONAL|WIF_BOT_MELEE) - PROP_Weapon_AmmoUse1 (2) - PROP_Weapon_AmmoGive1 (25) - PROP_Weapon_UpState (S_FAXEUP) - PROP_Weapon_DownState (S_FAXEDOWN) - PROP_Weapon_ReadyState (S_FAXEREADY) - PROP_Weapon_AtkState (S_FAXEATK) - PROP_Weapon_Kickback (150) - PROP_Weapon_YAdjust (0-12) - PROP_Weapon_AmmoType1 ("Mana1") - PROP_Inventory_PickupMessage("$TXT_WEAPON_F2") -END_DEFAULTS +IMPLEMENT_CLASS (AFWeapAxe) FState *AFWeapAxe::GetUpState () { - return Ammo1->Amount ? &States[S_FAXEUP_G] : Super::GetUpState(); + return Ammo1->Amount ? FindState ("SelectGlow") : Super::GetUpState(); } FState *AFWeapAxe::GetDownState () { - return Ammo1->Amount ? &States[S_FAXEDOWN_G] : Super::GetDownState(); + return Ammo1->Amount ? FindState ("DeselectGlow") : Super::GetDownState(); } FState *AFWeapAxe::GetReadyState () { - return Ammo1->Amount ? &States[S_FAXEREADY_G] : Super::GetReadyState(); + return Ammo1->Amount ? FindState ("ReadyGlow") : Super::GetReadyState(); } FState *AFWeapAxe::GetAtkState (bool hold) { - return Ammo1->Amount ? &States[S_FAXEATK_G] : Super::GetAtkState(hold); + return Ammo1->Amount ? FindState ("FireGlow") : Super::GetAtkState(hold); } -// Axe Puff ----------------------------------------------------------------- - -class AAxePuff : public AActor -{ - DECLARE_ACTOR (AAxePuff, AActor) -}; - -FState AAxePuff::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 (AAxePuff, Hexen, -1, 0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags3 (MF3_PUFFONACTORS) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_SHADOW) - - PROP_SpawnState (0) - - PROP_SeeSound ("FighterAxeHitThing") - PROP_AttackSound ("FighterHammerHitWall") - PROP_ActiveSound ("FighterHammerMiss") -END_DEFAULTS - -// Glowing Axe Puff --------------------------------------------------------- - -class AAxePuffGlow : public AAxePuff -{ - DECLARE_ACTOR (AAxePuffGlow, AAxePuff) -}; - -FState AAxePuffGlow::States[] = -{ - S_BRIGHT (FAXE, 'R', 4, NULL , &States[1]), - S_BRIGHT (FAXE, 'S', 4, NULL , &States[2]), - S_BRIGHT (FAXE, 'T', 4, NULL , &States[3]), - S_BRIGHT (FAXE, 'U', 4, NULL , &States[4]), - S_BRIGHT (FAXE, 'V', 4, NULL , &States[5]), - S_BRIGHT (FAXE, 'W', 4, NULL , &States[6]), - S_BRIGHT (FAXE, 'X', 4, NULL , NULL), -}; - -IMPLEMENT_ACTOR (AAxePuffGlow, Hexen, -1, 0) - PROP_Flags3 (MF3_PUFFONACTORS) - PROP_RenderStyle (STYLE_Add) - PROP_Alpha (OPAQUE) - PROP_SpawnState (0) -END_DEFAULTS - //============================================================================ // // A_FAxeCheckReady @@ -206,7 +77,7 @@ void A_FAxeCheckReady (AActor *actor) } if (player->ReadyWeapon->Ammo1->Amount) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEREADY_G]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("ReadyGlow")); } else { @@ -230,7 +101,7 @@ void A_FAxeCheckReadyG (AActor *actor) } if (player->ReadyWeapon->Ammo1->Amount <= 0) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEREADY]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Ready")); } else { @@ -254,7 +125,7 @@ void A_FAxeCheckUp (AActor *actor) } if (player->ReadyWeapon->Ammo1->Amount) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEUP_G]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("ReadyGlow")); } else { @@ -278,7 +149,7 @@ void A_FAxeCheckUpG (AActor *actor) } if (player->ReadyWeapon->Ammo1->Amount <= 0) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEUP]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Select")); } else { @@ -302,7 +173,7 @@ void A_FAxeCheckAtk (AActor *actor) } if (player->ReadyWeapon->Ammo1->Amount) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEATK_G]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("FireGlow")); } } @@ -339,12 +210,12 @@ void A_FAxeAttack (AActor *actor) { damage <<= 1; power = 6*FRACUNIT; - pufftype = RUNTIME_CLASS(AAxePuffGlow); + pufftype = PClass::FindClass ("AxePuffGlow"); useMana = 1; } else { - pufftype = RUNTIME_CLASS(AAxePuff); + pufftype = PClass::FindClass ("AxePuff"); useMana = 0; } for (i = 0; i < 16; i++) @@ -395,7 +266,7 @@ axedone: (!(weapon->WeaponFlags & WIF_PRIMARY_USES_BOTH) || weapon->Ammo2 == NULL || weapon->Ammo2->Amount == 0)) { - P_SetPsprite (player, ps_weapon, &AFWeapAxe::States[S_FAXEATK+5]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Fire") + 5); } } } diff --git a/src/g_hexen/a_fighterhammer.cpp b/src/g_hexen/a_fighterhammer.cpp index fc3bce68a8..367e204c0c 100644 --- a/src/g_hexen/a_fighterhammer.cpp +++ b/src/g_hexen/a_fighterhammer.cpp @@ -17,154 +17,6 @@ static FRandom pr_atk ("FHammerAtk"); extern void AdjustPlayerAngle (AActor *pmo, AActor *linetarget); -void A_FHammerAttack (AActor *actor); -void A_FHammerThrow (AActor *actor); -void A_HammerSound (AActor *); -void A_BeAdditive (AActor *); - -// The Fighter's Hammer ----------------------------------------------------- - -class AFWeapHammer : public AFighterWeapon -{ - DECLARE_ACTOR (AFWeapHammer, AFighterWeapon) -}; - -FState AFWeapHammer::States[] = -{ -#define S_HAMM 0 - S_NORMAL (WFHM, 'A', -1, NULL , NULL), - -#define S_FHAMMERREADY (S_HAMM+1) - S_NORMAL (FHMR, 'A', 1, A_WeaponReady , &States[S_FHAMMERREADY]), - -#define S_FHAMMERDOWN (S_FHAMMERREADY+1) - S_NORMAL (FHMR, 'A', 1, A_Lower , &States[S_FHAMMERDOWN]), - -#define S_FHAMMERUP (S_FHAMMERDOWN+1) - S_NORMAL (FHMR, 'A', 1, A_Raise , &States[S_FHAMMERUP]), - -#define S_FHAMMERATK (S_FHAMMERUP+1) - S_NORMAL2 (FHMR, 'B', 6, NULL , &States[S_FHAMMERATK+1], 5, 0), - S_NORMAL2 (FHMR, 'C', 3, A_FHammerAttack , &States[S_FHAMMERATK+2], 5, 0), - S_NORMAL2 (FHMR, 'D', 3, NULL , &States[S_FHAMMERATK+3], 5, 0), - S_NORMAL2 (FHMR, 'E', 2, NULL , &States[S_FHAMMERATK+4], 5, 0), - S_NORMAL2 (FHMR, 'E', 10, A_FHammerThrow , &States[S_FHAMMERATK+5], 5, 150), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+6], 0, 60), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+7], 0, 55), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+8], 0, 50), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+9], 0, 45), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+10], 0, 40), - S_NORMAL2 (FHMR, 'A', 1, NULL , &States[S_FHAMMERATK+11], 0, 35), - S_NORMAL (FHMR, 'A', 1, NULL , &States[S_FHAMMERREADY]), -}; - -IMPLEMENT_ACTOR (AFWeapHammer, Hexen, 123, 28) - PROP_Flags (MF_SPECIAL) - PROP_Flags5 (MF5_BLOODSPLATTER) - PROP_SpawnState (S_HAMM) - - PROP_Weapon_SelectionOrder (900) - PROP_Weapon_Flags (WIF_AMMO_OPTIONAL|WIF_BOT_MELEE) - PROP_Weapon_AmmoUse1 (3) - PROP_Weapon_AmmoGive1 (25) - PROP_Weapon_UpState (S_FHAMMERUP) - PROP_Weapon_DownState (S_FHAMMERDOWN) - PROP_Weapon_ReadyState (S_FHAMMERREADY) - PROP_Weapon_AtkState (S_FHAMMERATK) - PROP_Weapon_Kickback (150) - PROP_Weapon_YAdjust (0-10) - PROP_Weapon_MoveCombatDist (22000000) - PROP_Weapon_AmmoType1 ("Mana2") - PROP_Weapon_ProjectileType ("HammerMissile") - PROP_Inventory_PickupMessage("$TXT_WEAPON_F3") -END_DEFAULTS - -// Hammer Missile ----------------------------------------------------------- - -class AHammerMissile : public AActor -{ - DECLARE_ACTOR (AHammerMissile, AActor) -public: - void GetExplodeParms (int &damage, int &dist, bool &hurtSource); -}; - -FState AHammerMissile::States[] = -{ -#define S_HAMMER_MISSILE_1 0 - S_BRIGHT (FHFX, 'A', 2, NULL , &States[S_HAMMER_MISSILE_1+1]), - S_BRIGHT (FHFX, 'B', 2, A_HammerSound , &States[S_HAMMER_MISSILE_1+2]), - S_BRIGHT (FHFX, 'C', 2, NULL , &States[S_HAMMER_MISSILE_1+3]), - S_BRIGHT (FHFX, 'D', 2, NULL , &States[S_HAMMER_MISSILE_1+4]), - S_BRIGHT (FHFX, 'E', 2, NULL , &States[S_HAMMER_MISSILE_1+5]), - S_BRIGHT (FHFX, 'F', 2, NULL , &States[S_HAMMER_MISSILE_1+6]), - S_BRIGHT (FHFX, 'G', 2, NULL , &States[S_HAMMER_MISSILE_1+7]), - S_BRIGHT (FHFX, 'H', 2, NULL , &States[S_HAMMER_MISSILE_1]), - -#define S_HAMMER_MISSILE_X1 (S_HAMMER_MISSILE_1+8) - S_BRIGHT (FHFX, 'I', 3, A_BeAdditive , &States[S_HAMMER_MISSILE_X1+1]), - S_BRIGHT (FHFX, 'J', 3, NULL , &States[S_HAMMER_MISSILE_X1+2]), - S_BRIGHT (FHFX, 'K', 3, A_Explode , &States[S_HAMMER_MISSILE_X1+3]), - S_BRIGHT (FHFX, 'L', 3, NULL , &States[S_HAMMER_MISSILE_X1+4]), - S_BRIGHT (FHFX, 'M', 3, NULL , &States[S_HAMMER_MISSILE_X1+5]), - S_NORMAL (FHFX, 'N', 3, NULL , &States[S_HAMMER_MISSILE_X1+6]), - S_BRIGHT (FHFX, 'O', 3, NULL , &States[S_HAMMER_MISSILE_X1+7]), - S_BRIGHT (FHFX, 'P', 3, NULL , &States[S_HAMMER_MISSILE_X1+8]), - S_BRIGHT (FHFX, 'Q', 3, NULL , &States[S_HAMMER_MISSILE_X1+9]), - S_BRIGHT (FHFX, 'R', 3, NULL , NULL), -}; - -IMPLEMENT_ACTOR (AHammerMissile, Hexen, -1, 0) - PROP_SpeedFixed (25) - PROP_RadiusFixed (14) - PROP_HeightFixed (20) - PROP_Damage (10) - PROP_DamageType (NAME_Fire) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_IMPACT|MF2_PCROSS) - - PROP_SpawnState (S_HAMMER_MISSILE_1) - PROP_DeathState (S_HAMMER_MISSILE_X1) - - PROP_DeathSound ("FighterHammerExplode") -END_DEFAULTS - -void AHammerMissile::GetExplodeParms (int &damage, int &dist, bool &hurtSource) -{ - damage = 128; - dist; - hurtSource = false; -} - -// Hammer Puff (also used by fist) ------------------------------------------ - -FState AHammerPuff::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 (AHammerPuff, Hexen, -1, 0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags3 (MF3_PUFFONACTORS) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_SHADOW) - - PROP_SpawnState (0) - - PROP_SeeSound ("FighterHammerHitThing") - PROP_AttackSound ("FighterHammerHitWall") - PROP_ActiveSound ("FighterHammerMiss") -END_DEFAULTS - -void AHammerPuff::BeginPlay () -{ - Super::BeginPlay (); - momz = FRACUNIT*8/10; -} - //============================================================================ // // A_FHammerAttack @@ -195,7 +47,7 @@ void A_FHammerAttack (AActor *actor) slope = P_AimLineAttack (pmo, angle, HAMMER_RANGE, &linetarget); if (linetarget) { - P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff), true); + P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true); AdjustPlayerAngle(pmo, linetarget); if (linetarget->flags3&MF3_ISMONSTER || linetarget->player) { @@ -208,7 +60,7 @@ void A_FHammerAttack (AActor *actor) slope = P_AimLineAttack(pmo, angle, HAMMER_RANGE, &linetarget); if(linetarget) { - P_LineAttack(pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff), true); + P_LineAttack(pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true); AdjustPlayerAngle(pmo, linetarget); if (linetarget->flags3&MF3_ISMONSTER || linetarget->player) { @@ -221,7 +73,7 @@ void A_FHammerAttack (AActor *actor) // didn't find any targets in meleerange, so set to throw out a hammer angle = pmo->angle; slope = P_AimLineAttack (pmo, angle, HAMMER_RANGE, &linetarget); - if (P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, RUNTIME_CLASS(AHammerPuff), true) != NULL) + if (P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true) != NULL) { pmo->special1 = false; } @@ -266,20 +118,9 @@ void A_FHammerThrow (AActor *actor) if (!weapon->DepleteAmmo (weapon->bAltFire, false)) return; } - mo = P_SpawnPlayerMissile (player->mo, RUNTIME_CLASS(AHammerMissile)); + mo = P_SpawnPlayerMissile (player->mo, PClass::FindClass ("HammerMissile")); if (mo) { mo->special1 = 0; } } - -//============================================================================ -// -// A_HammerSound -// -//============================================================================ - -void A_HammerSound (AActor *actor) -{ - S_Sound (actor, CHAN_BODY, "FighterHammerContinuous", 1, ATTN_NORM); -} diff --git a/src/g_hexen/a_fighterplayer.cpp b/src/g_hexen/a_fighterplayer.cpp index b9334985e2..897c5fca64 100644 --- a/src/g_hexen/a_fighterplayer.cpp +++ b/src/g_hexen/a_fighterplayer.cpp @@ -133,93 +133,6 @@ void AdjustPlayerAngle (AActor *pmo, AActor *linetarget) } } -// Fist (first weapon) ------------------------------------------------------ - -void A_FPunchAttack (AActor *actor); - -class AFWeapFist : public AFighterWeapon -{ - DECLARE_ACTOR (AFWeapFist, AFighterWeapon) -}; - -FState AFWeapFist::States[] = -{ -#define S_PUNCHREADY 0 - S_NORMAL (FPCH, 'A', 1, A_WeaponReady , &States[S_PUNCHREADY]), - -#define S_PUNCHDOWN (S_PUNCHREADY+1) - S_NORMAL (FPCH, 'A', 1, A_Lower , &States[S_PUNCHDOWN]), - -#define S_PUNCHUP (S_PUNCHDOWN+1) - S_NORMAL (FPCH, 'A', 1, A_Raise , &States[S_PUNCHUP]), - -#define S_PUNCHATK1 (S_PUNCHUP+1) - S_NORMAL2(FPCH, 'B', 5, NULL , &States[S_PUNCHATK1+1], 5, 40), - S_NORMAL2(FPCH, 'C', 4, NULL , &States[S_PUNCHATK1+2], 5, 40), - S_NORMAL2(FPCH, 'D', 4, A_FPunchAttack , &States[S_PUNCHATK1+3], 5, 40), - S_NORMAL2(FPCH, 'C', 4, NULL , &States[S_PUNCHATK1+4], 5, 40), - S_NORMAL2(FPCH, 'B', 5, A_ReFire , &States[S_PUNCHREADY], 5, 40), - -#define S_PUNCHATK2 (S_PUNCHATK1+5) - S_NORMAL2(FPCH, 'D', 4, NULL , &States[S_PUNCHATK2+1], 5, 40), - S_NORMAL2(FPCH, 'E', 4, NULL , &States[S_PUNCHATK2+2], 5, 40), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+3], 15, 50), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+4], 25, 60), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+5], 35, 70), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+6], 45, 80), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+7], 55, 90), - S_NORMAL2(FPCH, 'E', 1, NULL , &States[S_PUNCHATK2+8], 65, 100), - S_NORMAL2(FPCH, 'E', 10, NULL , &States[S_PUNCHREADY], 0, 150) -}; - -IMPLEMENT_ACTOR (AFWeapFist, Hexen, -1, 0) - PROP_Flags5 (MF5_BLOODSPLATTER) - PROP_Weapon_SelectionOrder (3400) - PROP_Weapon_Flags (WIF_BOT_MELEE) - PROP_Weapon_UpState (S_PUNCHUP) - PROP_Weapon_DownState (S_PUNCHDOWN) - PROP_Weapon_ReadyState (S_PUNCHREADY) - PROP_Weapon_AtkState (S_PUNCHATK1) - PROP_Weapon_Kickback (150) -END_DEFAULTS - -// Punch puff --------------------------------------------------------------- - -class APunchPuff : public AActor -{ - DECLARE_ACTOR (APunchPuff, AActor) -public: - void BeginPlay (); -}; - -FState APunchPuff::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 (APunchPuff, Hexen, -1, 0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags3 (MF3_PUFFONACTORS) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_SHADOW) - - PROP_SpawnState (0) - - PROP_SeeSound ("FighterPunchHitThing") - PROP_AttackSound ("FighterPunchHitWall") - PROP_ActiveSound ("FighterPunchMiss") -END_DEFAULTS - -void APunchPuff::BeginPlay () -{ - Super::BeginPlay (); - momz = FRACUNIT; -} - //============================================================================ // // A_FPunchAttack @@ -245,7 +158,7 @@ void A_FPunchAttack (AActor *actor) damage = 40+(pr_fpatk()&15); power = 2*FRACUNIT; - pufftype = RUNTIME_CLASS(APunchPuff); + pufftype = PClass::FindClass ("PunchPuff"); for (i = 0; i < 16; i++) { angle = pmo->angle + i*(ANG45/16); @@ -257,7 +170,7 @@ void A_FPunchAttack (AActor *actor) { damage <<= 1; power = 6*FRACUNIT; - pufftype = RUNTIME_CLASS(AHammerPuff); + pufftype = PClass::FindClass ("HammerPuff"); } P_LineAttack (pmo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, pufftype, true); if (linetarget->flags3&MF3_ISMONSTER || linetarget->player) @@ -276,7 +189,7 @@ void A_FPunchAttack (AActor *actor) { damage <<= 1; power = 6*FRACUNIT; - pufftype = RUNTIME_CLASS(AHammerPuff); + pufftype = PClass::FindClass ("HammerPuff"); } P_LineAttack (pmo, angle, 2*MELEERANGE, slope, damage, NAME_Melee, pufftype, true); if (linetarget->flags3&MF3_ISMONSTER || linetarget->player) @@ -298,7 +211,7 @@ punchdone: if (pmo->special1 == 3) { pmo->special1 = 0; - P_SetPsprite (player, ps_weapon, &AFWeapFist::States[S_PUNCHATK2]); + P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Fire2")); S_Sound (pmo, CHAN_VOICE, "*fistgrunt", 1, ATTN_NORM); } return; diff --git a/src/g_hexen/a_fighterquietus.cpp b/src/g_hexen/a_fighterquietus.cpp index ec88eaf07f..23370ffc75 100644 --- a/src/g_hexen/a_fighterquietus.cpp +++ b/src/g_hexen/a_fighterquietus.cpp @@ -28,9 +28,7 @@ protected: bool MatchPlayerClass (AActor *toucher); }; -IMPLEMENT_STATELESS_ACTOR (AFighterWeaponPiece, Hexen, -1, 0) - PROP_Inventory_PickupMessage("$TXT_QUIETUS_PIECE") -END_DEFAULTS +IMPLEMENT_CLASS (AFighterWeaponPiece) bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher) { @@ -42,21 +40,12 @@ bool AFighterWeaponPiece::MatchPlayerClass (AActor *toucher) class AFWeaponPiece1 : public AFighterWeaponPiece { - DECLARE_ACTOR (AFWeaponPiece1, AFighterWeaponPiece) + DECLARE_CLASS (AFWeaponPiece1, AFighterWeaponPiece) public: void BeginPlay (); }; -FState AFWeaponPiece1::States[] = -{ - S_BRIGHT (WFR1, 'A', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AFWeaponPiece1, Hexen, 12, 29) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOATBOB) - PROP_SpawnState (0) -END_DEFAULTS +IMPLEMENT_CLASS (AFWeaponPiece1) void AFWeaponPiece1::BeginPlay () { @@ -68,21 +57,12 @@ void AFWeaponPiece1::BeginPlay () class AFWeaponPiece2 : public AFighterWeaponPiece { - DECLARE_ACTOR (AFWeaponPiece2, AFighterWeaponPiece) + DECLARE_CLASS (AFWeaponPiece2, AFighterWeaponPiece) public: void BeginPlay (); }; -FState AFWeaponPiece2::States[] = -{ - S_BRIGHT (WFR2, 'A', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AFWeaponPiece2, Hexen, 13, 30) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOATBOB) - PROP_SpawnState (0) -END_DEFAULTS +IMPLEMENT_CLASS (AFWeaponPiece2) void AFWeaponPiece2::BeginPlay () { @@ -94,21 +74,12 @@ void AFWeaponPiece2::BeginPlay () class AFWeaponPiece3 : public AFighterWeaponPiece { - DECLARE_ACTOR (AFWeaponPiece3, AFighterWeaponPiece) + DECLARE_CLASS (AFWeaponPiece3, AFighterWeaponPiece) public: void BeginPlay (); }; -FState AFWeaponPiece3::States[] = -{ - S_BRIGHT (WFR3, 'A', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AFWeaponPiece3, Hexen, 16, 31) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOATBOB) - PROP_SpawnState (0) -END_DEFAULTS +IMPLEMENT_CLASS (AFWeaponPiece3) void AFWeaponPiece3::BeginPlay () { @@ -116,147 +87,16 @@ void AFWeaponPiece3::BeginPlay () PieceValue = WPIECE3; } -// An actor that spawns the three pieces of the fighter's fourth weapon ----- - -// This gets spawned if weapon drop is on so that other players can pick up -// this player's weapon. - -class AQuietusDrop : public AActor -{ - DECLARE_ACTOR (AQuietusDrop, AActor) -}; - -FState AQuietusDrop::States[] = -{ - S_NORMAL (TNT1, 'A', 1, NULL, &States[1]), - S_NORMAL (TNT1, 'A', 1, A_DropQuietusPieces, NULL) -}; - -IMPLEMENT_ACTOR (AQuietusDrop, Hexen, -1, 0) - PROP_SpawnState (0) -END_DEFAULTS - -// The Fighter's Sword (Quietus) -------------------------------------------- - -class AFWeapQuietus : public AFighterWeapon -{ - DECLARE_ACTOR (AFWeapQuietus, AFighterWeapon) -}; - -FState AFWeapQuietus::States[] = -{ - // Dummy state, because the fourth weapon does not appear in a level directly. - S_NORMAL (TNT1, 'A', -1, NULL , NULL), - -#define S_FSWORDREADY (1) - S_BRIGHT (FSRD, 'A', 1, A_WeaponReady , &States[S_FSWORDREADY+1]), // S_FSWORDREADY - S_BRIGHT (FSRD, 'A', 1, A_WeaponReady , &States[S_FSWORDREADY+2]), // S_FSWORDREADY1 - S_BRIGHT (FSRD, 'A', 1, A_WeaponReady , &States[S_FSWORDREADY+3]), // S_FSWORDREADY2 - S_BRIGHT (FSRD, 'A', 1, A_WeaponReady , &States[S_FSWORDREADY+4]), // S_FSWORDREADY3 - S_BRIGHT (FSRD, 'B', 1, A_WeaponReady , &States[S_FSWORDREADY+5]), // S_FSWORDREADY4 - S_BRIGHT (FSRD, 'B', 1, A_WeaponReady , &States[S_FSWORDREADY+6]), // S_FSWORDREADY5 - S_BRIGHT (FSRD, 'B', 1, A_WeaponReady , &States[S_FSWORDREADY+7]), // S_FSWORDREADY6 - S_BRIGHT (FSRD, 'B', 1, A_WeaponReady , &States[S_FSWORDREADY+8]), // S_FSWORDREADY7 - S_BRIGHT (FSRD, 'C', 1, A_WeaponReady , &States[S_FSWORDREADY+9]), // S_FSWORDREADY8 - S_BRIGHT (FSRD, 'C', 1, A_WeaponReady , &States[S_FSWORDREADY+10]), // S_FSWORDREADY9 - S_BRIGHT (FSRD, 'C', 1, A_WeaponReady , &States[S_FSWORDREADY+11]), // S_FSWORDREADY10 - S_BRIGHT (FSRD, 'C', 1, A_WeaponReady , &States[S_FSWORDREADY]), // S_FSWORDREADY11 - -#define S_FSWORDDOWN (S_FSWORDREADY+12) - S_BRIGHT (FSRD, 'A', 1, A_Lower , &States[S_FSWORDDOWN]), // S_FSWORDDOWN - -#define S_FSWORDUP (S_FSWORDDOWN+1) - S_BRIGHT (FSRD, 'A', 1, A_Raise , &States[S_FSWORDUP]), // S_FSWORDUP - -#define S_FSWORDATK (S_FSWORDUP+1) - S_BRIGHT2 (FSRD, 'D', 3, NULL , &States[S_FSWORDATK+1], 5, 36), // S_FSWORDATK_1 - S_BRIGHT2 (FSRD, 'E', 3, NULL , &States[S_FSWORDATK+2], 5, 36), // S_FSWORDATK_2 - S_BRIGHT2 (FSRD, 'F', 2, NULL , &States[S_FSWORDATK+3], 5, 36), // S_FSWORDATK_3 - S_BRIGHT2 (FSRD, 'G', 3, A_FSwordAttack , &States[S_FSWORDATK+4], 5, 36), // S_FSWORDATK_4 - S_BRIGHT2 (FSRD, 'H', 2, NULL , &States[S_FSWORDATK+5], 5, 36), // S_FSWORDATK_5 - S_BRIGHT2 (FSRD, 'I', 2, NULL , &States[S_FSWORDATK+6], 5, 36), // S_FSWORDATK_6 - S_BRIGHT2 (FSRD, 'I', 10, NULL , &States[S_FSWORDATK+7], 5, 150), // S_FSWORDATK_7 - S_BRIGHT2 (FSRD, 'A', 1, NULL , &States[S_FSWORDATK+8], 5, 60), // S_FSWORDATK_8 - S_BRIGHT2 (FSRD, 'B', 1, NULL , &States[S_FSWORDATK+9], 5, 55), // S_FSWORDATK_9 - S_BRIGHT2 (FSRD, 'C', 1, NULL , &States[S_FSWORDATK+10], 5, 50), // S_FSWORDATK_10 - S_BRIGHT2 (FSRD, 'A', 1, NULL , &States[S_FSWORDATK+11], 5, 45), // S_FSWORDATK_11 - S_BRIGHT2 (FSRD, 'B', 1, NULL , &States[S_FSWORDREADY], 5, 40), // S_FSWORDATK_12 -}; - -IMPLEMENT_ACTOR (AFWeapQuietus, Hexen, -1, 0) - PROP_Flags (MF_SPECIAL) - PROP_SpawnState (0) - - PROP_Weapon_SelectionOrder (2900) - PROP_Weapon_Flags (WIF_PRIMARY_USES_BOTH) - PROP_Weapon_AmmoUse1 (14) - PROP_Weapon_AmmoUse2 (14) - PROP_Weapon_AmmoGive1 (0) - PROP_Weapon_AmmoGive2 (0) - PROP_Weapon_UpState (S_FSWORDUP) - PROP_Weapon_DownState (S_FSWORDDOWN) - PROP_Weapon_ReadyState (S_FSWORDREADY) - PROP_Weapon_AtkState (S_FSWORDATK) - PROP_Weapon_Kickback (150) - PROP_Weapon_YAdjust (10) - PROP_Weapon_MoveCombatDist (20000000) - PROP_Weapon_AmmoType1 ("Mana1") - PROP_Weapon_AmmoType2 ("Mana2") - PROP_Weapon_ProjectileType ("FSwordMissile") - PROP_Inventory_PickupMessage("$TXT_WEAPON_F4") -END_DEFAULTS - // Fighter Sword Missile ---------------------------------------------------- class AFSwordMissile : public AActor { - DECLARE_ACTOR (AFSwordMissile, AActor) + DECLARE_CLASS (AFSwordMissile, AActor) public: - void GetExplodeParms (int &damage, int &dist, bool &hurtSource); int DoSpecialDamage(AActor *victim, AActor *source, int damage); }; -FState AFSwordMissile::States[] = -{ -#define S_FSWORD_MISSILE1 0 - S_BRIGHT (FSFX, 'A', 3, NULL , &States[S_FSWORD_MISSILE1+1]), - S_BRIGHT (FSFX, 'B', 3, NULL , &States[S_FSWORD_MISSILE1+2]), - S_BRIGHT (FSFX, 'C', 3, NULL , &States[S_FSWORD_MISSILE1]), - -#define S_FSWORD_MISSILE_X1 (S_FSWORD_MISSILE1+3) - S_BRIGHT (FSFX, 'D', 4, NULL , &States[S_FSWORD_MISSILE_X1+1]), - S_BRIGHT (FSFX, 'E', 3, A_FSwordFlames , &States[S_FSWORD_MISSILE_X1+2]), - S_BRIGHT (FSFX, 'F', 4, A_Explode , &States[S_FSWORD_MISSILE_X1+3]), - S_BRIGHT (FSFX, 'G', 3, NULL , &States[S_FSWORD_MISSILE_X1+4]), - S_BRIGHT (FSFX, 'H', 4, NULL , &States[S_FSWORD_MISSILE_X1+5]), - S_BRIGHT (FSFX, 'I', 3, NULL , &States[S_FSWORD_MISSILE_X1+6]), - S_BRIGHT (FSFX, 'J', 4, NULL , &States[S_FSWORD_MISSILE_X1+7]), - S_BRIGHT (FSFX, 'K', 3, NULL , &States[S_FSWORD_MISSILE_X1+8]), - S_BRIGHT (FSFX, 'L', 3, NULL , &States[S_FSWORD_MISSILE_X1+9]), - S_BRIGHT (FSFX, 'M', 3, NULL , NULL), -}; - -IMPLEMENT_ACTOR (AFSwordMissile, Hexen, -1, 0) - PROP_SpeedFixed (30) - PROP_RadiusFixed (16) - PROP_HeightFixed (8) - PROP_Damage (8) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_IMPACT|MF2_PCROSS) - PROP_Flags4 (MF4_EXTREMEDEATH) - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (S_FSWORD_MISSILE1) - PROP_DeathState (S_FSWORD_MISSILE_X1) - - PROP_DeathSound ("FighterSwordExplode") -END_DEFAULTS - -void AFSwordMissile::GetExplodeParms (int &damage, int &dist, bool &hurtSource) -{ - damage = 64; - hurtSource = false; -} +IMPLEMENT_CLASS (AFSwordMissile) int AFSwordMissile::DoSpecialDamage(AActor *victim, AActor *source, int damage) { @@ -267,36 +107,6 @@ int AFSwordMissile::DoSpecialDamage(AActor *victim, AActor *source, int damage) return damage; } - -// Fighter Sword Flame ------------------------------------------------------ - -class AFSwordFlame : public AActor -{ - DECLARE_ACTOR (AFSwordFlame, AActor) -}; - -FState AFSwordFlame::States[] = -{ - S_BRIGHT (FSFX, 'N', 3, NULL , &States[1]), - S_BRIGHT (FSFX, 'O', 3, NULL , &States[2]), - S_BRIGHT (FSFX, 'P', 3, NULL , &States[3]), - S_BRIGHT (FSFX, 'Q', 3, NULL , &States[4]), - S_BRIGHT (FSFX, 'R', 3, NULL , &States[5]), - S_BRIGHT (FSFX, 'S', 3, NULL , &States[6]), - S_BRIGHT (FSFX, 'T', 3, NULL , &States[7]), - S_BRIGHT (FSFX, 'U', 3, NULL , &States[8]), - S_BRIGHT (FSFX, 'V', 3, NULL , &States[9]), - S_BRIGHT (FSFX, 'W', 3, NULL , NULL), -}; - -IMPLEMENT_ACTOR (AFSwordFlame, Hexen, -1, 0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_SHADOW) - PROP_SpawnState (0) -END_DEFAULTS - - //============================================================================ // // A_FSwordAttack @@ -340,7 +150,7 @@ void A_FSwordFlames (AActor *actor) fixed_t x = actor->x+((pr_fswordflame()-128)<<12); fixed_t y = actor->y+((pr_fswordflame()-128)<<12); fixed_t z = actor->z+((pr_fswordflame()-128)<<11); - Spawn (x, y, z, ALLOW_REPLACE); + Spawn ("FSwordFlame", x, y, z, ALLOW_REPLACE); } } @@ -377,7 +187,7 @@ void A_DropQuietusPieces (AActor *actor) void AFighterWeaponPiece::BeginPlay () { Super::BeginPlay (); - FourthWeaponClass = RUNTIME_CLASS(AFWeapQuietus); + FourthWeaponClass = PClass::FindClass ("FWeapQuietus"); } //============================================================================ diff --git a/src/g_hexen/a_hexenglobal.h b/src/g_hexen/a_hexenglobal.h index b098f68403..a98ad72e14 100644 --- a/src/g_hexen/a_hexenglobal.h +++ b/src/g_hexen/a_hexenglobal.h @@ -38,13 +38,6 @@ public: bool IsOkayToAttack (AActor *link); }; -class AHammerPuff : public AActor -{ - DECLARE_ACTOR (AHammerPuff, AActor) -public: - void BeginPlay (); -}; - class AFourthWeaponPiece : public AInventory { DECLARE_STATELESS_ACTOR (AFourthWeaponPiece, AInventory) diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index 6c07211ab2..6ce27cd0b1 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -1249,7 +1249,7 @@ bool AInventory::TryPickup (AActor *toucher) { // Add the item to the inventory. It is not already there, or HandlePickup // would have already taken care of it. - AInventory *copy = CreateCopy (toucher); + AInventory *copy = CreeCopy (toucher); if (copy == NULL) { return false; diff --git a/src/g_strife/a_strifeglobal.h b/src/g_strife/a_strifeglobal.h index 2e381329fa..7577b74781 100644 --- a/src/g_strife/a_strifeglobal.h +++ b/src/g_strife/a_strifeglobal.h @@ -66,17 +66,7 @@ public: bool TryPickup (AActor *toucher); }; -class AStrifeWeapon : public AWeapon -{ - DECLARE_STATELESS_ACTOR (AStrifeWeapon, AWeapon) -}; - -class AFlameThrower : public AStrifeWeapon -{ - DECLARE_ACTOR (AFlameThrower, AStrifeWeapon) -}; - -class ASigil : public AStrifeWeapon +class ASigil : public AWeapon { DECLARE_ACTOR (ASigil, AStrifeWeapon) public: diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index 61d0dd3e29..880ff2da50 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -25,113 +25,8 @@ static FRandom pr_phburn ("PhBurn"); void A_LoopActiveSound (AActor *); void A_Countdown (AActor *); -IMPLEMENT_STATELESS_ACTOR (AStrifeWeapon, Strife, -1, 0) - PROP_Weapon_Kickback (100) -END_DEFAULTS - -// Same as the bullet puff for Doom ----------------------------------------- - -FState AStrifePuff::States[] = -{ - // When you don't hit an actor - S_BRIGHT (PUFY, 'A', 4, NULL, &States[1]), - S_NORMAL (PUFY, 'B', 4, NULL, &States[2]), - S_NORMAL (PUFY, 'C', 4, NULL, &States[3]), - S_NORMAL (PUFY, 'D', 4, NULL, NULL), - - // When you do hit an actor - S_NORMAL (POW3, 'A', 3, NULL, &States[5]), - S_NORMAL (POW3, 'B', 3, NULL, &States[6]), - S_NORMAL (POW3, 'C', 3, NULL, &States[7]), - S_NORMAL (POW3, 'D', 3, NULL, &States[8]), - S_NORMAL (POW3, 'E', 3, NULL, &States[9]), - S_NORMAL (POW3, 'F', 3, NULL, &States[10]), - S_NORMAL (POW3, 'G', 3, NULL, &States[11]), - S_NORMAL (POW3, 'H', 3, NULL, NULL), -}; - -IMPLEMENT_ACTOR (AStrifePuff, Strife, -1, 0) - PROP_SpawnState (4) - PROP_CrashState (0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags4 (MF4_ALLOWPARTICLES) - PROP_Alpha (TRANSLUC25) - PROP_RenderStyle (STYLE_Translucent) -END_DEFAULTS - -// A spark when you hit something that doesn't bleed ------------------------ -// Only used by the dagger. - -class AStrifeSpark : public AActor -{ - DECLARE_ACTOR (AStrifeSpark, AActor) -}; - -FState AStrifeSpark::States[] = -{ - // When you hit an actor - S_NORMAL (POW3, 'A', 3, NULL, &States[1]), - S_NORMAL (POW3, 'B', 3, NULL, &States[2]), - S_NORMAL (POW3, 'C', 3, NULL, &States[3]), - S_NORMAL (POW3, 'D', 3, NULL, &States[4]), - S_NORMAL (POW3, 'E', 3, NULL, &States[5]), - S_NORMAL (POW3, 'F', 3, NULL, &States[6]), - S_NORMAL (POW3, 'G', 3, NULL, &States[7]), - S_NORMAL (POW3, 'H', 3, NULL, NULL), - - // When you hit something else - S_NORMAL (POW2, 'A', 4, NULL, &States[9]), - S_NORMAL (POW2, 'B', 4, NULL, &States[10]), - S_NORMAL (POW2, 'C', 4, NULL, &States[11]), - S_NORMAL (POW2, 'D', 4, NULL, NULL) -}; - -IMPLEMENT_ACTOR (AStrifeSpark, Strife, -1, 0) - PROP_SpawnState (0) - PROP_CrashState (8) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags4 (MF4_ALLOWPARTICLES) - PROP_RenderStyle (STYLE_Add) - PROP_Alpha (TRANSLUC25) -END_DEFAULTS - // Punch Dagger ------------------------------------------------------------- -void A_JabDagger (AActor *); - -class APunchDagger : public AStrifeWeapon -{ - DECLARE_ACTOR (APunchDagger, AStrifeWeapon) -}; - -FState APunchDagger::States[] = -{ -#define S_PUNCH 0 - S_NORMAL (PNCH, 'A', 1, A_WeaponReady , &States[S_PUNCH]), - -#define S_PUNCHDOWN (S_PUNCH+1) - S_NORMAL (PNCH, 'A', 1, A_Lower , &States[S_PUNCHDOWN]), - -#define S_PUNCHUP (S_PUNCHDOWN+1) - S_NORMAL (PNCH, 'A', 1, A_Raise , &States[S_PUNCHUP]), - -#define S_PUNCH1 (S_PUNCHUP+1) - S_NORMAL (PNCH, 'B', 4, NULL , &States[S_PUNCH1+1]), - S_NORMAL (PNCH, 'C', 4, A_JabDagger , &States[S_PUNCH1+2]), - S_NORMAL (PNCH, 'D', 5, NULL , &States[S_PUNCH1+3]), - S_NORMAL (PNCH, 'C', 4, NULL , &States[S_PUNCH1+4]), - S_NORMAL (PNCH, 'B', 5, A_ReFire , &States[S_PUNCH]) -}; - -IMPLEMENT_ACTOR (APunchDagger, Strife, -1, 0) - PROP_Weapon_SelectionOrder (3900) - PROP_Weapon_Flags (WIF_NOALERT) - PROP_Weapon_UpState (S_PUNCHUP) - PROP_Weapon_DownState (S_PUNCHDOWN) - PROP_Weapon_ReadyState (S_PUNCH) - PROP_Weapon_AtkState (S_PUNCH1) -END_DEFAULTS - //============================================================================ // // P_DaggerAlert @@ -211,7 +106,7 @@ void A_JabDagger (AActor *actor) angle = actor->angle + (pr_jabdagger.Random2() << 18); pitch = P_AimLineAttack (actor, angle, 80*FRACUNIT, &linetarget); - P_LineAttack (actor, angle, 80*FRACUNIT, pitch, damage, NAME_Melee, RUNTIME_CLASS(AStrifeSpark), true); + P_LineAttack (actor, angle, 80*FRACUNIT, pitch, damage, NAME_Melee, "StrifeSpark", true); // turn to face target if (linetarget) @@ -232,40 +127,6 @@ void A_JabDagger (AActor *actor) } } -// The base for Strife projectiles that die with ZAP1 ----------------------- - -void A_AlertMonsters (AActor *); - -class AStrifeZap1 : public AActor -{ - DECLARE_ACTOR (AStrifeZap1, AActor) -}; - -FState AStrifeZap1::States[] = -{ - S_NORMAL (ZAP1, 'A', 3, A_AlertMonsters, &States[1]), - S_NORMAL (ZAP1, 'B', 3, NULL, &States[2]), - S_NORMAL (ZAP1, 'C', 3, NULL, &States[3]), - S_NORMAL (ZAP1, 'D', 3, NULL, &States[4]), - S_NORMAL (ZAP1, 'E', 3, NULL, &States[5]), - S_NORMAL (ZAP1, 'F', 3, NULL, &States[6]), - S_NORMAL (ZAP1, 'E', 3, NULL, &States[7]), - S_NORMAL (ZAP1, 'D', 3, NULL, &States[8]), - S_NORMAL (ZAP1, 'C', 3, NULL, &States[9]), - S_NORMAL (ZAP1, 'B', 3, NULL, &States[10]), - S_NORMAL (ZAP1, 'A', 3, NULL, NULL), -}; - -IMPLEMENT_ACTOR (AStrifeZap1, Strife, -1, 0) - PROP_DeathState (0) - - // The spawn state is here just to allow it to be spawned on its own. - // Strife doesn't contain any actual mobjinfo that will spawn this; - // it is always the death state for something else. - PROP_SpawnState (0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF) -END_DEFAULTS - //============================================================================ // // A_AlertMonsters @@ -284,65 +145,16 @@ void A_AlertMonsters (AActor *self) } } -// Electric Bolt ------------------------------------------------------------ - -class AElectricBolt : public AStrifeZap1 -{ - DECLARE_ACTOR (AElectricBolt, AStrifeZap1) -}; - -FState AElectricBolt::States[] = -{ - S_NORMAL (AROW, 'A', 10, A_LoopActiveSound, &States[0]), -}; - -IMPLEMENT_ACTOR (AElectricBolt, Strife, -1, 0) - PROP_SpawnState (0) - PROP_SpeedFixed (30) - PROP_RadiusFixed (10) - PROP_HeightFixed (10) - PROP_Damage (10) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_StrifeType (102) - PROP_SeeSound ("misc/swish") - PROP_ActiveSound ("misc/swish") - PROP_DeathSound ("weapons/xbowhit") -END_DEFAULTS - // Poison Bolt -------------------------------------------------------------- class APoisonBolt : public AActor { - DECLARE_ACTOR (APoisonBolt, AActor) + DECLARE_CLASS (APoisonBolt, AActor) public: int DoSpecialDamage (AActor *target, int damage); }; -FState APoisonBolt::States[] = -{ - S_NORMAL (ARWP, 'A', 10, A_LoopActiveSound, &States[0]), - - S_NORMAL (AROW, 'A', 1, NULL, NULL) -}; - -IMPLEMENT_ACTOR (APoisonBolt, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (1) - PROP_SpeedFixed (30) - PROP_RadiusFixed (10) - PROP_HeightFixed (10) - PROP_DamageLong (500) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_StrifeType (103) - PROP_SeeSound ("misc/swish") - PROP_ActiveSound ("misc/swish") -END_DEFAULTS +IMPLEMENT_CLASS (APoisonBolt) int APoisonBolt::DoSpecialDamage (AActor *target, int damage) { @@ -352,125 +164,16 @@ int APoisonBolt::DoSpecialDamage (AActor *target, int damage) } if (target->health < 1000000) { - return target->health + 10; + if (!(target->flags2 & MF2_BOSS)) + return target->health + 10; + else + return 50; } return 1; } // Strife's Crossbow -------------------------------------------------------- -void A_XBowReFire (AActor *); -void A_ClearFlash (AActor *); -void A_ShowElectricFlash (AActor *); -void A_FireElectric (AActor *); -void A_FirePoison (AActor *); - -class AStrifeCrossbow : public AStrifeWeapon -{ - DECLARE_ACTOR (AStrifeCrossbow, AStrifeWeapon) -}; - -FState AStrifeCrossbow::States[] = -{ - S_NORMAL (CBOW, 'A', -1, NULL, &States[0]), - - // Electric - -#define S_EXBOW 1 - S_NORMAL (XBOW, 'A', 0, A_ShowElectricFlash, &States[S_EXBOW+1]), - S_NORMAL (XBOW, 'A', 1, A_WeaponReady, &States[S_EXBOW+1]), - -#define S_EXBOWDOWN (S_EXBOW+2) - S_NORMAL (XBOW, 'A', 1, A_Lower, &States[S_EXBOWDOWN]), - -#define S_EXBOWUP (S_EXBOWDOWN+1) - S_NORMAL (XBOW, 'A', 1, A_Raise, &States[S_EXBOWUP]), - -#define S_EXBOWATK (S_EXBOWUP+1) - S_NORMAL (XBOW, 'A', 3, A_ClearFlash, &States[S_EXBOWATK+1]), - S_NORMAL (XBOW, 'B', 6, A_FireElectric, &States[S_EXBOWATK+2]), - S_NORMAL (XBOW, 'C', 4, NULL, &States[S_EXBOWATK+3]), - S_NORMAL (XBOW, 'D', 6, NULL, &States[S_EXBOWATK+4]), - S_NORMAL (XBOW, 'E', 3, NULL, &States[S_EXBOWATK+5]), - S_NORMAL (XBOW, 'F', 5, NULL, &States[S_EXBOWATK+6]), - S_NORMAL (XBOW, 'G', 5, A_XBowReFire, &States[S_EXBOW]), - -#define S_EXBOWARROWHEAD (S_EXBOWATK+7) - S_NORMAL (XBOW, 'K', 5, NULL, &States[S_EXBOWARROWHEAD+1]), - S_NORMAL (XBOW, 'L', 5, NULL, &States[S_EXBOWARROWHEAD+2]), - S_NORMAL (XBOW, 'M', 5, NULL, &States[S_EXBOWARROWHEAD]), - - // Poison - -#define S_PXBOW (S_EXBOWARROWHEAD+3) - S_NORMAL (XBOW, 'H', 1, A_WeaponReady, &States[S_PXBOW]), - -#define S_PXBOWDOWN (S_PXBOW+1) - S_NORMAL (XBOW, 'H', 1, A_Lower, &States[S_PXBOWDOWN]), - -#define S_PXBOWUP (S_PXBOWDOWN+1) - S_NORMAL (XBOW, 'H', 1, A_Raise, &States[S_PXBOWUP]), - -#define S_PXBOWATK (S_PXBOWUP+1) - S_NORMAL (XBOW, 'H', 3, NULL, &States[S_PXBOWATK+1]), - S_NORMAL (XBOW, 'B', 6, A_FirePoison, &States[S_PXBOWATK+2]), - S_NORMAL (XBOW, 'C', 4, NULL, &States[S_PXBOWATK+3]), - S_NORMAL (XBOW, 'D', 6, NULL, &States[S_PXBOWATK+4]), - S_NORMAL (XBOW, 'E', 3, NULL, &States[S_PXBOWATK+5]), - S_NORMAL (XBOW, 'I', 5, NULL, &States[S_PXBOWATK+6]), - S_NORMAL (XBOW, 'J', 5, A_XBowReFire, &States[S_PXBOW]), -}; - -// The electric version - -IMPLEMENT_ACTOR (AStrifeCrossbow, Strife, 2001, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (0) - PROP_StrifeType (194) - PROP_StrifeTeaserType (188) - PROP_StrifeTeaserType2 (192) - - PROP_Weapon_SelectionOrder (1200) - PROP_Weapon_Flags (WIF_NOALERT) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (8) - PROP_Weapon_UpState (S_EXBOWUP) - PROP_Weapon_DownState (S_EXBOWDOWN) - PROP_Weapon_ReadyState (S_EXBOW) - PROP_Weapon_AtkState (S_EXBOWATK) - PROP_Weapon_MoveCombatDist (24000000) - PROP_Weapon_AmmoType1 ("ElectricBolts") - PROP_Weapon_SisterType ("StrifeCrossbow2") - PROP_Weapon_ProjectileType ("ElectricBolt") - PROP_Inventory_PickupMessage("$TXT_STRIFECROSSBOW") - - PROP_Inventory_Icon ("CBOWA0") - PROP_Tag ("crossbow") -END_DEFAULTS - -// Poison Crossbow ---------------------------------------------------------- - -class AStrifeCrossbow2 : public AStrifeCrossbow -{ - DECLARE_STATELESS_ACTOR (AStrifeCrossbow2, AStrifeCrossbow) -}; - -IMPLEMENT_STATELESS_ACTOR (AStrifeCrossbow2, Strife, -1, 0) - PROP_Weapon_SelectionOrder (2700) - PROP_Weapon_Flags (WIF_NOALERT) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (0) - PROP_Weapon_UpState (S_PXBOWUP) - PROP_Weapon_DownState (S_PXBOWDOWN) - PROP_Weapon_ReadyState (S_PXBOW) - PROP_Weapon_AtkState (S_PXBOWATK) - PROP_Weapon_AmmoType1 ("PoisonBolts") - PROP_Weapon_SisterType ("StrifeCrossbow") - PROP_Weapon_ProjectileType ("PoisonBolt") -END_DEFAULTS - - //============================================================================ // // A_ClearFlash @@ -497,7 +200,7 @@ void A_ShowElectricFlash (AActor *self) { if (self->player != NULL) { - P_SetPsprite (self->player, ps_flash, &AStrifeCrossbow::States[S_EXBOWARROWHEAD]); + P_SetPsprite (self->player, ps_flash, self->player->ReadyWeapon->FindState(NAME_Flash)); } } @@ -507,10 +210,15 @@ void A_ShowElectricFlash (AActor *self) // //============================================================================ -void A_FireElectric (AActor *self) +void A_FireArrow (AActor *self) { angle_t savedangle; + int index=CheckIndex(1); + if (index<0) return; + + ENamedName MissileName=(ENamedName)StateParameters[index]; + if (self->player == NULL) return; @@ -521,155 +229,20 @@ void A_FireElectric (AActor *self) return; } - savedangle = self->angle; - self->angle += pr_electric.Random2 () << (18 - self->player->accuracy * 5 / 100); - self->player->mo->PlayAttacking2 (); - P_SpawnPlayerMissile (self, RUNTIME_CLASS(AElectricBolt)); - self->angle = savedangle; - S_Sound (self, CHAN_WEAPON, "weapons/xbowshoot", 1, ATTN_NORM); -} - -//============================================================================ -// -// A_FirePoison -// -//============================================================================ - -void A_FirePoison (AActor *self) -{ - angle_t savedangle; - - if (self->player == NULL) - return; - - AWeapon *weapon = self->player->ReadyWeapon; - if (weapon != NULL) + const PClass * ti=PClass::FindClass(MissileName); + if (ti) { - if (!weapon->DepleteAmmo (weapon->bAltFire)) - return; - } - - savedangle = self->angle; - self->angle += pr_electric.Random2 () << (18 - self->player->accuracy * 5 / 100); - self->player->mo->PlayAttacking2 (); - P_SpawnPlayerMissile (self, RUNTIME_CLASS(APoisonBolt)); - self->angle = savedangle; - S_Sound (self, CHAN_WEAPON, "weapons/xbowshoot", 1, ATTN_NORM); -} - -//============================================================================ -// -// A_XBowReFire -// -//============================================================================ - -void A_XBowReFire (AActor *self) -{ - player_t *player = self->player; - - if (player == NULL) - return; - - AWeapon *weapon = player->ReadyWeapon; - if (weapon == NULL) - return; - - weapon->CheckAmmo (weapon->bAltFire ? AWeapon::AltFire : AWeapon::PrimaryFire, true); - if (weapon->GetClass() == RUNTIME_CLASS(AStrifeCrossbow)) - { - P_SetPsprite (player, ps_flash, &AStrifeCrossbow::States[S_EXBOWARROWHEAD]); + savedangle = self->angle; + self->angle += pr_electric.Random2 () << (18 - self->player->accuracy * 5 / 100); + self->player->mo->PlayAttacking2 (); + P_SpawnPlayerMissile (self, ti); + self->angle = savedangle; + S_Sound (self, CHAN_WEAPON, "weapons/xbowshoot", 1, ATTN_NORM); } } // Assault Gun -------------------------------------------------------------- -class AAssaultGun : public AStrifeWeapon -{ - DECLARE_ACTOR (AAssaultGun, AStrifeWeapon) -public: - bool HandlePickup (AInventory *item); -}; - -class AAssaultGunStanding : public AAssaultGun -{ - DECLARE_ACTOR (AAssaultGunStanding, AAssaultGun) -public: - AInventory *CreateCopy (AActor *other); -}; - -void A_FireAssaultGun (AActor *); - -FState AAssaultGun::States[] = -{ - S_NORMAL (RIFL, 'A', -1, NULL, &States[0]), - -#define S_ASSAULT 1 - S_NORMAL (RIFG, 'A', 1, A_WeaponReady, &States[S_ASSAULT]), - -#define S_ASSAULTDOWN (S_ASSAULT+1) - S_NORMAL (RIFG, 'B', 1, A_Lower, &States[S_ASSAULTDOWN]), - -#define S_ASSAULTUP (S_ASSAULTDOWN+1) - S_NORMAL (RIFG, 'A', 1, A_Raise, &States[S_ASSAULTUP]), - -#define S_ASSAULTATK (S_ASSAULTUP+1) - S_NORMAL (RIFF, 'A', 3, A_FireAssaultGun, &States[S_ASSAULTATK+1]), - S_NORMAL (RIFF, 'B', 3, A_FireAssaultGun, &States[S_ASSAULTATK+2]), - S_NORMAL (RIFG, 'D', 3, A_FireAssaultGun, &States[S_ASSAULTATK+3]), - S_NORMAL (RIFG, 'C', 0, A_ReFire, &States[S_ASSAULTATK+4]), - S_NORMAL (RIFG, 'B', 2, NULL, &States[S_ASSAULT]) -}; - -IMPLEMENT_ACTOR (AAssaultGun, Strife, 2002, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (0) - PROP_StrifeType (188) - PROP_StrifeTeaserType (182) - PROP_StrifeTeaserType2 (186) - - PROP_Weapon_SelectionOrder (600) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (20) - PROP_Weapon_UpState (S_ASSAULTUP) - PROP_Weapon_DownState (S_ASSAULTDOWN) - PROP_Weapon_ReadyState (S_ASSAULT) - PROP_Weapon_AtkState (S_ASSAULTATK) - PROP_Weapon_MoveCombatDist (27000000) - PROP_Weapon_AmmoType1 ("ClipOfBullets") - - PROP_Inventory_Icon ("RIFLA0") - PROP_Tag ("assault_gun") - PROP_Inventory_PickupMessage("$TXT_ASSAULTGUN") -END_DEFAULTS - -//============================================================================ -// -// AAssaultGun :: HandlePickup -// -// Picking up the standing assault gun is the same as picking up a regular -// one. -// -//============================================================================ - -bool AAssaultGun::HandlePickup (AInventory *item) -{ - if (item->GetClass() == RUNTIME_CLASS(AAssaultGunStanding) || - item->GetClass() == GetClass()) - { - if (static_cast(item)->PickupForAmmo (this)) - { - item->ItemFlags |= IF_PICKUPGOOD; - } - return true; - } - if (Inventory != NULL) - { - return Inventory->HandlePickup (item); - } - return false; -} - //============================================================================ // // P_StrifeGunShot @@ -723,178 +296,8 @@ void A_FireAssaultGun (AActor *self) P_StrifeGunShot (self, accurate, P_BulletSlope (self)); } -// Standing variant of the assault gun -------------------------------------- - -FState AAssaultGunStanding::States[] = -{ - S_NORMAL (RIFL, 'B', -1, NULL, &States[0]), -}; - -IMPLEMENT_ACTOR (AAssaultGunStanding, Strife, 2006, 0) - PROP_SpawnState (0) - PROP_StrifeType (189) - PROP_StrifeTeaserType (183) - PROP_StrifeTeaserType2 (187) - // "pulse_rifle" in the Teaser -END_DEFAULTS - -//============================================================================ -// -// AAssaultGunStanding :: CreateCopy -// -// This is just a different look for the standard assault gun. It is not a -// gun in its own right, so give the player an AssaultGun, not this. -// -//============================================================================ - -AInventory *AAssaultGunStanding::CreateCopy (AActor *other) -{ - AAssaultGun *copy = Spawn (0,0,0, NO_REPLACE); - copy->AmmoGive1 = AmmoGive1; - copy->AmmoGive2 = AmmoGive2; - GoAwayAndDie (); - return copy; -} - // Mini-Missile Launcher ---------------------------------------------------- -void A_FireMiniMissile (AActor *); - -class AMiniMissileLauncher : public AStrifeWeapon -{ - DECLARE_ACTOR (AMiniMissileLauncher, AStrifeWeapon) -}; - -FState AMiniMissileLauncher::States[] = -{ - S_NORMAL (MMSL, 'A', -1, NULL, NULL), - -#define S_MMISSILE 1 - S_NORMAL (MMIS, 'A', 1, A_WeaponReady, &States[S_MMISSILE]), - -#define S_MMISSILEDOWN (S_MMISSILE+1) - S_NORMAL (MMIS, 'A', 1, A_Lower, &States[S_MMISSILEDOWN]), - -#define S_MMISSILEUP (S_MMISSILEDOWN+1) - S_NORMAL (MMIS, 'A', 1, A_Raise, &States[S_MMISSILEUP]), - -#define S_MMISSILEATK (S_MMISSILEUP+1) - S_NORMAL (MMIS, 'A', 4, A_FireMiniMissile, &States[S_MMISSILEATK+1]), - S_NORMAL (MMIS, 'B', 4, A_Light1, &States[S_MMISSILEATK+2]), - S_BRIGHT (MMIS, 'C', 5, NULL, &States[S_MMISSILEATK+3]), - S_BRIGHT (MMIS, 'D', 2, A_Light2, &States[S_MMISSILEATK+4]), - S_BRIGHT (MMIS, 'E', 2, NULL, &States[S_MMISSILEATK+5]), - S_BRIGHT (MMIS, 'F', 2, A_Light0, &States[S_MMISSILEATK+6]), - S_NORMAL (MMIS, 'F', 0, A_ReFire, &States[S_MMISSILE]) -}; - -IMPLEMENT_ACTOR (AMiniMissileLauncher, Strife, 2003, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (0) - PROP_StrifeType (192) - PROP_StrifeTeaserType (186) - PROP_StrifeTeaserType2 (190) - - PROP_Weapon_SelectionOrder (1800) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (8) - PROP_Weapon_UpState (S_MMISSILEUP) - PROP_Weapon_DownState (S_MMISSILEDOWN) - PROP_Weapon_ReadyState (S_MMISSILE) - PROP_Weapon_AtkState (S_MMISSILEATK) - PROP_Weapon_MoveCombatDist (18350080) - PROP_Weapon_AmmoType1 ("MiniMissiles") - - PROP_Inventory_Icon ("MMSLA0") - PROP_Tag ("mini_missile_launcher") // "missile_gun" in the Teaser - PROP_Inventory_PickupMessage("$TXT_MMLAUNCHER") -END_DEFAULTS - -// Rocket Trail ------------------------------------------------------------- - -class ARocketTrail : public AActor -{ - DECLARE_ACTOR (ARocketTrail, AActor); -}; - -FState ARocketTrail::States[] = -{ - S_NORMAL (PUFY, 'B', 4, NULL, &States[1]), - S_NORMAL (PUFY, 'C', 4, NULL, &States[2]), - S_NORMAL (PUFY, 'B', 4, NULL, &States[3]), - S_NORMAL (PUFY, 'C', 4, NULL, &States[4]), - S_NORMAL (PUFY, 'D', 4, NULL, NULL), -}; - -IMPLEMENT_ACTOR (ARocketTrail, Strife, -1, 0) - PROP_SpawnState (0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Alpha (TRANSLUC25) - PROP_RenderStyle (STYLE_Translucent) - PROP_StrifeType (51) - PROP_SeeSound ("misc/missileinflight") -END_DEFAULTS - -// Rocket Puff -------------------------------------------------------------- - -class AMiniMissilePuff : public AStrifePuff -{ - DECLARE_STATELESS_ACTOR (AMiniMissilePuff, AStrifePuff) -}; - -IMPLEMENT_STATELESS_ACTOR (AMiniMissilePuff, Strife, -1, 0) - PROP_SpawnState (0) -END_DEFAULTS - -// Mini Missile ------------------------------------------------------------- - -void A_RocketInFlight (AActor *); - -class AMiniMissile : public AActor -{ - DECLARE_ACTOR (AMiniMissile, AActor); -public: - void PreExplode () - { - S_StopSound (this, CHAN_VOICE); - RenderStyle = STYLE_Add; - } - void GetExplodeParms (int &damage, int &dist, bool &hurtSource) - { - damage = dist = 64; - } -}; - -FState AMiniMissile::States[] = -{ - S_BRIGHT (MICR, 'A', 6, A_RocketInFlight, &States[0]), - - S_BRIGHT (SMIS, 'A', 5, A_ExplodeAndAlert, &States[2]), - S_BRIGHT (SMIS, 'B', 5, NULL, &States[3]), - S_BRIGHT (SMIS, 'C', 4, NULL, &States[4]), - S_BRIGHT (SMIS, 'D', 2, NULL, &States[5]), - S_BRIGHT (SMIS, 'E', 2, NULL, &States[6]), - S_BRIGHT (SMIS, 'F', 2, NULL, &States[7]), - S_BRIGHT (SMIS, 'G', 2, NULL, NULL), -}; - -IMPLEMENT_ACTOR (AMiniMissile, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (1) - PROP_SpeedFixed (20) - PROP_RadiusFixed (10) - PROP_HeightFixed (14) - PROP_Damage (10) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_StrifeType (99) - PROP_SeeSound ("weapons/minimissile") - PROP_DeathSound ("weapons/minimissilehit") -END_DEFAULTS - //============================================================================ // // A_FireMiniMissile @@ -944,95 +347,6 @@ void A_RocketInFlight (AActor *self) // Flame Thrower ------------------------------------------------------------ -void A_FireFlamer (AActor *); - - -FState AFlameThrower::States[] = -{ - S_NORMAL (FLAM, 'A', -1, NULL, NULL), - -#define S_FLAMER 1 - S_NORMAL (FLMT, 'A', 3, A_WeaponReady, &States[S_FLAMER+1]), - S_NORMAL (FLMT, 'B', 3, A_WeaponReady, &States[S_FLAMER+0]), - -#define S_FLAMERDOWN (S_FLAMER+2) - S_NORMAL (FLMT, 'A', 1, A_Lower, &States[S_FLAMERDOWN]), - -#define S_FLAMERUP (S_FLAMERDOWN+1) - S_NORMAL (FLMT, 'A', 1, A_Raise, &States[S_FLAMERUP]), - -#define S_FLAMERATK (S_FLAMERUP+1) - S_NORMAL (FLMF, 'A', 2, A_FireFlamer, &States[S_FLAMERATK+1]), - S_NORMAL (FLMF, 'B', 3, A_ReFire, &States[S_FLAMER]) -}; - -IMPLEMENT_ACTOR (AFlameThrower, Strife, 2005, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (0) - PROP_StrifeType (190) - PROP_StrifeTeaserType (184) - PROP_StrifeTeaserType2 (188) - - PROP_Weapon_SelectionOrder (2100) - PROP_Weapon_Flags (WIF_BOT_MELEE) - PROP_Weapon_Kickback (0) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (100) - PROP_Weapon_UpState (S_FLAMERUP) - PROP_Weapon_DownState (S_FLAMERDOWN) - PROP_Weapon_ReadyState (S_FLAMER) - PROP_Weapon_AtkState (S_FLAMERATK) - PROP_Weapon_UpSound ("weapons/flameidle") - PROP_Weapon_ReadySound ("weapons/flameidle") - PROP_Weapon_AmmoType1 ("EnergyPod") - PROP_Weapon_ProjectileType ("FlameMissile") - - PROP_Inventory_Icon ("FLAMA0") - PROP_Tag ("flame_thrower") - PROP_Inventory_PickupMessage("$TXT_FLAMER") -END_DEFAULTS - - -// Flame Thrower Projectile ------------------------------------------------- - -void A_FlameDie (AActor *); - -FState AFlameMissile::States[] = -{ -#define S_FLAME 0 - S_BRIGHT (FRBL, 'A', 3, NULL, &States[S_FLAME+1]), - S_BRIGHT (FRBL, 'B', 3, NULL, &States[S_FLAME+2]), - S_BRIGHT (FRBL, 'C', 3, A_Countdown, &States[S_FLAME]), - -#define S_FLAMEDIE (S_FLAME+3) - S_BRIGHT (FRBL, 'D', 5, A_FlameDie, &States[S_FLAMEDIE+1]), - S_BRIGHT (FRBL, 'E', 5, NULL, &States[S_FLAMEDIE+2]), - S_BRIGHT (FRBL, 'F', 5, NULL, &States[S_FLAMEDIE+3]), - S_BRIGHT (FRBL, 'G', 5, NULL, &States[S_FLAMEDIE+4]), - S_BRIGHT (FRBL, 'H', 5, NULL, &States[S_FLAMEDIE+5]), - S_BRIGHT (FRBL, 'I', 5, NULL, NULL), -}; - -IMPLEMENT_ACTOR (AFlameMissile, Strife, -1, 0) - PROP_SpawnState (S_FLAME) - PROP_DeathState (S_FLAMEDIE) - PROP_SpeedFixed (15) - PROP_RadiusFixed (8) - PROP_HeightFixed (11) - PROP_Mass (10) - PROP_Damage (4) - PROP_DamageType (NAME_Fire) - PROP_ReactionTime (8) - PROP_Flags (MF_NOBLOCKMAP|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_RenderStyle (STYLE_Add) - PROP_Alpha (OPAQUE) - PROP_SeeSound ("weapons/flamethrower") -END_DEFAULTS - //============================================================================ // // A_FlameDie @@ -1076,207 +390,6 @@ void A_FireFlamer (AActor *self) // Mauler ------------------------------------------------------------------- -void A_FireMauler1 (AActor *); -void A_FireMauler2Pre (AActor *); -void A_FireMauler2 (AActor *); -void A_MaulerTorpedoWave (AActor *); - -class AMauler : public AStrifeWeapon -{ - DECLARE_ACTOR (AMauler, AStrifeWeapon) -}; - -FState AMauler::States[] = -{ - S_NORMAL (TRPD, 'A', -1, NULL, NULL), - -#define S_MAULER1 1 - S_NORMAL (MAUL, 'F', 6, A_WeaponReady, &States[S_MAULER1+1]), - S_NORMAL (MAUL, 'G', 6, A_WeaponReady, &States[S_MAULER1+2]), - S_NORMAL (MAUL, 'H', 6, A_WeaponReady, &States[S_MAULER1+3]), - S_NORMAL (MAUL, 'A', 6, A_WeaponReady, &States[S_MAULER1]), - -#define S_MAULER1DOWN (S_MAULER1+4) - S_NORMAL (MAUL, 'A', 1, A_Lower, &States[S_MAULER1DOWN]), - -#define S_MAULER1UP (S_MAULER1DOWN+1) - S_NORMAL (MAUL, 'A', 1, A_Raise, &States[S_MAULER1UP]), - -#define S_MAULER1ATK (S_MAULER1UP+1) - // Why does the firing picture have its own sprite? - S_BRIGHT (BLSF, 'A', 5, A_FireMauler1, &States[S_MAULER1ATK+1]), - S_BRIGHT (MAUL, 'B', 3, A_Light1, &States[S_MAULER1ATK+2]), - S_NORMAL (MAUL, 'C', 2, A_Light2, &States[S_MAULER1ATK+3]), - S_NORMAL (MAUL, 'D', 2, NULL, &States[S_MAULER1ATK+4]), - S_NORMAL (MAUL, 'E', 2, NULL, &States[S_MAULER1ATK+5]), - S_NORMAL (MAUL, 'A', 7, A_Light0, &States[S_MAULER1ATK+6]), - S_NORMAL (MAUL, 'H', 7, NULL, &States[S_MAULER1ATK+7]), - S_NORMAL (MAUL, 'G', 7, A_CheckReload, &States[S_MAULER1]), - -#define S_MAULER2 (S_MAULER1ATK+8) - S_NORMAL (MAUL, 'I', 7, A_WeaponReady, &States[S_MAULER2+1]), - S_NORMAL (MAUL, 'J', 7, A_WeaponReady, &States[S_MAULER2+2]), - S_NORMAL (MAUL, 'K', 7, A_WeaponReady, &States[S_MAULER2+3]), - S_NORMAL (MAUL, 'L', 7, A_WeaponReady, &States[S_MAULER2]), - -#define S_MAULER2DOWN (S_MAULER2+4) - S_NORMAL (MAUL, 'I', 1, A_Lower, &States[S_MAULER2DOWN]), - -#define S_MAULER2UP (S_MAULER2DOWN+1) - S_NORMAL (MAUL, 'I', 1, A_Raise, &States[S_MAULER2UP]), - -#define S_MAULER2ATK (S_MAULER2UP+1) - S_NORMAL (MAUL, 'I', 20, A_FireMauler2Pre, &States[S_MAULER2ATK+1]), - S_NORMAL (MAUL, 'J', 10, A_Light1, &States[S_MAULER2ATK+2]), - S_BRIGHT (BLSF, 'A', 10, A_FireMauler2, &States[S_MAULER2ATK+3]), - S_BRIGHT (MAUL, 'B', 10, A_Light2, &States[S_MAULER2ATK+4]), - S_NORMAL (MAUL, 'C', 2, NULL, &States[S_MAULER2ATK+5]), - S_NORMAL (MAUL, 'D', 2, A_Light0, &States[S_MAULER2ATK+6]), - S_NORMAL (MAUL, 'E', 2, A_ReFire, &States[S_MAULER2]), -}; - -// The scatter version - -IMPLEMENT_ACTOR (AMauler, Strife, 2004, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (0) - PROP_StrifeType (193) - PROP_StrifeTeaserType (187) - PROP_StrifeTeaserType2 (191) - - PROP_Weapon_SelectionOrder (300) - PROP_Weapon_AmmoUse1 (20) - PROP_Weapon_AmmoGive1 (40) - PROP_Weapon_UpState (S_MAULER1UP) - PROP_Weapon_DownState (S_MAULER1DOWN) - PROP_Weapon_ReadyState (S_MAULER1) - PROP_Weapon_AtkState (S_MAULER1ATK) - PROP_Weapon_MoveCombatDist (15000000) - PROP_Weapon_AmmoType1 ("EnergyPod") - PROP_Weapon_SisterType ("Mauler2") - - PROP_Inventory_Icon ("TRPDA0") - PROP_Tag ("mauler") // "blaster" in the Teaser - PROP_Inventory_PickupMessage("$TXT_MAULER") -END_DEFAULTS - -// Mauler Torpedo version --------------------------------------------------- - -class AMauler2 : public AMauler -{ - DECLARE_STATELESS_ACTOR (AMauler2, AMauler) -}; - -// The torpedo version - -IMPLEMENT_STATELESS_ACTOR (AMauler2, Strife, -1, 0) - PROP_Weapon_SelectionOrder (3300) - PROP_Weapon_AmmoUse1 (30) - PROP_Weapon_AmmoGive1 (0) - PROP_Weapon_UpState (S_MAULER2UP) - PROP_Weapon_DownState (S_MAULER2DOWN) - PROP_Weapon_ReadyState (S_MAULER2) - PROP_Weapon_AtkState (S_MAULER2ATK) - PROP_Weapon_MoveCombatDist (10000000) - PROP_Weapon_AmmoType1 ("EnergyPod") - PROP_Weapon_SisterType ("Mauler") - PROP_Weapon_ProjectileType ("MaulerTorpedo") -END_DEFAULTS - -// Mauler "Bullet" Puff ----------------------------------------------------- - -class AMaulerPuff : public AActor -{ - DECLARE_ACTOR (AMaulerPuff, AActor) -}; - -FState AMaulerPuff::States[] = -{ - S_NORMAL (MPUF, 'A', 5, NULL, &States[1]), - S_NORMAL (MPUF, 'B', 5, NULL, &States[2]), - S_NORMAL (POW1, 'A', 4, NULL, &States[3]), - S_NORMAL (POW1, 'B', 4, NULL, &States[4]), - S_NORMAL (POW1, 'C', 4, NULL, &States[5]), - S_NORMAL (POW1, 'D', 4, NULL, &States[6]), - S_NORMAL (POW1, 'E', 4, NULL, NULL) -}; - -IMPLEMENT_ACTOR (AMaulerPuff, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DamageType (NAME_Disintegrate) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_Flags3 (MF3_PUFFONACTORS) - PROP_RenderStyle (STYLE_Add) -END_DEFAULTS - -// The Mauler's Torpedo ----------------------------------------------------- - -class AMaulerTorpedo : public AActor -{ - DECLARE_ACTOR (AMaulerTorpedo, AActor) -}; - -FState AMaulerTorpedo::States[] = -{ - S_BRIGHT (TORP, 'A', 4, NULL, &States[1]), - S_BRIGHT (TORP, 'B', 4, NULL, &States[2]), - S_BRIGHT (TORP, 'C', 4, NULL, &States[3]), - S_BRIGHT (TORP, 'D', 4, NULL, &States[0]), - - S_BRIGHT (THIT, 'A', 8, NULL, &States[5]), - S_BRIGHT (THIT, 'B', 8, NULL, &States[6]), - S_BRIGHT (THIT, 'C', 8, A_MaulerTorpedoWave, &States[7]), - S_BRIGHT (THIT, 'D', 8, NULL, &States[8]), - S_BRIGHT (THIT, 'E', 8, NULL, NULL) -}; - -IMPLEMENT_ACTOR (AMaulerTorpedo, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (4) - PROP_SpeedFixed (20) - PROP_RadiusFixed (13) - PROP_HeightFixed (8) - PROP_Damage (1) - PROP_DamageType (NAME_Disintegrate) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_RenderStyle (STYLE_Add) - PROP_SeeSound ("weapons/mauler2fire") - PROP_DeathSound ("weapons/mauler2hit") -END_DEFAULTS - -// The mini torpedoes shot by the big torpedo -------------------------------- - -class AMaulerTorpedoWave : public AActor -{ - DECLARE_ACTOR (AMaulerTorpedoWave, AActor) -}; - -FState AMaulerTorpedoWave::States[] = -{ - S_BRIGHT (TWAV, 'A', 9, NULL, &States[1]), - S_BRIGHT (TWAV, 'B', 9, NULL, &States[2]), - S_BRIGHT (TWAV, 'C', 9, NULL, NULL) -}; - -IMPLEMENT_ACTOR (AMaulerTorpedoWave, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (2) - PROP_SpeedFixed (35) - PROP_RadiusFixed (13) - PROP_HeightFixed (13) - PROP_Damage (10) - PROP_DamageType (NAME_Disintegrate) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT) - PROP_Flags4 (MF4_STRIFEDAMAGE) - PROP_MaxStepHeight (4) - PROP_RenderStyle (STYLE_Add) -END_DEFAULTS - //============================================================================ // // A_FireMauler1 @@ -1433,153 +546,6 @@ AActor *P_SpawnSubMissile (AActor *source, const PClass *type, AActor *target) return NULL; } -// High-Explosive Grenade --------------------------------------------------- - -class AHEGrenade : public AActor -{ - DECLARE_ACTOR (AHEGrenade, AActor) -public: - void PreExplode (); - void GetExplodeParms (int &damage, int &dist, bool &hurtSource); -}; - -FState AHEGrenade::States[] = -{ - S_NORMAL (GRAP, 'A', 3, A_Countdown, &States[1]), - S_NORMAL (GRAP, 'B', 3, A_Countdown, &States[0]), - - S_BRIGHT (BNG4, 'A', 2, A_ExplodeAndAlert, &States[3]), - S_BRIGHT (BNG4, 'B', 3, NULL, &States[4]), - S_BRIGHT (BNG4, 'C', 3, NULL, &States[5]), - S_BRIGHT (BNG4, 'D', 3, NULL, &States[6]), - S_BRIGHT (BNG4, 'E', 3, NULL, &States[7]), - S_BRIGHT (BNG4, 'F', 3, NULL, &States[8]), - S_BRIGHT (BNG4, 'G', 3, NULL, &States[9]), - S_BRIGHT (BNG4, 'H', 3, NULL, &States[10]), - S_BRIGHT (BNG4, 'I', 3, NULL, &States[11]), - S_BRIGHT (BNG4, 'J', 3, NULL, &States[12]), - S_BRIGHT (BNG4, 'K', 3, NULL, &States[13]), - S_BRIGHT (BNG4, 'L', 3, NULL, &States[14]), - S_BRIGHT (BNG4, 'M', 3, NULL, &States[15]), - S_BRIGHT (BNG4, 'N', 3, NULL, NULL) -}; - -IMPLEMENT_ACTOR (AHEGrenade, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (2) - PROP_SpeedFixed (15) - PROP_RadiusFixed (13) - PROP_HeightFixed (13) - PROP_Mass (20) - PROP_Damage (1) - PROP_ReactionTime (30) - PROP_Flags (MF_NOBLOCKMAP|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT|MF2_DOOMBOUNCE) - PROP_Flags3 (MF3_CANBOUNCEWATER) - PROP_Flags4 (MF4_STRIFEDAMAGE|MF4_NOBOUNCESOUND) - PROP_Flags5 (MF5_BOUNCEONACTORS|MF5_EXPLODEONWATER) - PROP_MaxStepHeight (4) - PROP_StrifeType (106) - PROP_BounceFactor((FRACUNIT*5/10)) - PROP_BounceCount(2) - PROP_SeeSound ("weapons/hegrenadeshoot") - PROP_DeathSound ("weapons/hegrenadebang") -END_DEFAULTS - -void AHEGrenade::PreExplode () -{ - RenderStyle = STYLE_Add; - flags |= MF_NOGRAVITY; -} - -void AHEGrenade::GetExplodeParms (int &damage, int &dist, bool &hurtSource) -{ - damage = dist = 192; - hurtSource = true; -} - -// White Phosphorous Grenade ------------------------------------------------ - -void A_SpawnBurn (AActor *); - -class APhosphorousGrenade : public AActor -{ - DECLARE_ACTOR (APhosphorousGrenade, AActor) -}; - -FState APhosphorousGrenade::States[] = -{ - S_NORMAL (GRIN, 'A', 3, A_Countdown, &States[1]), - S_NORMAL (GRIN, 'B', 3, A_Countdown, &States[0]), - - S_BRIGHT (BNG3, 'A', 2, A_SpawnBurn, NULL) -}; - -IMPLEMENT_ACTOR (APhosphorousGrenade, Strife, -1, 0) - PROP_SpawnState (0) - PROP_DeathState (2) - PROP_SpeedFixed (15) - PROP_RadiusFixed (13) - PROP_HeightFixed (13) - PROP_Mass (20) - PROP_Damage (1) - PROP_ReactionTime (40) - PROP_Flags (MF_NOBLOCKMAP|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT|MF2_PCROSS|MF2_IMPACT|MF2_DOOMBOUNCE) - PROP_Flags3 (MF3_CANBOUNCEWATER) - PROP_Flags4 (MF4_STRIFEDAMAGE|MF4_NOBOUNCESOUND) - PROP_Flags5 (MF5_BOUNCEONACTORS|MF5_EXPLODEONWATER) - PROP_MaxStepHeight (4) - PROP_StrifeType (107) - PROP_BounceFactor((FRACUNIT*5/10)) - PROP_BounceCount(2) - PROP_SeeSound ("weapons/phgrenadeshoot") - PROP_DeathSound ("weapons/phgrenadebang") -END_DEFAULTS - -// Fire from the Phoshorous Grenade ----------------------------------------- - -void A_Burnination (AActor *self); - -class APhosphorousFire : public AActor -{ - DECLARE_ACTOR (APhosphorousFire, AActor) -public: - int DoSpecialDamage (AActor *target, int damage); -}; - -void A_BurnArea (AActor *); - -FState APhosphorousFire::States[] = -{ -#define S_BURNINATION 0 - S_BRIGHT (BNG3, 'B', 2, A_BurnArea, &States[S_BURNINATION+1]), - S_BRIGHT (BNG3, 'C', 2, A_Countdown, &States[S_BURNINATION+2]), - S_BRIGHT (FLBE, 'A', 2, A_Burnination, &States[S_BURNINATION+3]), - S_BRIGHT (FLBE, 'B', 2, A_Countdown, &States[S_BURNINATION+4]), - S_BRIGHT (FLBE, 'C', 2, A_BurnArea, &States[S_BURNINATION+5]), - S_BRIGHT (FLBE, 'D', 3, A_Countdown, &States[S_BURNINATION+6]), - S_BRIGHT (FLBE, 'E', 3, A_BurnArea, &States[S_BURNINATION+7]), - S_BRIGHT (FLBE, 'F', 3, A_Countdown, &States[S_BURNINATION+8]), - S_BRIGHT (FLBE, 'G', 3, A_Burnination, &States[S_BURNINATION+5]), - -#define S_BURNDWINDLE (S_BURNINATION+9) - S_BRIGHT (FLBE, 'H', 2, NULL, &States[S_BURNDWINDLE+1]), - S_BRIGHT (FLBE, 'I', 2, A_Burnination, &States[S_BURNDWINDLE+2]), - S_BRIGHT (FLBE, 'J', 2, NULL, &States[S_BURNDWINDLE+3]), - S_BRIGHT (FLBE, 'K', 2, NULL, NULL), -}; - -IMPLEMENT_ACTOR (APhosphorousFire, Strife, -1, 0) - PROP_SpawnState (S_BURNINATION) - PROP_DeathState (S_BURNDWINDLE) - PROP_ReactionTime (120) - PROP_DamageType (NAME_Fire) - PROP_Flags (MF_NOBLOCKMAP) - PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT|MF2_NODMGTHRUST) - PROP_RenderStyle (STYLE_Add) -END_DEFAULTS - int APhosphorousFire::DoSpecialDamage (AActor *target, int damage) { if (target->flags & MF_NOBLOOD) @@ -1589,11 +555,6 @@ int APhosphorousFire::DoSpecialDamage (AActor *target, int damage) return Super::DoSpecialDamage (target, damage); } -void A_SpawnBurn (AActor *self) -{ - Spawn (self->x, self->y, self->z, ALLOW_REPLACE); -} - void A_BurnArea (AActor *self) { P_RadiusAttack (self, self->target, 128, 128, self->DamageType, true); @@ -1654,111 +615,6 @@ void A_Burnination (AActor *self) } } -// High-Explosive Grenade Launcher ------------------------------------------ - -void A_FireGrenade (AActor *); - -class AStrifeGrenadeLauncher : public AStrifeWeapon -{ - DECLARE_ACTOR (AStrifeGrenadeLauncher, AStrifeWeapon) -}; - -FState AStrifeGrenadeLauncher::States[] = -{ -#define S_HEPICKUP 0 - S_NORMAL (GRND, 'A', -1, NULL, NULL), - -#define S_HEGRENADE (S_HEPICKUP+1) - S_NORMAL (GREN, 'A', 1, A_WeaponReady, &States[S_HEGRENADE]), - -#define S_HEGRENADE_DOWN (S_HEGRENADE+1) - S_NORMAL (GREN, 'A', 1, A_Lower, &States[S_HEGRENADE_DOWN]), - -#define S_HEGRENADE_UP (S_HEGRENADE_DOWN+1) - S_NORMAL (GREN, 'A', 1, A_Raise, &States[S_HEGRENADE_UP]), - -#define S_HEGRENADE_ATK (S_HEGRENADE_UP+1) - S_NORMAL (GREN, 'A', 5, A_FireGrenade, &States[S_HEGRENADE_ATK+1]), - S_NORMAL (GREN, 'B', 10, NULL, &States[S_HEGRENADE_ATK+2]), - S_NORMAL (GREN, 'A', 5, A_FireGrenade, &States[S_HEGRENADE_ATK+3]), - S_NORMAL (GREN, 'C', 10, NULL, &States[S_HEGRENADE_ATK+4]), - S_NORMAL (GREN, 'A', 0, A_ReFire, &States[S_HEGRENADE]), - -#define S_HEGRENADE_FLASH (S_HEGRENADE_ATK+5) - S_BRIGHT (GREF, 'A', 5, A_Light1, &AWeapon::States[S_LIGHTDONE]), - S_NORMAL (GREF, 'A', 10, A_Light0, &AWeapon::States[S_LIGHTDONE]), - S_BRIGHT (GREF, 'B', 5, A_Light2, &AWeapon::States[S_LIGHTDONE]), - - -#define S_PHGRENADE (S_HEGRENADE_FLASH+3) - S_NORMAL (GREN, 'D', 1, A_WeaponReady, &States[S_PHGRENADE]), - -#define S_PHGRENADE_DOWN (S_PHGRENADE+1) - S_NORMAL (GREN, 'D', 1, A_Lower, &States[S_PHGRENADE_DOWN]), - -#define S_PHGRENADE_UP (S_PHGRENADE_DOWN+1) - S_NORMAL (GREN, 'D', 1, A_Raise, &States[S_PHGRENADE_UP]), - -#define S_PHGRENADE_ATK (S_PHGRENADE_UP+1) - S_NORMAL (GREN, 'D', 5, A_FireGrenade, &States[S_PHGRENADE_ATK+1]), - S_NORMAL (GREN, 'E', 10, NULL, &States[S_PHGRENADE_ATK+2]), - S_NORMAL (GREN, 'D', 5, A_FireGrenade, &States[S_PHGRENADE_ATK+3]), - S_NORMAL (GREN, 'F', 10, NULL, &States[S_PHGRENADE_ATK+4]), - S_NORMAL (GREN, 'A', 0, A_ReFire, &States[S_PHGRENADE]), - -#define S_PHGRENADE_FLASH (S_PHGRENADE_ATK+5) - S_BRIGHT (GREF, 'C', 5, A_Light1, &AWeapon::States[S_LIGHTDONE]), - S_NORMAL (GREF, 'C', 10, A_Light0, &AWeapon::States[S_LIGHTDONE]), - S_BRIGHT (GREF, 'D', 5, A_Light2, &AWeapon::States[S_LIGHTDONE]), -}; - -IMPLEMENT_ACTOR (AStrifeGrenadeLauncher, Strife, 154, 0) - PROP_Flags (MF_SPECIAL) - PROP_Flags2 (MF2_FLOORCLIP) - PROP_SpawnState (S_HEPICKUP) - PROP_StrifeType (195) - PROP_StrifeTeaserType (189) - PROP_StrifeTeaserType2 (193) - - PROP_Weapon_SelectionOrder (2400) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (12) - PROP_Weapon_UpState (S_HEGRENADE_UP) - PROP_Weapon_DownState (S_HEGRENADE_DOWN) - PROP_Weapon_ReadyState (S_HEGRENADE) - PROP_Weapon_AtkState (S_HEGRENADE_ATK) - PROP_Weapon_FlashState (S_HEGRENADE_FLASH) - PROP_Weapon_MoveCombatDist (18350080) - PROP_Weapon_AmmoType1 ("HEGrenadeRounds") - PROP_Weapon_SisterType ("StrifeGrenadeLauncher2") - PROP_Weapon_ProjectileType ("HEGrenade") - - PROP_Inventory_Icon ("GRNDA0") - PROP_Tag ("Grenade_launcher") - PROP_Inventory_PickupMessage("$TXT_GLAUNCHER") -END_DEFAULTS - -// White Phosphorous Grenade Launcher --------------------------------------- - -class AStrifeGrenadeLauncher2 : public AStrifeGrenadeLauncher -{ - DECLARE_STATELESS_ACTOR (AStrifeGrenadeLauncher2, AStrifeGrenadeLauncher) -}; - -IMPLEMENT_STATELESS_ACTOR (AStrifeGrenadeLauncher2, Strife, -1, 0) - PROP_Weapon_SelectionOrder (3200) - PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (0) - PROP_Weapon_UpState (S_PHGRENADE_UP) - PROP_Weapon_DownState (S_PHGRENADE_DOWN) - PROP_Weapon_ReadyState (S_PHGRENADE) - PROP_Weapon_AtkState (S_PHGRENADE_ATK) - PROP_Weapon_FlashState (S_PHGRENADE_FLASH) - PROP_Weapon_AmmoType1 ("PhosphorusGrenadeRounds") - PROP_Weapon_SisterType ("StrifeGrenadeLauncher") - PROP_Weapon_ProjectileType ("PhosphorousGrenade") -END_DEFAULTS - //============================================================================ // // A_FireGrenade @@ -1774,26 +630,27 @@ void A_FireGrenade (AActor *self) fixed_t tworadii; AWeapon *weapon; + int index=CheckIndex(3); + if (index<0) return; + + ENamedName MissileName=(ENamedName)StateParameters[index]; + angle_t Angle=angle_t(EvalExpressionF (StateParameters[index+1], self) * ANGLE_1); + if (player == NULL) return; if ((weapon = player->ReadyWeapon) == NULL) return; - if (weapon->GetClass() == RUNTIME_CLASS(AStrifeGrenadeLauncher)) - { - grenadetype = RUNTIME_CLASS(AHEGrenade); - } - else - { - grenadetype = RUNTIME_CLASS(APhosphorousGrenade); - } + grenadetype = PClass::FindClass(MissileName); + if (!weapon->DepleteAmmo (weapon->bAltFire)) return; // Make it flash - P_SetPsprite (player, ps_flash, weapon->FindState(NAME_Flash) + - (player->psprites[ps_weapon].state - weapon->GetAtkState(false))); + FState *jumpto = P_GetState(weapon, NULL, StateParameters[index + 2]); + + P_SetPsprite (player, ps_flash, jumpto); self->z += 32*FRACUNIT; grenade = P_SpawnSubMissile (self, grenadetype, self); @@ -1813,14 +670,7 @@ void A_FireGrenade (AActor *self) grenade->x += FixedMul (finecosine[an], tworadii); grenade->y += FixedMul (finesine[an], tworadii); - if (weapon->GetAtkState(false) == player->psprites[ps_weapon].state) - { - an = self->angle - ANGLE_90; - } - else - { - an = self->angle + ANGLE_90; - } + an = self->angle + Angle; an >>= ANGLETOFINESHIFT; grenade->x += FixedMul (finecosine[an], 15*FRACUNIT); grenade->y += FixedMul (finesine[an], 15*FRACUNIT); diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index a61ad2b8cc..243b3e182e 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -414,6 +414,7 @@ FState *P_GetState(AActor *self, FState *CallingState, int offset) } else if (offset>0) { + if (CallingState == NULL) return NULL; return CallingState + offset; } else if (self != NULL) diff --git a/wadsrc/static/actors/hexen/fighteraxe.txt b/wadsrc/static/actors/hexen/fighteraxe.txt new file mode 100644 index 0000000000..78cbbf0a3b --- /dev/null +++ b/wadsrc/static/actors/hexen/fighteraxe.txt @@ -0,0 +1,113 @@ + +// The Fighter's Axe -------------------------------------------------------- + +ACTOR FWeapAxe : FighterWeapon 8010 native +{ + Game Hexen + SpawnID 27 + Weapon.SelectionOrder 1500 + +WEAPON.AXEBLOOD +WEAPON.AMMO_OPTIONAL +WEAPON.MELEEWEAPON + Weapon.AmmoUse1 2 + Weapon.AmmoGive1 25 + Weapon.KickBack 150 + Weapon.YAdjust -12 + Weapon.AmmoType1 "Mana1" + Inventory.PickupMessage "$TXT_WEAPON_F2" + + action native A_FAxeCheckUp(); + action native A_FAxeCheckReady(); + action native A_FAxeCheckAtk(); + action native A_FAxeAttack(); + action native A_FAxeCheckUpG(); + action native A_FAxeCheckReadyG(); + + States + { + Spawn: + WFAX A -1 + Stop + Select: + FAXE A 1 A_FAxeCheckUp + Loop + Deselect: + FAXE A 1 A_Lower + Loop + Ready: + FAXE A 1 A_FAxeCheckReady + Loop + Fire: + FAXE B 4 Offset (15, 32) A_FAxeCheckAtk + FAXE C 3 Offset (15, 32) + FAXE D 2 Offset (15, 32) + FAXE D 1 Offset (-5, 70) A_FAxeAttack + FAXE D 2 Offset (-25, 90) + FAXE E 1 Offset (15, 32) + FAXE E 2 Offset (10, 54) + FAXE E 7 Offset (10, 150) + FAXE A 1 Offset (0, 60) A_ReFire + FAXE A 1 Offset (0, 52) + FAXE A 1 Offset (0, 44) + FAXE A 1 Offset (0, 36) + FAXE A 1 + Goto Ready + SelectGlow: + FAXE L 1 A_FAxeCheckUpG + Loop + DeselectGlow: + FAXE L 1 A_Lower + Loop + ReadyGlow: + FAXE LLL 1 A_FAxeCheckReadyG + FAXE MMM 1 A_FAxeCheckReadyG + Loop + FireGlow: + FAXE N 4 Offset (15, 32) + FAXE O 3 Offset (15, 32) + FAXE P 2 Offset (15, 32) + FAXE P 1 Offset (-5, 70) A_FAxeAttack + FAXE P 2 Offset (-25, 90) + FAXE Q 1 Offset (15, 32) + FAXE Q 2 Offset (10, 54) + FAXE Q 7 Offset (10, 150) + FAXE A 1 Offset (0, 60) A_ReFire + FAXE A 1 Offset (0, 52) + FAXE A 1 Offset (0, 44) + FAXE A 1 Offset (0, 36) + FAXE A 1 + Goto ReadyGlow + } +} + +// Axe Puff ----------------------------------------------------------------- + +ACTOR AxePuff +{ + +NOBLOCKMAP +NOGRAVITY + +PUFFONACTORS + RenderStyle Translucent + Alpha 0.6 + SeeSound "FighterAxeHitThing" + AttackSound "FighterHammerHitWall" + ActiveSound "FighterHammerMiss" + States + { + Spawn: + FHFX STUVW 4 + Stop + } +} + +// Glowing Axe Puff --------------------------------------------------------- + +ACTOR AxePuffGlow : AxePuff +{ + +PUFFONACTORS + RenderStyle Add + Alpha 1 + States + { + Spawn: + FAXE RSTUVWX 4 Bright + Stop + } +} diff --git a/wadsrc/static/actors/hexen/fighterfist.txt b/wadsrc/static/actors/hexen/fighterfist.txt new file mode 100644 index 0000000000..b67f531241 --- /dev/null +++ b/wadsrc/static/actors/hexen/fighterfist.txt @@ -0,0 +1,62 @@ + +// Fist (first weapon) ------------------------------------------------------ + +ACTOR FWeapFist : FighterWeapon +{ + +BLOODSPLATTER + Weapon.SelectionOrder 3400 + +WEAPON.MELEEWEAPON + Weapon.KickBack 150 + + action native A_FPunchAttack(); + + States + { + Select: + FPCH A 1 A_Raise + Loop + Deselect: + FPCH A 1 A_Lower + Loop + Ready: + FPCH A 1 A_WeaponReady + Loop + Fire: + FPCH B 5 Offset (5, 40) + FPCH C 4 Offset (5, 40) + FPCH D 4 Offset (5, 40) A_FPunchAttack + FPCH C 4 Offset (5, 40) + FPCH B 5 Offset (5, 40) A_ReFire + Goto Ready + Fire2: + FPCH DE 4 Offset (5, 40) + FPCH E 1 Offset (15, 50) + FPCH E 1 Offset (25, 60) + FPCH E 1 Offset (35, 70) + FPCH E 1 Offset (45, 80) + FPCH E 1 Offset (55, 90) + FPCH E 1 Offset (65, 90) + FPCH E 10 Offset (0, 150) + Goto Ready + } +} + +// Punch puff --------------------------------------------------------------- + +ACTOR PunchPuff +{ + +NOBLOCKMAP +NOGRAVITY + +PUFFONACTORS + RenderStyle Translucent + Alpha 0.6 + SeeSound "FighterPunchHitThing" + AttackSound "FighterPunchHitWall" + ActiveSound "FighterPunchMiss" + VSpeed 1 + States + { + Spawn: + FHFX STUVW 4 + Stop + } +} diff --git a/wadsrc/static/actors/hexen/fighterhammer.txt b/wadsrc/static/actors/hexen/fighterhammer.txt new file mode 100644 index 0000000000..455b6c17b4 --- /dev/null +++ b/wadsrc/static/actors/hexen/fighterhammer.txt @@ -0,0 +1,102 @@ + +// The Fighter's Hammer ----------------------------------------------------- + +ACTOR FWeapHammer : FighterWeapon 123 +{ + Game Hexen + SpawnID 28 + +BLOODSPLATTER + Weapon.SelectionOrder 900 + +WEAPON.AMMO_OPTIONAL +WEAPON.MELEEWEAPON + Weapon.AmmoUse1 3 + Weapon.AmmoGive1 25 + Weapon.KickBack 150 + Weapon.YAdjust -10 + Weapon.AmmoType1 "Mana2" + Inventory.PickupMessage "$TXT_WEAPON_F3" + + action native A_FHammerAttack(); + action native A_FHammerThrow(); + + States + { + Spawn: + WFHM A -1 + Stop + Select: + FHMR A 1 A_Raise + Loop + Deselect: + FHMR A 1 A_Lower + Loop + Ready: + FHMR A 1 A_WeaponReady + Loop + Fire: + FHMR B 6 Offset (5, 0) + FHMR C 3 Offset (5, 0) A_FHammerAttack + FHMR D 3 Offset (5, 0) + FHMR E 2 Offset (5, 0) + FHMR E 10 Offset (5, 150) A_FHammerThrow + FHMR A 1 Offset (0, 60) + FHMR A 1 Offset (0, 55) + FHMR A 1 Offset (0, 50) + FHMR A 1 Offset (0, 45) + FHMR A 1 Offset (0, 40) + FHMR A 1 Offset (0, 35) + FHMR A 1 + Goto Ready + } +} + +// Hammer Missile ----------------------------------------------------------- + +ACTOR HammerMissile +{ + Speed 25 + Radius 14 + Height 20 + Damage 10 + DamageType "Fire" + Projectile + DeathSound "FighterHammerExplode" + + action native A_BeAdditive(); + + States + { + Spawn: + FHFX A 2 Bright + FHFX B 2 Bright A_PlaySound ("FighterHammerContinuous") + FHFX CDEFGH 2 Bright + Loop + Death: + FHFX I 3 Bright A_BeAdditive + FHFX J 3 Bright + FHFX K 3 Bright A_Explode (128, 128, 0) + FHFX LM 3 Bright + FHFX N 3 + FHFX OPQR 3 Bright + Stop + } +} + +// Hammer Puff (also used by fist) ------------------------------------------ + +ACTOR HammerPuff +{ + +NOBLOCKMAP +NOGRAVITY + +PUFFONACTORS + RenderStyle "Translucent" + Alpha 0.6 + VSpeed 0.8 + SeeSound "FighterHammerHitThing" + AttackSound "FighterHammerHitWall" + ActiveSound "FighterHammerMiss" + States + { + Spawn: + FHFX STUVW 4 + Stop + } +} diff --git a/wadsrc/static/actors/hexen/fighterquietus.txt b/wadsrc/static/actors/hexen/fighterquietus.txt new file mode 100644 index 0000000000..512c2c9e76 --- /dev/null +++ b/wadsrc/static/actors/hexen/fighterquietus.txt @@ -0,0 +1,163 @@ + +// Fighter Weapon Piece ----------------------------------------------------- + +ACTOR FighterWeaponPiece : FourthWeaponPiece native +{ + Inventory.PickupMessage "$TXT_QUIETUS_PIECE" +} + +// Fighter Weapon Piece 1 --------------------------------------------------- + +ACTOR FWeaponPiece1 : FighterWeaponPiece 12 native +{ + Game Hexen + SpawnID 29 + +FLOATBOB + States + { + Spawn: + WFR1 A -1 Bright + Stop + } +} + +// Fighter Weapon Piece 2 --------------------------------------------------- + +ACTOR FWeaponPiece2 : FighterWeaponPiece 13 native +{ + Game Hexen + SpawnID 30 + +FLOATBOB + States + { + Spawn: + WFR2 A -1 Bright + Stop + } +} + +// Fighter Weapon Piece 3 --------------------------------------------------- + +ACTOR FWeaponPiece3 : FighterWeaponPiece 16 native +{ + Game Hexen + SpawnID 31 + +FLOATBOB + States + { + Spawn: + WFR3 A -1 Bright + Stop + } +} + +// Quietus Drop ------------------------------------------------------------- + +ACTOR QuietusDrop +{ + action native A_DropQuietusPieces(); + + States + { + Spawn: + TNT1 A 1 + TNT1 A 1 A_DropQuietusPieces + Stop + } +} + +// The Fighter's Sword (Quietus) -------------------------------------------- + +ACTOR FWeapQuietus : FighterWeapon +{ + Weapon.SelectionOrder 2900 + +WEAPON.PRIMARY_USES_BOTH + Weapon.AmmoUse1 14 + Weapon.AmmoUse2 14 + Weapon.AmmoGive1 0 + Weapon.AmmoGive2 0 + Weapon.KickBack 150 + Weapon.YAdjust 10 + Weapon.AmmoType1 "Mana1" + Weapon.AmmoType2 "Mana2" + Inventory.PickupMessage "$TXT_WEAPON_F4" + + action native A_FSwordAttack(); + + States + { + Spawn: + TNT1 A -1 + Stop + Select: + FSRD A 1 Bright A_Raise + Loop + Deselect: + FSRD A 1 Bright A_Lower + Loop + Ready: + FSRD AAAABBBBCCCC 1 Bright A_WeaponReady + Loop + Fire: + FSRD DE 3 Bright Offset (5, 36) + FSRD F 2 Bright Offset (5, 36) + FSRD G 3 Bright Offset (5, 36) A_FSwordAttack + FSRD H 2 Bright Offset (5, 36) + FSRD I 2 Bright Offset (5, 36) + FSRD I 10 Bright Offset (5, 150) + FSRD A 1 Bright Offset (5, 60) + FSRD B 1 Bright Offset (5, 55) + FSRD C 1 Bright Offset (5, 50) + FSRD A 1 Bright Offset (5, 45) + FSRD B 1 Bright Offset (5, 40) + Goto Ready + } +} + +// Fighter Sword Missile ---------------------------------------------------- + +ACTOR FSwordMissile native +{ + Speed 30 + Radius 16 + Height 8 + Damage 8 + Projectile + +EXTREMEDEATH + RenderStyle Add + DeathSound "FighterSwordExplode" + + action native A_FSwordFlames(); + + States + { + Spawn: + FSFX ABC 3 Bright + Loop + Death: + FSFX D 4 Bright + FSFX E 3 Bright A_FSwordFlames + FSFX F 4 Bright A_Explode (64, 128, 0) + FSFX G 3 Bright + FSFX H 4 Bright + FSFX I 3 Bright + FSFX J 4 Bright + FSFX KLM 3 Bright + Stop + } +} + +// Fighter Sword Flame ------------------------------------------------------ + +ACTOR FSwordFlame +{ + +NOBLOCKMAP +NOGRAVITY + RenderStyle Translucent + Alpha 0.6 + States + { + Spawn: + FSFX NOPQRSTUVW 3 Bright + Stop + } +} diff --git a/wadsrc/static/decorate.txt b/wadsrc/static/decorate.txt index 37bc8050f6..b4ad0308c5 100644 --- a/wadsrc/static/decorate.txt +++ b/wadsrc/static/decorate.txt @@ -101,6 +101,10 @@ #include "actors/hexen/magecone.txt" #include "actors/hexen/magelightning.txt" #include "actors/hexen/magestaff.txt" +#include "actors/hexen/fighterfist.txt" +#include "actors/hexen/fighteraxe.txt" +#include "actors/hexen/fighterhammer.txt" +#include "actors/hexen/fighterquietus.txt" #include "actors/strife/strifehumanoid.txt" #include "actors/strife/strifeplayer.txt"