From 81132c809fccba7c5c502183b91ba7702e548511 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Aug 2008 19:18:48 +0000 Subject: [PATCH] - DECORATE related Hexen fixes. SVN r1153 (trunk) --- src/g_hexen/a_clericstaff.cpp | 6 --- src/g_hexen/a_firedemon.cpp | 37 ++++++-------- src/g_hexen/a_fog.cpp | 8 +-- src/g_hexen/a_heresiarch.cpp | 54 ++++++++++---------- src/g_hexen/a_magelightning.cpp | 2 +- src/g_hexen/a_pig.cpp | 2 +- src/g_hexen/a_spike.cpp | 5 +- wadsrc/static/actors/hexen/clericboss.txt | 1 - wadsrc/static/actors/hexen/clericflame.txt | 6 +-- wadsrc/static/actors/hexen/fighterboss.txt | 1 - wadsrc/static/actors/hexen/firedemon.txt | 1 - wadsrc/static/actors/hexen/flechette.txt | 1 + wadsrc/static/actors/hexen/heresiarch.txt | 16 +++--- wadsrc/static/actors/hexen/korax.txt | 1 - wadsrc/static/actors/hexen/mageboss.txt | 1 - wadsrc/static/actors/hexen/magecone.txt | 3 +- wadsrc/static/actors/hexen/magelightning.txt | 4 +- wadsrc/static/actors/hexen/magestaff.txt | 2 +- wadsrc/static/actors/hexen/pig.txt | 2 + wadsrc/static/actors/hexen/spike.txt | 10 ++++ wadsrc/static/actors/hexen/wraith.txt | 1 - wadsrc/static/actors/raven/minotaur.txt | 2 +- wadsrc/static/actors/strife/acolyte.txt | 1 + 23 files changed, 83 insertions(+), 84 deletions(-) diff --git a/src/g_hexen/a_clericstaff.cpp b/src/g_hexen/a_clericstaff.cpp index f463200a4..48d7c5cc9 100644 --- a/src/g_hexen/a_clericstaff.cpp +++ b/src/g_hexen/a_clericstaff.cpp @@ -15,12 +15,6 @@ static FRandom pr_staffcheck ("CStaffCheck"); static FRandom pr_blink ("CStaffBlink"); -void A_CStaffInitBlink (AActor *actor); -void A_CStaffCheckBlink (AActor *actor); -void A_CStaffCheck (AActor *actor); -void A_CStaffAttack (AActor *actor); -void A_CStaffMissileSlither (AActor *); - // Serpent Staff Missile ---------------------------------------------------- class ACStaffMissile : public AActor diff --git a/src/g_hexen/a_firedemon.cpp b/src/g_hexen/a_firedemon.cpp index fa5b04a0d..b9d24bec8 100644 --- a/src/g_hexen/a_firedemon.cpp +++ b/src/g_hexen/a_firedemon.cpp @@ -21,28 +21,6 @@ static FRandom pr_firedemonsplotch ("FiredSplotch"); // special2 whether strafing or not //============================================================================ -void A_FiredRocks (AActor *); -void A_FiredSpawnRock (AActor *); -void A_SmBounce (AActor *); -void A_FiredChase (AActor *); -void A_FiredAttack (AActor *); -void A_FiredSplotch (AActor *); - -//============================================================================ -// -// A_FiredRocks -// -//============================================================================ - -DEFINE_ACTION_FUNCTION(AActor, A_FiredRocks) -{ - A_FiredSpawnRock (self); - A_FiredSpawnRock (self); - A_FiredSpawnRock (self); - A_FiredSpawnRock (self); - A_FiredSpawnRock (self); -} - //============================================================================ // // A_FiredSpawnRock @@ -93,6 +71,21 @@ void A_FiredSpawnRock (AActor *actor) actor->flags &= ~MF_JUSTATTACKED; } +//============================================================================ +// +// A_FiredRocks +// +//============================================================================ + +DEFINE_ACTION_FUNCTION(AActor, A_FiredRocks) +{ + A_FiredSpawnRock (self); + A_FiredSpawnRock (self); + A_FiredSpawnRock (self); + A_FiredSpawnRock (self); + A_FiredSpawnRock (self); +} + //============================================================================ // // A_SmBounce diff --git a/src/g_hexen/a_fog.cpp b/src/g_hexen/a_fog.cpp index 5770a892d..df7280712 100644 --- a/src/g_hexen/a_fog.cpp +++ b/src/g_hexen/a_fog.cpp @@ -25,11 +25,11 @@ static FRandom pr_fogspawn ("FogSpawn"); DEFINE_ACTION_FUNCTION(AActor, A_FogSpawn) { - static const PClass *fogs[3] = + static const char *fogs[3] = { - PClass::FindClass ("FogPatchSmall"), - PClass::FindClass ("FogPatchMedium"), - PClass::FindClass ("FogPatchLarge") + "FogPatchSmall", + "FogPatchMedium", + "FogPatchLarge" }; AActor *mo=NULL; diff --git a/src/g_hexen/a_heresiarch.cpp b/src/g_hexen/a_heresiarch.cpp index 53c2f1af9..349584a6a 100644 --- a/src/g_hexen/a_heresiarch.cpp +++ b/src/g_hexen/a_heresiarch.cpp @@ -48,11 +48,11 @@ #define BALL2_ANGLEOFFSET (ANGLE_MAX/3) #define BALL3_ANGLEOFFSET ((ANGLE_MAX/3)*2) -DECLARE_ACTION(A_SlowBalls) -DECLARE_ACTION(A_StopBalls) -DECLARE_ACTION(A_AccelBalls) -DECLARE_ACTION(A_DecelBalls) -DECLARE_ACTION(A_SorcOffense2) +void A_SlowBalls (AActor *actor); +void A_StopBalls (AActor *actor); +void A_AccelBalls (AActor *actor); +void A_DecelBalls (AActor *actor); +void A_SorcOffense2 (AActor *actor); void A_DoBounceCheck (AActor *actor, const char *sound); static FRandom pr_heresiarch ("Heresiarch"); @@ -234,7 +234,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcSpinBalls) fixed_t z; self->SpawnState += 2; // [RH] Don't spawn balls again - CALL_ACTION(A_SlowBalls, self); + A_SlowBalls(self); self->args[0] = 0; // Currently no defense self->args[3] = SORC_NORMAL; self->args[4] = SORCBALL_INITIAL_SPEED; // Initial orbit speed @@ -301,12 +301,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcBallOrbit) break; case SORC_DECELERATE: // Balls decelerating - CALL_ACTION(A_DecelBalls, actor); + A_DecelBalls(actor); actor->SorcUpdateBallAngle (); break; case SORC_ACCELERATE: // Balls accelerating - CALL_ACTION(A_AccelBalls, actor); + A_AccelBalls(actor); actor->SorcUpdateBallAngle (); break; @@ -352,7 +352,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcBallOrbit) else { // Do rapid fire spell - CALL_ACTION(A_SorcOffense2, actor); + A_SorcOffense2(actor); } } break; @@ -395,14 +395,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpeedBalls) // // A_SlowBalls // -// Set balls to slow mode - self is sorcerer +// Set balls to slow mode - actor is sorcerer // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_SlowBalls) +void A_SlowBalls(AActor *actor) { - self->args[3] = SORC_DECELERATE; // slow mode - self->args[2] = SORCBALL_INITIAL_SPEED; // target speed + actor->args[3] = SORC_DECELERATE; // slow mode + actor->args[2] = SORCBALL_INITIAL_SPEED; // target speed } //============================================================================ @@ -414,9 +414,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_SlowBalls) // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_StopBalls) +void A_StopBalls(AActor *scary) { - AHeresiarch *actor = static_cast (self); + AHeresiarch *actor = static_cast (scary); int chance = pr_heresiarch(); actor->args[3] = SORC_STOPPING; // stopping mode actor->args[1] = 0; // Reset rotation counter @@ -440,13 +440,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_StopBalls) // // A_AccelBalls // -// Increase ball orbit speed - self is ball +// Increase ball orbit speed - actor is ball // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_AccelBalls) +void A_AccelBalls(AActor *actor) { - AActor *sorc = self->target; + AActor *sorc = actor->target; if (sorc->args[4] < sorc->args[2]) { @@ -458,7 +458,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AccelBalls) if (sorc->args[4] >= SORCBALL_TERMINAL_SPEED) { // Reached terminal velocity - stop balls - CALL_ACTION(A_StopBalls, sorc); + A_StopBalls(sorc); } } } @@ -467,13 +467,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_AccelBalls) // // A_DecelBalls // -// Decrease ball orbit speed - self is ball +// Decrease ball orbit speed - actor is ball // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_DecelBalls) +void A_DecelBalls(AActor *actor) { - AActor *sorc = self->target; + AActor *sorc = actor->target; if (sorc->args[4] > sorc->args[2]) { @@ -640,12 +640,12 @@ void ASorcBall1::CastSorcererSpell () // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_SorcOffense2) +void A_SorcOffense2(AActor *actor) { angle_t ang1; AActor *mo; int delta, index; - AActor *parent = self->target; + AActor *parent = actor->target; AActor *dest = parent->target; int dist; @@ -655,11 +655,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcOffense2) return; } - index = self->args[4] << 5; - self->args[4] += 15; + index = actor->args[4] << 5; + actor->args[4] += 15; delta = (finesine[index])*SORCFX4_SPREAD_ANGLE; delta = (delta>>FRACBITS)*ANGLE_1; - ang1 = self->angle + delta; + ang1 = actor->angle + delta; mo = P_SpawnMissileAngle(parent, PClass::FindClass("SorcFX4"), ang1, 0); if (mo) { diff --git a/src/g_hexen/a_magelightning.cpp b/src/g_hexen/a_magelightning.cpp index 5794e1e31..03a4511bb 100644 --- a/src/g_hexen/a_magelightning.cpp +++ b/src/g_hexen/a_magelightning.cpp @@ -332,7 +332,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LastZap) mo = Spawn (self->x, self->y, self->z, ALLOW_REPLACE); if (mo) { - mo->SetState (mo->FindState ("Death")); + mo->SetState (mo->FindState (NAME_Death)); mo->momz = 40*FRACUNIT; mo->Damage = 0; } diff --git a/src/g_hexen/a_pig.cpp b/src/g_hexen/a_pig.cpp index 95f9c5ac1..2ff019b99 100644 --- a/src/g_hexen/a_pig.cpp +++ b/src/g_hexen/a_pig.cpp @@ -39,7 +39,7 @@ void APigPlayer::MorphPlayerThink () { // Snout sniff if (player->ReadyWeapon != NULL) { - P_SetPspriteNF(player, ps_weapon, player->ReadyWeapon->FindState(NAME_Flash)); + P_SetPsprite(player, ps_weapon, player->ReadyWeapon->FindState("Grunt")); } S_Sound (this, CHAN_VOICE, "PigActive1", 1, ATTN_NORM); // snort return; diff --git a/src/g_hexen/a_spike.cpp b/src/g_hexen/a_spike.cpp index f8524be89..1e9d7f9d8 100644 --- a/src/g_hexen/a_spike.cpp +++ b/src/g_hexen/a_spike.cpp @@ -18,6 +18,7 @@ static FRandom pr_thrustraise ("ThrustRaise"); class AThrustFloor : public AActor { DECLARE_CLASS (AThrustFloor, AActor) + HAS_OBJECT_POINTERS public: void Serialize (FArchive &arc); @@ -27,7 +28,9 @@ public: TObjPtr DirtClump; }; -IMPLEMENT_CLASS (AThrustFloor) +IMPLEMENT_POINTY_CLASS (AThrustFloor) + DECLARE_POINTER (DirtClump) +END_POINTERS void AThrustFloor::Serialize (FArchive &arc) { diff --git a/wadsrc/static/actors/hexen/clericboss.txt b/wadsrc/static/actors/hexen/clericboss.txt index c94b4e39b..3947f6c6d 100644 --- a/wadsrc/static/actors/hexen/clericboss.txt +++ b/wadsrc/static/actors/hexen/clericboss.txt @@ -12,7 +12,6 @@ ACTOR ClericBoss 10101 Monster +FLOORCLIP +TELESTOMP +DONTMORPH - -CANUSEWALLS PainSound "PlayerClericPain" DeathSound "PlayerClericCrazyDeath" Obituary "$OBCBOSS" diff --git a/wadsrc/static/actors/hexen/clericflame.txt b/wadsrc/static/actors/hexen/clericflame.txt index 5b07afa26..0acd89800 100644 --- a/wadsrc/static/actors/hexen/clericflame.txt +++ b/wadsrc/static/actors/hexen/clericflame.txt @@ -121,8 +121,9 @@ ACTOR CircleFlame Radius 6 Damage 2 DamageType "Fire" - +NOBLOCKMAP +NOGRAVITY +DROPOFF +MISSILE - +NOTELEPORT + Projectile + -ACTIVATEIMPACT + -ACTIVATEPCROSS RenderStyle Add DeathSound "ClericFlameCircle" @@ -165,7 +166,6 @@ ACTOR CFlameMissile native DamageType "Fire" Projectile +INVISIBLE - -BLOODSPLATTER RenderStyle Add action native A_CFlamePuff(); diff --git a/wadsrc/static/actors/hexen/fighterboss.txt b/wadsrc/static/actors/hexen/fighterboss.txt index d0832f5dc..1caf10d12 100644 --- a/wadsrc/static/actors/hexen/fighterboss.txt +++ b/wadsrc/static/actors/hexen/fighterboss.txt @@ -13,7 +13,6 @@ ACTOR FighterBoss 10100 +FLOORCLIP +TELESTOMP +DONTMORPH - -CANUSEWALLS PainSound "PlayerFighterPain" DeathSound "PlayerFighterCrazyDeath" Obituary "$OB_FBOSS" diff --git a/wadsrc/static/actors/hexen/firedemon.txt b/wadsrc/static/actors/hexen/firedemon.txt index 31d94dd03..cb29cdb07 100644 --- a/wadsrc/static/actors/hexen/firedemon.txt +++ b/wadsrc/static/actors/hexen/firedemon.txt @@ -16,7 +16,6 @@ ACTOR FireDemon 10060 Monster +DROPOFF +NOGRAVITY +FLOAT +FLOORCLIP +INVULNERABLE +TELESTOMP - -CANUSEWALLS SeeSound "FireDemonSpawn" PainSound "FireDemonPain" DeathSound "FireDemonDeath" diff --git a/wadsrc/static/actors/hexen/flechette.txt b/wadsrc/static/actors/hexen/flechette.txt index e3c50018a..6c77b4a47 100644 --- a/wadsrc/static/actors/hexen/flechette.txt +++ b/wadsrc/static/actors/hexen/flechette.txt @@ -192,6 +192,7 @@ ACTOR ZPoisonShroom : PoisonBag 8104 { Spawn: SHRM A 5 A_PoisonShroom + Goto Pain+1 Pain: SHRM A 6 SHRM B 8 A_Pain diff --git a/wadsrc/static/actors/hexen/heresiarch.txt b/wadsrc/static/actors/hexen/heresiarch.txt index 32e95b91a..23e9c580d 100644 --- a/wadsrc/static/actors/hexen/heresiarch.txt +++ b/wadsrc/static/actors/hexen/heresiarch.txt @@ -25,8 +25,6 @@ ACTOR Heresiarch 10080 native action native A_SorcSpinBalls(); action native A_SpeedBalls(); - action native A_SlowBalls(); - action native A_StopBalls(); action native A_SorcBossAttack(); action native A_SpawnFizzle(); @@ -83,15 +81,12 @@ ACTOR SorcBall native -ACTIVATEPCROSS +FULLVOLDEATH +CANBOUNCEWATER - +NOBOUNCESOUND + +NOWALLBOUNCESND +HEXENBOUNCE SeeSound "SorcererBallBounce" DeathSound "SorcererBigBallExplode" action native A_SorcBallOrbit(); - action native A_AccelBalls(); - action native A_DecelBalls(); - action native A_SorcOffense2(); action native A_SorcBallPop(); action native A_BounceCheck (); } @@ -110,6 +105,7 @@ ACTOR SorcBall1 : SorcBall native SBMP B 2 A_BounceCheck Wait Death: + SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1) SBS4 D 5 A_Explode(255,255) SBS4 E 5 SBS4 FGH 6 @@ -132,6 +128,7 @@ ACTOR SorcBall2 : SorcBall native SBMB B 2 A_BounceCheck Wait Death: + SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1) SBS3 D 5 A_Explode(255,255) SBS3 E 5 SBS3 FGH 6 @@ -153,6 +150,7 @@ ACTOR SorcBall3 : SorcBall native SBMG B 2 A_BounceCheck Wait Death: + SBS4 D 0 A_ChangeFlag("NOBOUNCESOUND", 1) SBS3 D 5 A_Explode(255,255) SBS3 E 5 SBS3 FGH 6 @@ -189,7 +187,7 @@ ACTOR SorcFX1 SBS1 BCD 3 Bright A_SorcFX1Seek Loop Death: - FHFX S 2 Bright A_Explode(30) + FHFX S 2 Bright A_Explode(30, 128) FHFX SS 6 Bright Stop } @@ -275,7 +273,7 @@ ACTOR SorcFX3 ACTOR SorcFX3Explosion { +NOBLOCKMAP - +MISSILE + +NOGRAVITY +NOTELEPORT RenderStyle Translucent Alpha 0.4 @@ -309,7 +307,7 @@ ACTOR SorcFX4 Loop Death: SBS4 D 2 Bright - SBS4 E 2 Bright A_Explode(20) + SBS4 E 2 Bright A_Explode(20, 128) SBS4 FGH 2 Bright Stop } diff --git a/wadsrc/static/actors/hexen/korax.txt b/wadsrc/static/actors/hexen/korax.txt index 48212fd26..3c857df95 100644 --- a/wadsrc/static/actors/hexen/korax.txt +++ b/wadsrc/static/actors/hexen/korax.txt @@ -15,7 +15,6 @@ ACTOR Korax 10200 +DONTMORPH +NOTARGET +NOICEDEATH - +BOSSDEATH SeeSound "KoraxSight" AttackSound "KoraxAttack" PainSound "KoraxPain" diff --git a/wadsrc/static/actors/hexen/mageboss.txt b/wadsrc/static/actors/hexen/mageboss.txt index 0eb78e6a9..7e11d2cd1 100644 --- a/wadsrc/static/actors/hexen/mageboss.txt +++ b/wadsrc/static/actors/hexen/mageboss.txt @@ -12,7 +12,6 @@ ACTOR MageBoss 10102 Monster +FLOORCLIP +TELESTOMP +DONTMORPH - -CANUSEWALLS PainSound "PlayerMagePain" DeathSound "PlayerMageCrazyDeath" Obituary "$OB_MBOSS" diff --git a/wadsrc/static/actors/hexen/magecone.txt b/wadsrc/static/actors/hexen/magecone.txt index 81913a36a..17c7ccf4f 100644 --- a/wadsrc/static/actors/hexen/magecone.txt +++ b/wadsrc/static/actors/hexen/magecone.txt @@ -79,7 +79,8 @@ ACTOR IceShard : FrostMissile Game Hexen SpawnID 65 DamageType "Ice" - +NOTELEPORT + -ACTIVATEIMPACT + -ACTIVATEPCROSS States { Spawn: diff --git a/wadsrc/static/actors/hexen/magelightning.txt b/wadsrc/static/actors/hexen/magelightning.txt index d3412f38d..73907a0de 100644 --- a/wadsrc/static/actors/hexen/magelightning.txt +++ b/wadsrc/static/actors/hexen/magelightning.txt @@ -130,7 +130,9 @@ ACTOR LightningZap native Radius 15 Height 35 Damage 2 - +NOBLOCKMAP +NOGRAVITY +DROPOFF +MISSILE + Projectile + -ACTIVATEIMPACT + -ACTIVATEPCROSS RenderStyle Add action native A_ZapMimic(); diff --git a/wadsrc/static/actors/hexen/magestaff.txt b/wadsrc/static/actors/hexen/magestaff.txt index 3bf0a1a9b..5a288f45d 100644 --- a/wadsrc/static/actors/hexen/magestaff.txt +++ b/wadsrc/static/actors/hexen/magestaff.txt @@ -118,7 +118,7 @@ ACTOR MWeapBloodscourge : MageWeapon native ACTOR MageStaffFX2 native { - Speed 18 + Speed 17 Height 8 Damage 4 DamageType "Fire" diff --git a/wadsrc/static/actors/hexen/pig.txt b/wadsrc/static/actors/hexen/pig.txt index 25ec7277b..eaecd692e 100644 --- a/wadsrc/static/actors/hexen/pig.txt +++ b/wadsrc/static/actors/hexen/pig.txt @@ -60,7 +60,9 @@ ACTOR PigPlayer : PlayerPawn native Radius 16 Height 24 Speed 1 + +WINDTHRUST +NOSKIN + -PICKUP PainSound "PigPain" DeathSound "PigDeath" Player.JumpZ 6 diff --git a/wadsrc/static/actors/hexen/spike.txt b/wadsrc/static/actors/hexen/spike.txt index e36f5a118..13b1a9c9b 100644 --- a/wadsrc/static/actors/hexen/spike.txt +++ b/wadsrc/static/actors/hexen/spike.txt @@ -85,6 +85,11 @@ ACTOR ThrustFloorUp : ThrustFloor 10091 SpawnID 104 +SOLID +NOTELEPORT +FLOORCLIP + States + { + Spawn: + Goto ThrustInit2 + } } // Spike down --------------------------------------------------------------- @@ -95,4 +100,9 @@ ACTOR ThrustFloorDown : ThrustFloor 10090 +NOTELEPORT +FLOORCLIP +INVISIBLE SpawnID 105 + States + { + Spawn: + Goto ThrustInit1 + } } diff --git a/wadsrc/static/actors/hexen/wraith.txt b/wadsrc/static/actors/hexen/wraith.txt index ea2402f71..0472427fc 100644 --- a/wadsrc/static/actors/hexen/wraith.txt +++ b/wadsrc/static/actors/hexen/wraith.txt @@ -14,7 +14,6 @@ ACTOR Wraith 34 Monster +NOGRAVITY +DROPOFF +FLOAT +FLOORCLIP +TELESTOMP - -ACTIVATEIMPACT SeeSound "WraithSight" AttackSound "WraithAttack" PainSound "WraithPain" diff --git a/wadsrc/static/actors/raven/minotaur.txt b/wadsrc/static/actors/raven/minotaur.txt index 5e8b476e3..64a5fee9f 100644 --- a/wadsrc/static/actors/raven/minotaur.txt +++ b/wadsrc/static/actors/raven/minotaur.txt @@ -63,7 +63,7 @@ ACTOR Minotaur 9 native Goto See HammerLoop: MNTR X 12 - Loop + Goto Hammer Charge: MNTR U 2 A_MinotaurCharge Loop diff --git a/wadsrc/static/actors/strife/acolyte.txt b/wadsrc/static/actors/strife/acolyte.txt index c9b8d688f..d19f17752 100644 --- a/wadsrc/static/actors/strife/acolyte.txt +++ b/wadsrc/static/actors/strife/acolyte.txt @@ -12,6 +12,7 @@ ACTOR Acolyte : StrifeHumanoid Monster +SEESDAGGERS +NOSPLASHALERT + +FLOORCLIP MinMissileChance 150 Tag "ACOLYTE" SeeSound "acolyte/sight"