diff options
author | James Haley | 2010-09-08 07:40:16 +0000 |
---|---|---|
committer | James Haley | 2010-09-08 07:40:16 +0000 |
commit | 023964e40ac8804b7efa50b530c7c46a632fe6b8 (patch) | |
tree | c6ce7ae3e3e99a77f0c57dcb0c0369b69444d3d8 | |
parent | 7ebb9ded133a0838d32d69d1ce2f26044e2e5c81 (diff) | |
download | chocolate-doom-023964e40ac8804b7efa50b530c7c46a632fe6b8.tar.gz chocolate-doom-023964e40ac8804b7efa50b530c7c46a632fe6b8.tar.bz2 chocolate-doom-023964e40ac8804b7efa50b530c7c46a632fe6b8.zip |
Numbered most of the sprite enums for easy reference. Added more
comments, and coded P_FreePrisoners, P_DestroyConverter, and
A_ClaxonBlare. Fixed A_Listen (had some order of operations problems).
Subversion-branch: /branches/strife-branch
Subversion-revision: 2044
-rw-r--r-- | src/strife/info.c | 6 | ||||
-rw-r--r-- | src/strife/info.h | 526 | ||||
-rw-r--r-- | src/strife/p_dialog.h | 1 | ||||
-rw-r--r-- | src/strife/p_enemy.c | 198 |
4 files changed, 427 insertions, 304 deletions
diff --git a/src/strife/info.c b/src/strife/info.c index f4790484..fd12f05d 100644 --- a/src/strife/info.c +++ b/src/strife/info.c @@ -145,7 +145,7 @@ void A_ZombieInSpecialSector(); void A_CrystalExplode(); void A_DeathMsg(); void A_ExtraLightOff(); -void A_DeathExplode4(); +void A_CrystalRadiusAtk(); void A_DeathExplode5(); void A_DeathExplode1(); void A_DeathExplode2(); @@ -1389,14 +1389,14 @@ state_t states[NUMSTATES] = /*S_RING_00*/ { SPR_RING, 0, -1, { NULL }, S_NULL }, //1188 /*S_EARS_00*/ { SPR_EARS, 0, -1, { NULL }, S_NULL }, //1189 /*S_COMM_00*/ { SPR_COMM, 0, -1, { NULL }, S_NULL }, //1190 -/*S_BOOM_00*/ { SPR_BOOM, 32768, 1, { A_DeathExplode4 }, S_BOOM_01 }, //1191 +/*S_BOOM_00*/ { SPR_BOOM, 32768, 1, { A_CrystalRadiusAtk }, S_BOOM_01 }, //1191 /*S_BOOM_01*/ { SPR_BOOM, 32769, 3, { A_DeathMsg }, S_BOOM_02 }, //1192 /*S_BOOM_02*/ { SPR_BOOM, 32770, 2, { A_CrystalExplode }, S_BOOM_03 }, //1193 /*S_BOOM_03*/ { SPR_BOOM, 32771, 3, { A_SpawnSparkPuff }, S_BOOM_04 }, //1194 /*S_BOOM_04*/ { SPR_BOOM, 32772, 3, { NULL }, S_BOOM_05 }, //1195 /*S_BOOM_05*/ { SPR_BOOM, 32773, 3, { NULL }, S_BOOM_06 }, //1196 /*S_BOOM_06*/ { SPR_BOOM, 32774, 3, { A_SpawnSparkPuff }, S_BOOM_07 }, //1197 -/*S_BOOM_07*/ { SPR_BOOM, 32775, 1, { A_DeathExplode4 }, S_BOOM_08 }, //1198 +/*S_BOOM_07*/ { SPR_BOOM, 32775, 1, { A_CrystalRadiusAtk }, S_BOOM_08 }, //1198 /*S_BOOM_08*/ { SPR_BOOM, 32776, 3, { NULL }, S_BOOM_09 }, //1199 /*S_BOOM_09*/ { SPR_BOOM, 32777, 3, { A_SpawnSparkPuff }, S_BOOM_10 }, //1200 /*S_BOOM_10*/ { SPR_BOOM, 32778, 3, { A_SpawnSparkPuff }, S_BOOM_11 }, //1201 diff --git a/src/strife/info.h b/src/strife/info.h index d9658a40..dce91e00 100644 --- a/src/strife/info.h +++ b/src/strife/info.h @@ -35,269 +35,269 @@ // villsa [STRIFE] typedef enum { - SPR_PLAY, - SPR_PNCH, - SPR_WAVE, - SPR_RBPY, - SPR_TRGT, - SPR_XBOW, - SPR_MMIS, - SPR_RIFG, - SPR_RIFF, - SPR_FLMT, - SPR_FLMF, - SPR_BLST, - SPR_BLSF, - SPR_GREN, - SPR_GREF, - SPR_SIGH, - SPR_SIGF, - SPR_POW1, - SPR_POW2, - SPR_POW3, - SPR_ZAP1, - SPR_SPRY, - SPR_BLOD, - SPR_PUFY, - SPR_SHT1, - SPR_SHT2, - SPR_GRIN, - SPR_GRAP, - SPR_UBAM, - SPR_BNG2, - SPR_BNG4, - SPR_BNG3, - SPR_FLBE, - SPR_XPRK, - SPR_OCLW, - SPR_CCLW, - SPR_TEND, - SPR_MICR, - SPR_MISS, - SPR_AROW, - SPR_ARWP, - SPR_TORP, - SPR_THIT, - SPR_TWAV, - SPR_MISL, - SPR_TFOG, - SPR_IFOG, - SPR_SHRD, - SPR_RGIB, - SPR_MRYS, - SPR_MRNO, - SPR_MRST, - SPR_MRLK, - SPR_MRBD, - SPR_MRPN, - SPR_MRGT, - SPR_BURN, - SPR_DISR, - SPR_PEAS, - SPR_GIBS, - SPR_AGRD, - SPR_ARMR, - SPR_SACR, - SPR_TNK1, - SPR_TNK2, - SPR_TNK3, - SPR_TNK4, - SPR_TNK5, - SPR_TNK6, - SPR_NEAL, - SPR_BEGR, - SPR_HMN1, - SPR_LEDR, - SPR_LEAD, - SPR_ROB1, - SPR_PGRD, - SPR_ROB2, - SPR_MLDR, - SPR_ORCL, - SPR_PRST, - SPR_PDED, - SPR_ALN1, - SPR_AL1P, - SPR_NODE, - SPR_MTHD, - SPR_MNAM, - SPR_MNAL, - SPR_MDTH, - SPR_NEST, - SPR_PODD, - SPR_ZAP6, - SPR_ZOT3, - SPR_ZAP7, - SPR_ZOT1, - SPR_ZAP5, - SPR_ZOT2, - SPR_SEWR, - SPR_SPID, - SPR_ROB3, - SPR_RBB3, - SPR_PRGR, - SPR_BASE, - SPR_FRBL, - SPR_KLAX, - SPR_TURT, - SPR_BALL, - SPR_PSTN, - SPR_SECR, - SPR_TARG, - SPR_RING, - SPR_EARS, - SPR_COMM, - SPR_BOOM, - SPR_RATT, - SPR_HOGN, - SPR_DEAD, - SPR_SBAN, - SPR_BOTR, - SPR_HATR, - SPR_TOPR, - SPR_COUP, - SPR_BUBB, - SPR_BUBF, - SPR_BUBC, - SPR_ASPR, - SPR_SPDL, - SPR_TOKN, - SPR_OTOK, - SPR_HELT, - SPR_GUNT, - SPR_FULL, - SPR_MEAT, - SPR_JUNK, - SPR_FFOT, - SPR_DIE1, - SPR_BEAC, - SPR_ARM1, - SPR_ARM2, - SPR_BARW, - SPR_BART, - SPR_LAMP, - SPR_LANT, - SPR_BARL, - SPR_BOWL, - SPR_BRAZ, - SPR_TRCH, - SPR_LTRH, - SPR_LMPC, - SPR_LOGS, - SPR_TRHO, - SPR_WATR, - SPR_MUGG, - SPR_FUSL, - SPR_CRD1, - SPR_CRD2, - SPR_TPAS, - SPR_KY1G, - SPR_KY2S, - SPR_KY3B, - SPR_HAND, - SPR_CRYS, - SPR_PRIS, - SPR_PWR1, - SPR_PWR2, - SPR_PWR3, - SPR_ORAC, - SPR_GYID, - SPR_FUBR, - SPR_WARE, - SPR_RCRY, - SPR_BCRY, - SPR_CHAP, - SPR_TUNL, - SPR_BLTK, - SPR_SECK, - SPR_MINE, - SPR_REBL, - SPR_PROC, - SPR_ANKH, - SPR_GOID, - SPR_STMP, - SPR_MDKT, - SPR_COIN, - SPR_CRED, - SPR_SACK, - SPR_CHST, - SPR_SHD1, - SPR_MASK, - SPR_UNIF, - SPR_OFIC, - SPR_PMAP, - SPR_PMUP, - SPR_BLIT, - SPR_BBOX, - SPR_MSSL, - SPR_ROKT, - SPR_BRY1, - SPR_CPAC, - SPR_PQRL, - SPR_XQRL, - SPR_GRN1, - SPR_GRN2, - SPR_BKPK, - SPR_RELC, - SPR_RIFL, - SPR_FLAM, - SPR_BFLM, - SPR_MMSL, - SPR_TRPD, - SPR_GRND, - SPR_CBOW, - SPR_SIGL, - SPR_LITE, - SPR_CNDL, - SPR_CLBR, - SPR_LITS, - SPR_LITB, - SPR_LITG, - SPR_ROK1, - SPR_ROK2, - SPR_ROK3, - SPR_ROK4, - SPR_LOGG, - SPR_RUB1, - SPR_RUB2, - SPR_RUB3, - SPR_RUB4, - SPR_RUB5, - SPR_RUB6, - SPR_RUB7, - SPR_RUB8, - SPR_CHAN, - SPR_STAT, - SPR_DSTA, - SPR_CRAB, - SPR_CAGE, - SPR_TREE, - SPR_TRE1, - SPR_BUSH, - SPR_SHRB, - SPR_STAK, - SPR_BAR1, - SPR_VASE, - SPR_STOL, - SPR_POT1, - SPR_TUB1, - SPR_ANVL, - SPR_TLMP, - SPR_TRAY, - SPR_APOW, - SPR_AFED, - SPR_DRIP, - SPR_CDRP, - SPR_SPLH, - SPR_WTFT, - SPR_HERT, - SPR_TELP, - SPR_MONI, - SPR_STEL, - SPR_STLA, - SPR_STLE, - SPR_HUGE, - SPR_STLG, + SPR_PLAY, // 0 + SPR_PNCH, // 1 + SPR_WAVE, // 2 + SPR_RBPY, // 3 + SPR_TRGT, // 4 + SPR_XBOW, // 5 + SPR_MMIS, // 6 + SPR_RIFG, // 7 + SPR_RIFF, // 8 + SPR_FLMT, // 9 + SPR_FLMF, // 10 + SPR_BLST, // 11 + SPR_BLSF, // 12 + SPR_GREN, // 13 + SPR_GREF, // 14 + SPR_SIGH, // 15 + SPR_SIGF, // 16 + SPR_POW1, // 17 + SPR_POW2, // 18 + SPR_POW3, // 19 + SPR_ZAP1, // 20 + SPR_SPRY, // 21 + SPR_BLOD, // 22 + SPR_PUFY, // 23 + SPR_SHT1, // 24 + SPR_SHT2, // 25 + SPR_GRIN, // 26 + SPR_GRAP, // 27 + SPR_UBAM, // 28 + SPR_BNG2, // 29 + SPR_BNG4, // 30 + SPR_BNG3, // 31 + SPR_FLBE, // 32 + SPR_XPRK, // 33 + SPR_OCLW, // 34 + SPR_CCLW, // 35 + SPR_TEND, // 36 + SPR_MICR, // 37 + SPR_MISS, // 38 + SPR_AROW, // 39 + SPR_ARWP, // 40 + SPR_TORP, // 41 + SPR_THIT, // 42 + SPR_TWAV, // 43 + SPR_MISL, // 44 + SPR_TFOG, // 45 + SPR_IFOG, // 46 + SPR_SHRD, // 47 + SPR_RGIB, // 48 + SPR_MRYS, // 49 + SPR_MRNO, // 50 + SPR_MRST, // 51 + SPR_MRLK, // 52 + SPR_MRBD, // 53 + SPR_MRPN, // 54 + SPR_MRGT, // 55 + SPR_BURN, // 56 + SPR_DISR, // 57 + SPR_PEAS, // 58 + SPR_GIBS, // 59 + SPR_AGRD, // 60 + SPR_ARMR, // 61 + SPR_SACR, // 62 + SPR_TNK1, // 63 + SPR_TNK2, // 64 + SPR_TNK3, // 65 + SPR_TNK4, // 66 + SPR_TNK5, // 67 + SPR_TNK6, // 68 + SPR_NEAL, // 69 + SPR_BEGR, // 70 + SPR_HMN1, // 71 + SPR_LEDR, // 72 + SPR_LEAD, // 73 + SPR_ROB1, // 74 + SPR_PGRD, // 75 + SPR_ROB2, // 76 + SPR_MLDR, // 77 + SPR_ORCL, // 78 + SPR_PRST, // 79 + SPR_PDED, // 80 + SPR_ALN1, // 81 + SPR_AL1P, // 82 + SPR_NODE, // 83 + SPR_MTHD, // 84 + SPR_MNAM, // 85 + SPR_MNAL, // 86 + SPR_MDTH, // 87 + SPR_NEST, // 88 + SPR_PODD, // 89 + SPR_ZAP6, // 90 + SPR_ZOT3, // 91 + SPR_ZAP7, // 92 + SPR_ZOT1, // 93 + SPR_ZAP5, // 94 + SPR_ZOT2, // 95 + SPR_SEWR, // 96 + SPR_SPID, // 97 + SPR_ROB3, // 98 + SPR_RBB3, // 99 + SPR_PRGR, // 100 + SPR_BASE, // + SPR_FRBL, // + SPR_KLAX, // + SPR_TURT, // + SPR_BALL, // 105 + SPR_PSTN, // + SPR_SECR, // + SPR_TARG, // + SPR_RING, // + SPR_EARS, // 110 + SPR_COMM, // + SPR_BOOM, // + SPR_RATT, // + SPR_HOGN, // + SPR_DEAD, // 115 + SPR_SBAN, // + SPR_BOTR, // + SPR_HATR, // + SPR_TOPR, // + SPR_COUP, // 120 + SPR_BUBB, // + SPR_BUBF, // + SPR_BUBC, // + SPR_ASPR, // + SPR_SPDL, // 125 + SPR_TOKN, // + SPR_OTOK, // + SPR_HELT, // + SPR_GUNT, // + SPR_FULL, // 130 + SPR_MEAT, // + SPR_JUNK, // + SPR_FFOT, // + SPR_DIE1, // + SPR_BEAC, // 135 + SPR_ARM1, // + SPR_ARM2, // + SPR_BARW, // + SPR_BART, // + SPR_LAMP, // 140 + SPR_LANT, // + SPR_BARL, // + SPR_BOWL, // + SPR_BRAZ, // + SPR_TRCH, // 145 + SPR_LTRH, // + SPR_LMPC, // + SPR_LOGS, // + SPR_TRHO, // + SPR_WATR, // 150 + SPR_MUGG, // + SPR_FUSL, // + SPR_CRD1, // + SPR_CRD2, // + SPR_TPAS, // 155 + SPR_KY1G, // + SPR_KY2S, // + SPR_KY3B, // + SPR_HAND, // + SPR_CRYS, // 160 + SPR_PRIS, // + SPR_PWR1, // + SPR_PWR2, // + SPR_PWR3, // + SPR_ORAC, // 165 + SPR_GYID, // + SPR_FUBR, // + SPR_WARE, // + SPR_RCRY, // + SPR_BCRY, // 170 + SPR_CHAP, // + SPR_TUNL, // + SPR_BLTK, // + SPR_SECK, // + SPR_MINE, // 175 + SPR_REBL, // + SPR_PROC, // + SPR_ANKH, // + SPR_GOID, // + SPR_STMP, // 180 + SPR_MDKT, // + SPR_COIN, // + SPR_CRED, // + SPR_SACK, // + SPR_CHST, // 185 + SPR_SHD1, // + SPR_MASK, // + SPR_UNIF, // + SPR_OFIC, // + SPR_PMAP, // 190 + SPR_PMUP, // + SPR_BLIT, // + SPR_BBOX, // + SPR_MSSL, // + SPR_ROKT, // 195 + SPR_BRY1, // + SPR_CPAC, // + SPR_PQRL, // + SPR_XQRL, // + SPR_GRN1, // 200 + SPR_GRN2, // + SPR_BKPK, // + SPR_RELC, // + SPR_RIFL, // + SPR_FLAM, // 205 + SPR_BFLM, // + SPR_MMSL, // + SPR_TRPD, // + SPR_GRND, // + SPR_CBOW, // 210 + SPR_SIGL, // + SPR_LITE, // + SPR_CNDL, // + SPR_CLBR, // + SPR_LITS, // 215 + SPR_LITB, // + SPR_LITG, // + SPR_ROK1, // + SPR_ROK2, // + SPR_ROK3, // 220 + SPR_ROK4, // + SPR_LOGG, // + SPR_RUB1, // + SPR_RUB2, // + SPR_RUB3, // 225 + SPR_RUB4, // + SPR_RUB5, // + SPR_RUB6, // + SPR_RUB7, // + SPR_RUB8, // 230 + SPR_CHAN, // + SPR_STAT, // + SPR_DSTA, // + SPR_CRAB, // + SPR_CAGE, // 235 + SPR_TREE, // + SPR_TRE1, // + SPR_BUSH, // + SPR_SHRB, // + SPR_STAK, // 240 + SPR_BAR1, // + SPR_VASE, // + SPR_STOL, // + SPR_POT1, // + SPR_TUB1, // 245 + SPR_ANVL, // + SPR_TLMP, // + SPR_TRAY, // + SPR_APOW, // + SPR_AFED, // 250 + SPR_DRIP, // + SPR_CDRP, // + SPR_SPLH, // + SPR_WTFT, // + SPR_HERT, // + SPR_TELP, // + SPR_MONI, // + SPR_STEL, // + SPR_STLA, // + SPR_STLE, // 260 + SPR_HUGE, // 261 + SPR_STLG, // 262 NUMSPRITES } spritenum_t; diff --git a/src/strife/p_dialog.h b/src/strife/p_dialog.h index d0e949ad..ad0f6abf 100644 --- a/src/strife/p_dialog.h +++ b/src/strife/p_dialog.h @@ -69,6 +69,7 @@ typedef struct mapdialog_s void P_DialogLoad(void);
void P_DialogStart(player_t *player);
void P_DialogDoChoice(int choice);
+boolean P_GiveItemToPlayer(player_t *player, int sprnum, mobjtype_t type);
#endif
diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c index 971196cb..615930ba 100644 --- a/src/strife/p_enemy.c +++ b/src/strife/p_enemy.c @@ -46,6 +46,9 @@ // Data. #include "sounds.h" +// [STRIFE] Dialog / Inventory +#include "p_dialog.h" + // Forward Declarations: void A_RandomWalk(mobj_t *); void A_ProgrammerAttack(mobj_t* actor); @@ -995,9 +998,9 @@ void A_Listen(mobj_t* actor) soundtarget = actor->subsector->sector->soundtarget; - if(soundtarget && soundtarget->flags & MF_SHOOTABLE) + if(soundtarget && (soundtarget->flags & MF_SHOOTABLE)) { - if(actor->flags & MF_ALLY != soundtarget->flags & MF_ALLY) + if((actor->flags & MF_ALLY) != (soundtarget->flags & MF_ALLY)) { actor->target = soundtarget; @@ -2191,6 +2194,8 @@ void A_Tracer (mobj_t* actor) // A_ProgrammerMelee // // villsa [STRIFE] new codepointer +// 09/08/10: Melee attack for the Programmer. +// haleyjd - fixed damage formula // void A_ProgrammerMelee(mobj_t* actor) { @@ -2201,7 +2206,7 @@ void A_ProgrammerMelee(mobj_t* actor) if(P_CheckMeleeRange(actor)) { S_StartSound(actor, sfx_mtalht); - P_DamageMobj(actor->target, actor, actor, 2 * P_Random()); + P_DamageMobj(actor->target, actor, actor, 8 * (P_Random() % 10 + 1)); } } @@ -2215,8 +2220,9 @@ void A_ProgrammerMelee(mobj_t* actor) // // A_Scream // -// villsa [STRIFE] has no random death sounds, so play -// deathsound directly +// villsa [STRIFE] +// * Has no random death sounds, so play deathsound directly +// * Full-volume roars for the Entity and Inquisitor. // void A_Scream(mobj_t* actor) { @@ -2225,16 +2231,16 @@ void A_Scream(mobj_t* actor) // Check for bosses. if(actor->type == MT_ENTITY || actor->type == MT_INQUISITOR) - S_StartSound(NULL, actor->info->deathsound); // full volume + S_StartSound(NULL, actor->info->deathsound); // full volume else - S_StartSound(actor, actor->info->deathsound); + S_StartSound(actor, actor->info->deathsound); } // // A_XScream // -// villsa [STRIFE] robots will play deathsound -// while non-robots play the slop sfx +// villsa [STRIFE] +// * Robots will play deathsound while non-robots play the slop sfx // void A_XScream(mobj_t* actor) { @@ -2246,14 +2252,13 @@ void A_XScream(mobj_t* actor) sound = sfx_slop; S_StartSound(actor, sound); - } // // A_Pain // -// villsa [STRIFE] play random peasant sounds -// otherwise play painsound directly +// villsa [STRIFE] +// * Play random peasant sounds; otherwise play painsound directly // void A_Pain(mobj_t* actor) { @@ -2261,7 +2266,7 @@ void A_Pain(mobj_t* actor) if(sound) { - if(sound >= sfx_pespna && sound <= sfx_pespnd) + if(sound >= sfx_pespna && sound <= sfx_pespnd) sound = sfx_pespna + (P_Random() % 4); S_StartSound(actor, sound); @@ -2272,9 +2277,15 @@ void A_Pain(mobj_t* actor) // A_PeasantCrash // // villsa [STRIFE] new codepointer +// 09/08/10: Called from Peasant's "crash" state (not to be confused with +// Heretic crash states), which is invoked when the Peasant has taken +// critical but sub-fatal damage. It will "bleed out" the rest of its +// health by calling this function repeatedly. // void A_PeasantCrash(mobj_t* actor) { + // Set INCOMBAT, because you probably wouldn't feel like talking either + // if somebody just stabbed you in the gut with a punch dagger... actor->flags |= MF_INCOMBAT; if(!(P_Random() % 5)) @@ -2285,16 +2296,19 @@ void A_PeasantCrash(mobj_t* actor) if(actor->health <= 0) P_KillMobj(actor->target, actor); - } // // A_Fall // +// [STRIFE] +// * Set INCOMBAT, and clear NOGRAVITY and SHADOW +// void A_Fall (mobj_t *actor) { - // villsa [STRIFE] set incombat flag + // villsa [STRIFE] set incombat flag to stop dialog actor->flags |= MF_INCOMBAT; + // actor is on ground, it can be walked over // villsa [STRIFE] remove nogravity/shadow flags as well actor->flags &= ~(MF_SOLID|MF_NOGRAVITY|MF_SHADOW); @@ -2320,6 +2334,8 @@ void A_HideZombie(mobj_t* actor) // A_MerchantPain // // villsa [STRIFE] new codepointer +// 09/08/10: Pain pointer for merchant characters. They close up shop for +// a while and set off the alarm. // void A_MerchantPain(mobj_t* actor) { @@ -2343,6 +2359,9 @@ void A_MerchantPain(mobj_t* actor) // A_ProgrammerDie // // villsa [STRIFE] new codepointer +// 09/08/10: Action routine for the Programmer's grisly death. Spawns the +// separate mechanical base object and sends it flying off in some random +// direction. // void A_ProgrammerDie(mobj_t* actor) { @@ -2365,6 +2384,7 @@ void A_ProgrammerDie(mobj_t* actor) // A_InqTossArm // // villsa [STRIFE] new codepointer +// 09/08/10: Inquisitor death action. Spawns an arm and tosses it. // void A_InqTossArm(mobj_t* actor) { @@ -2386,7 +2406,11 @@ void A_InqTossArm(mobj_t* actor) // // A_SpawnSpectreA // -// villsa [STRIFE] new codepointer +// villsa [STRIFE] new codepointer (unused) +// 09/08/10: Spawns Spectre A. Or would, if anything actually used this. +// This is evidence that the Programmer's spectre, which appears in the +// catacombs in the final version, was originally meant to be spawned +// after his death. // void A_SpawnSpectreA(mobj_t* actor) { @@ -2400,6 +2424,7 @@ void A_SpawnSpectreA(mobj_t* actor) // A_SpawnSpectreB // // villsa [STRIFE] new codepointer +// 09/08/10: Action function to spawn the Bishop's spectre. // void A_SpawnSpectreB(mobj_t* actor) { @@ -2412,7 +2437,11 @@ void A_SpawnSpectreB(mobj_t* actor) // // A_SpawnSpectreC // -// villsa [STRIFE] new codepointer +// villsa [STRIFE] new codepointer (unused) +// 09/08/10: Action function to spawn the Oracle's spectre. Also +// unused, because the Oracle's spectre is already present on the +// map and is awakened on his death. Also left over from the +// unreleased beta (and demo) versions. // void A_SpawnSpectreC(mobj_t* actor) { @@ -2426,6 +2455,7 @@ void A_SpawnSpectreC(mobj_t* actor) // A_SpawnSpectreD // // villsa [STRIFE] new codepointer +// 09/08/10: Action function to spawn Macil's Spectre. // void A_SpawnSpectreD(mobj_t* actor) { @@ -2439,6 +2469,7 @@ void A_SpawnSpectreD(mobj_t* actor) // A_SpawnSpectreE // // villsa [STRIFE] new codepointer +// 09/08/10: Action function to spawn the Loremaster's Spectre. // void A_SpawnSpectreE(mobj_t* actor) { @@ -2448,15 +2479,18 @@ void A_SpawnSpectreE(mobj_t* actor) mo->momz = P_Random() << 9; } +// [STRIFE] New statics - Remember the Entity's spawning position. +static fixed_t entity_pos_x = 0; +static fixed_t entity_pos_y = 0; +static fixed_t entity_pos_z = 0; + // // A_SpawnEntity // // villsa [STRIFE] new codepointer +// 09/08/10: You will fall on your knees before the True God, the +// One Light. // -static fixed_t entity_pos_x = 0; -static fixed_t entity_pos_y = 0; -static fixed_t entity_pos_z = 0; - void A_SpawnEntity(mobj_t* actor) { mobj_t* mo; @@ -2471,11 +2505,11 @@ void A_SpawnEntity(mobj_t* actor) // // P_ThrustMobj +// // villsa [STRIFE] new function // Thrusts an thing in a specified force/direction // Beware! This is inlined everywhere in the asm // - void P_ThrustMobj(mobj_t *actor, angle_t angle, fixed_t force) { angle_t an = angle >> ANGLETOFINESHIFT; @@ -2483,9 +2517,17 @@ void P_ThrustMobj(mobj_t *actor, angle_t angle, fixed_t force) actor->momy += FixedMul(finesine[an], force); } +// +// A_EntityDeath +// +// [STRIFE] +// haleyjd 09/08/10: The death of the Entity's spectre brings forth +// three subentities, which are significantly less dangerous on their +// own but threatening together. +// void A_EntityDeath(mobj_t* actor) { - + // STRIFE-TODO } // @@ -2500,23 +2542,70 @@ void A_SpawnZombie(mobj_t* actor) void A_ZombieInSpecialSector(mobj_t* actor) { - + // STRIFE-TODO } void A_CrystalExplode(mobj_t* actor) { + // STRIFE-TODO +} +// [STRIFE] New static global - buffer used for various player messages. +static char pmsgbuffer[80]; + +// +// P_FreePrisoners +// +// haleyjd 09/08/10: [STRIFE] New function +// * Called when the prisoners get freed, obviously. Gives a +// message and awards quest token 13. +// +void P_FreePrisoners(void) +{ + int i; + + sprintf(pmsgbuffer, "You've freed the prisoners!"); + + for(i = 0; i < MAXPLAYERS; i++) + { + P_GiveItemToPlayer(&players[i], SPR_TOKN, MT_TOKEN_QUEST13); + players[i].message = pmsgbuffer; + } } -void A_DeathMsg(mobj_t* actor) +// +// P_DestroyConverter +// +// haleyjd 09/08/10: [STRIFE] New function +// * Called when the converter is shut down in the factory. +// Gives several items and a message. +// +void P_DestroyConverter(void) { + int i; + + sprintf(pmsgbuffer, "You've destroyed the Converter!"); + for(i = 0; i < MAXPLAYERS; i++) + { + P_GiveItemToPlayer(&players[i], SPR_TOKN, MT_TOKEN_QUEST25); + P_GiveItemToPlayer(&players[i], SPR_TOKN, MT_TOKEN_STAMINA); + P_GiveItemToPlayer(&players[i], SPR_TOKN, MT_TOKEN_NEW_ACCURACY); + players[i].message = pmsgbuffer; + } +} + +void A_DeathMsg(mobj_t* actor) +{ + // STRIFE-TODO } // // A_ExtraLightOff // // villsa [STRIFE] new codepointer +// 09/08/10: Called by the Power Crystal to turn off the extended +// flash of light caused by its explosion. // void A_ExtraLightOff(mobj_t* actor) { @@ -2530,20 +2619,19 @@ void A_ExtraLightOff(mobj_t* actor) } // -// A_DeathExplode4 +// A_CrystalRadiusAtk // // villsa [STRIFE] new codepointer +// 09/08/10: Called by the power crystal when it dies. // -void A_DeathExplode4(mobj_t* actor) +void A_CrystalRadiusAtk(mobj_t* actor) { P_RadiusAttack(actor, actor->target, 512); - if(!actor->target) - return; - - if(!actor->target->player) + if(!(actor->target && actor->target->player)) return; + // set extralight to 5 for near full-bright actor->target->player->extralight = 5; } @@ -2599,6 +2687,7 @@ void A_DeathExplode3(mobj_t* actor) // A_RaiseAlarm // // villsa [STRIFE] new codepointer +// 09/08/10: Set off the infamous alarm. This is just a noise alert. // void A_RaiseAlarm(mobj_t* actor) { @@ -2681,7 +2770,7 @@ void A_BossDeath (mobj_t* mo) void A_AcolyteSpecial(mobj_t* actor) { - + // STRIFE-TODO } // @@ -2705,15 +2794,18 @@ void A_StalkerChase(mobj_t* actor) } // -// A_StalkerChase +// A_PlayerScream +// +// [STRIFE] +// * Modified to eliminate gamemode check and to use Strife sound. // void A_PlayerScream (mobj_t* mo) { // Default death sound. int sound = sfx_pldeth; - if(/*(gamemode == commercial) // villsa [STRIFE] don't check for gamemode - && */(mo->health < -50)) + // villsa [STRIFE] don't check for gamemode + if(mo->health < -50) { // IF THE PLAYER DIES // LESS THAN -50% WITHOUT GIBBING @@ -2725,7 +2817,7 @@ void A_PlayerScream (mobj_t* mo) void A_TeleportBeacon(mobj_t* actor) { - + // STRIFE-TODO } // @@ -2757,9 +2849,39 @@ void A_BodyParts(mobj_t* actor) mo->momz += (P_Random() & 0x0f) << FRACBITS; } +// +// A_ClaxonBlare +// +// [STRIFE] New function +// haleyjd 09/08/10: The ever-dreadful Strife alarm! +// void A_ClaxonBlare(mobj_t* actor) { + // Timer ran down? + if(--actor->reactiontime < 0) + { + // reset to initial state + actor->target = NULL; + actor->reactiontime = actor->info->reactiontime; + + // listen for more noise + A_Listen(actor); + + // If we heard something, stay on for a while, + // otherwise return to spawnstate. + if(actor->target) + actor->reactiontime = 50; + else + P_SetMobjState(actor, actor->info->spawnstate); + } + // When almost ran down, clear the soundtarget so it doesn't + // retrigger the alarm. + // Also, play the harsh, grating claxon. + if(actor->reactiontime == 2) + actor->subsector->sector->soundtarget = NULL; + else if(actor->reactiontime > 50) + S_StartSound(actor, sfx_alarm); } // @@ -2792,7 +2914,7 @@ void A_ClearSoundTarget(mobj_t* actor) void A_DropBurnFlesh(mobj_t* actor) { - + // STRIFE-TODO } // @@ -2809,6 +2931,6 @@ void A_FlameDeath(mobj_t* actor) void A_ClearForceField(mobj_t* actor) { - + // STRIFE-TODO } |