osezer patch 001
authorDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:18:30 +0000 (03:18 -0700)
committerDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:18:30 +0000 (03:18 -0700)
fixed --disable-assassin configuration by adding proper ASSASSIN ifdefs.

12 files changed:
base/f_finale.c
base/g_game.c
base/h2_main.c
base/info.c
base/mn_menu.c
base/p_inter.c
base/p_mobj.c
base/p_pspr.c
base/p_user.c
base/sb_bar.c
include/h2def.h
include/info.h

index 5cbbf17..c5ea72e 100644 (file)
@@ -169,12 +169,14 @@ static void TextWrite (void)
                {
                        V_DrawPatch(20, 0, W_CacheLumpName("chessall", PU_CACHE));
                }
+#ifdef ASSASSIN
                /* jim Looks like Dan got this one wrong! 8-) */
 /*             else if(PlayerClass[consoleplayer] = PCLASS_ASS) */
                else if(PlayerClass[consoleplayer] == PCLASS_ASS)
                {
                        V_DrawPatch(60,0, W_CacheLumpNum(W_GetNumForName("chessa"), PU_CACHE));
                }
+#endif
                else if(PlayerClass[consoleplayer])
                {
                        V_DrawPatch(60, 0, W_CacheLumpNum(W_GetNumForName("chessc")
index cc17abc..4224b9d 100644 (file)
@@ -120,14 +120,18 @@ static int LeavePosition;
 //#define MAXPLMOVE       0x32 // Old Heretic Max move
 
 fixed_t MaxPlayerMove[NUMCLASSES] = { 0x3C, 0x32, 0x2D,
+#ifdef ASSASSIN
                                        0x3D,
+#endif
                                        0x31 };
 fixed_t forwardmove[NUMCLASSES][2] = 
 {
        { 0x1D, 0x3C },
        { 0x19, 0x32 },
        { 0x16, 0x2E },
+#ifdef ASSASSIN
        { 0x17, 0x3D },
+#endif
        { 0x18, 0x31 }
 };
        
@@ -136,7 +140,9 @@ fixed_t sidemove[NUMCLASSES][2] =
        { 0x1B, 0x3B },
        { 0x18, 0x28 },
        { 0x15, 0x25 },
+#ifdef ASSASSIN
        { 0x16, 0x3C },
+#endif
        { 0x17, 0x27 }
 };
 
index 66202fb..e8f156d 100644 (file)
@@ -130,9 +130,11 @@ static char *wadfiles[MAXWADFILES] =
 #else
 static char *wadfiles[MAXWADFILES] =
 {
-       "hexen.wad"
-       ,"assassin.wad"
-       ,NULL
+       "hexen.wad",
+#ifdef ASSASSIN
+       "assassin.wad",
+#endif
+       NULL
 };
 #endif
 static execOpt_t ExecOptions[] =
index 138a01d..26296a1 100644 (file)
@@ -32,7 +32,9 @@ char *sprnames[NUMSPRITES] = {
 "KEY2","KEY3","KEY4","KEY5","KEY6","KEY7","KEY8","KEY9","KEYA","KEYB",
 "ETTN","ETTB","FDMN","FDMB","ICEY","ICPR","ICWS","SORC","SBMP","SBS4",
 "SBMB","SBS3","SBMG","SBS1","SBS2","SBFX","RADE","WATR","KORX","ABAT",
+#ifdef ASSASSIN
 "AKTR","ACSB","AGRN","ASTF","ASP1","ASP2","ASSN"
+#endif
 };
 
 void A_FreeTargMobj ();
@@ -261,10 +263,12 @@ void A_KBolt ();
 void A_BatSpawnInit ();
 void A_BatSpawn ();
 void A_BatMove ();
+#ifdef ASSASSIN
 void A_AKnifeAttack ();
 void A_ACrossAttack ();
 void A_AGrenAttack ();
 void A_AStaffAttack ();
+#endif
 
 state_t        states[NUMSTATES] = {
 {SPR_MAN1,0,-1,NULL,S_NULL,0,0},       // S_NULL
@@ -3113,6 +3117,7 @@ state_t   states[NUMSTATES] = {
 {SPR_ABAT,1,2,A_BatMove,S_BAT3,0,0},   // S_BAT2
 {SPR_ABAT,2,2,A_BatMove,S_BAT1,0,0},   // S_BAT3
 {SPR_ABAT,0,2,NULL,S_NULL,0,0},        // S_BAT_DEATH
+#ifdef ASSASSIN
 {SPR_AKTR,0,1,A_WeaponReady,S_KATARREADY,0,0}, // S_KATARREADY
 {SPR_AKTR,0,1,A_Lower,S_KATARDOWN,0,0},        // S_KATARDOWN
 {SPR_AKTR,0,1,A_Raise,S_KATARUP,0,0},  // S_KATARUP
@@ -3289,6 +3294,7 @@ state_t   states[NUMSTATES] = {
 {SPR_ASSN,26,-1,A_AddPlayerCorpse,S_NULL,0,0}, // S_APLAY_XDIE10
 {SPR_ASSN,27,5,A_FreezeDeath,S_APLAY_ICE2,0,0},        // S_APLAY_ICE
 {SPR_ASSN,27,1,A_FreezeDeathChunks,S_APLAY_ICE2,0,0}   // S_APLAY_ICE2
+#endif /* ASSASSIN */
 };
 
 
@@ -10881,6 +10887,7 @@ MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_PICKUP|MF_NOTDMATCH,                // flags
 MF2_WINDTHRUST|MF2_FLOORCLIP|MF2_SLIDE|MF2_PASSMOBJ|MF2_TELESTOMP|MF2_PUSHWALL         // flags2
  },
 
+#ifdef ASSASSIN
 {              // MT_PLAYER_ASS
 -1,            // doomednum
 S_APLAY,               // spawnstate
@@ -10907,6 +10914,7 @@ SFX_NONE,               // activesound
 MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_PICKUP|MF_NOTDMATCH,               // flags
 MF2_WINDTHRUST|MF2_FLOORCLIP|MF2_SLIDE|MF2_PASSMOBJ|MF2_TELESTOMP|MF2_PUSHWALL         // flags2
  },
+#endif /* ASSASSIN */
 
 {              // MT_PIGPLAYER
 -1,            // doomednum
@@ -14067,6 +14075,7 @@ MF_NOBLOCKMAP|MF_NOGRAVITY|MF_MISSILE,          // flags
 MF2_PASSMOBJ|MF2_NOTELEPORT            // flags2
  },
 
+#ifdef ASSASSIN
 {              // MT_AW_CROSSBOW
 10,            // doomednum
 S_CSTAFF,              // spawnstate
@@ -14148,5 +14157,6 @@ SFX_NONE,               // activesound
 MF_SPECIAL|MF_NOGRAVITY,               // flags
 0              // flags2
 }
+#endif /* ASSASSIN */
 };
 
index 9e4d77a..2e9f7b4 100644 (file)
@@ -1386,6 +1386,7 @@ static void SCClass(int option)
                        SkillItems[3].text = "WARLOCK";
                        SkillItems[4].text = "ARCHIMAGE";
                        break;
+#ifdef ASSASSIN
                case PCLASS_ASS:
                        SkillMenu.x = 116;
                        SkillItems[0].text = "KNAVE";
@@ -1394,6 +1395,7 @@ static void SCClass(int option)
                        SkillItems[3].text = "EXECUTIONER";
                        SkillItems[4].text = "WIDOW MAKER";
                        break;
+#endif
        }
        SetMenu(MENU_SKILL);
 }
index 419444c..625baf0 100644 (file)
@@ -21,12 +21,16 @@ int ArmorIncrement[NUMCLASSES][NUMARMOR] =
        { 25*FRACUNIT, 20*FRACUNIT, 15*FRACUNIT, 5*FRACUNIT },
        { 10*FRACUNIT, 25*FRACUNIT, 5*FRACUNIT, 20*FRACUNIT },
        { 5*FRACUNIT, 15*FRACUNIT, 10*FRACUNIT, 25*FRACUNIT },
+#ifdef ASSASSIN
        {20*FRACUNIT, 10*FRACUNIT, 25*FRACUNIT, 5*FRACUNIT },
+#endif
        { 0, 0, 0, 0 }
 };
 
 int AutoArmorSave[NUMCLASSES] = { 15*FRACUNIT, 10*FRACUNIT, 5*FRACUNIT,
+#ifdef ASSASSIN
  10*FRACUNIT,
+#endif
  0 };
 
 char *TextKeyMessages[] = 
@@ -217,7 +221,9 @@ static void TryPickupWeapon(player_t *player, pclass_t weaponClass,
 
        remove = true;
        if(player->class != weaponClass
+#ifdef ASSASSIN
                && player->class != PCLASS_ASS
+#endif
                )
        { // Wrong class, but try to pick up for mana
                if(netgame && !deathmatch)
@@ -438,14 +444,18 @@ static void TryPickupWeaponPiece(player_t *player, pclass_t matchClass,
                TXT_WEAPON_F4,
                TXT_WEAPON_C4,
                TXT_WEAPON_M4,
+#ifdef ASSASSIN
                TXT_WEAPON_A4
+#endif
        };
        static char *weaponPieceText[] =
        {
                TXT_QUIETUS_PIECE,
                TXT_WRAITHVERGE_PIECE,
                TXT_BLOODSCOURGE_PIECE,
+#ifdef ASSASSIN
                TXT_STAFFOFSET_PIECE
+#endif
        };
        static int pieceValueTrans[] =
        {
@@ -460,7 +470,11 @@ static void TryPickupWeaponPiece(player_t *player, pclass_t matchClass,
        checkAssembled = true;
        gaveWeapon = false;
        // Allow assassin to pick up any weapons
-       if(player->class != matchClass && player->class != PCLASS_ASS)
+       if(player->class != matchClass
+#ifdef ASSASSIN
+               && player->class != PCLASS_ASS
+#endif
+               )
        { // Wrong class, but try to pick up for mana
                if(netgame && !deathmatch)
                { // Can't pick up wrong-class weapons in coop netplay
@@ -1251,6 +1265,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
                        TryPickupWeaponPiece(player, PCLASS_MAGE, WPIECE3,
                                special);
                        return;
+#ifdef ASSASSIN
 // Don't forget to fix this
 /*             case SPR_WAS1:
                        TryPickupWeaponPiece(player, PCLASS_ASS, WPIECE1,
@@ -1265,7 +1280,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
                                 special);
                        return;
 */
-
+#endif
                default:
                        I_Error("P_SpecialThing: Unknown gettable thing");
        }
index ed33dbd..864a335 100644 (file)
@@ -962,9 +962,14 @@ void P_BlasterMobjThinker(mobj_t *mobj)
                                        }
                                        P_SpawnMobj(mobj->x, mobj->y, z, MT_MWANDSMOKE);
                                }
-/* jim allow other things to have BlasterMobjThinker()s (crossbow) */
-                               else if((mobj->type == MT_CFLAME_MISSILE) &&
-                                       !--mobj->special1)
+                               /*
+                               else if(!--mobj->special1)
+
+                               jim allow other things to have BlasterMobjThinker()s (crossbow)
+
+                               O.S: I don't need an #ifdef ASSASSIN here, I think..
+                               */
+                               else if((mobj->type == MT_CFLAME_MISSILE) && !--mobj->special1)
                                {
                                        mobj->special1 = 4;
                                        z = mobj->z-12*FRACUNIT;
@@ -1324,9 +1329,11 @@ void P_SpawnPlayer(mapthing_t *mthing)
                case PCLASS_MAGE:
                        mobj = P_SpawnMobj(x, y, z, MT_PLAYER_MAGE);
                        break;
+#ifdef ASSASSIN
                case PCLASS_ASS:
                        mobj = P_SpawnMobj(x, y, z, MT_PLAYER_ASS);
                        break;
+#endif
                default:
                        I_Error("P_SpawnPlayer: Unknown class type");
                        /* jim never happens but keeps gcc happy */
@@ -1390,7 +1397,9 @@ void P_SpawnMapThing(mapthing_t *mthing)
                MTF_FIGHTER,
                MTF_CLERIC,
                MTF_MAGE,
+#ifdef ASSASSIN
                MTF_CLERIC
+#endif
        };
 
        // Count deathmatch start positions
index b315a41..3d88e1b 100644 (file)
@@ -72,6 +72,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_MWANDATK_1,
                        S_NULL
                },
+#ifdef ASSASSIN
                { // Assassin - Katar
                        MANA_NONE,
                        S_KATARUP,
@@ -81,6 +82,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_KATARATK1_1,
                        S_NULL
                },
+#endif
                { // Pig - Snout
                        MANA_NONE,                      // mana
                        S_SNOUTUP,                      // upstate
@@ -119,6 +121,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_CONEATK1_3,   // holdatkstate
                        S_NULL                  // flashstate
                },
+#ifdef ASSASSIN
                { // Assassin - Hand Crossbow
                        MANA_1,
                        S_ACROSSUP,
@@ -128,6 +131,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_ACROSSATK_3,
                        S_NULL
                },
+#endif
                { // Pig - Snout
                        MANA_NONE,                      // mana
                        S_SNOUTUP,                      // upstate
@@ -166,6 +170,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_MLIGHTNINGATK_1,      // holdatkstate
                        S_NULL                          // flashstate
                },
+#ifdef ASSASSIN
                { // Assassin - Grenades
                        MANA_2,
                        S_AGRENUP,
@@ -175,6 +180,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_AGRENATK_1,
                        S_NULL
                },
+#endif
                { // Pig - Snout
                        MANA_NONE,                      // mana
                        S_SNOUTUP,                      // upstate
@@ -213,6 +219,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_MSTAFFATK_1,  // holdatkstate
                        S_NULL                          // flashstate
                },
+#ifdef ASSASSIN
                { // Assassin - Staff of Set
                        MANA_BOTH,
                        S_ASTAFFUP,
@@ -222,6 +229,7 @@ weaponinfo_t WeaponInfo[NUMWEAPONS][NUMCLASSES] =
                        S_ASTAFFATK_1,
                        S_NULL
                },
+#endif
                { // Pig - Snout
                        MANA_NONE,                      // mana
                        S_SNOUTUP,                      // upstate
@@ -241,7 +249,9 @@ static int WeaponManaUse[NUMCLASSES][NUMWEAPONS] =
        { 0, 2, 3, 14 },
        { 0, 1, 4, 18 },
        { 0, 3, 5, 15 },
+#ifdef ASSASSIN
        { 0, 3, 3, 1 },         // True to Hexen II
+#endif
        { 0, 0, 0, 0 }
 };
 
@@ -2502,7 +2512,7 @@ void P_MovePsprites(player_t *player)
 //
 // Jim Cameron did most of this one
 //============================================================================
-
+#ifdef ASSASSIN
 void A_AKnifeAttack(player_t *player, pspdef_t *psp)
 {
  angle_t angle;
@@ -2633,6 +2643,7 @@ knifedone:
  }
  return;                 
 }
+
 void A_ACrossAttack(player_t *player, pspdef_t *psp)
 {
        mobj_t *mo;
@@ -2704,4 +2715,5 @@ void A_AStaffAttack(player_t *player, pspdef_t *psp)
        angle = pmo->angle;
 
 }
+#endif /* ASSASSIN */
 
index 9ec1f6d..3056925 100644 (file)
@@ -31,7 +31,9 @@ int PStateNormal[NUMCLASSES] =
        S_FPLAY,
        S_CPLAY,
        S_MPLAY,
+#ifdef ASSASSIN
        S_APLAY,
+#endif
        S_PIGPLAY
 };
 
@@ -40,7 +42,9 @@ int PStateRun[NUMCLASSES] =
        S_FPLAY_RUN1,
        S_CPLAY_RUN1,
        S_MPLAY_RUN1,
+#ifdef ASSASSIN
        S_APLAY_RUN1,
+#endif
        S_PIGPLAY_RUN1
 };
 
@@ -49,7 +53,9 @@ int PStateAttack[NUMCLASSES] =
        S_FPLAY_ATK1,
        S_CPLAY_ATK1,
        S_MPLAY_ATK1,
+#ifdef ASSASSIN
        S_APLAY_ATK1,
+#endif
        S_PIGPLAY_ATK1
 };
 
@@ -58,11 +64,18 @@ int PStateAttackEnd[NUMCLASSES] =
        S_FPLAY_ATK2,
        S_CPLAY_ATK3,
        S_MPLAY_ATK2,
+#ifdef ASSASSIN
        S_APLAY_ATK3,
+#endif
        S_PIGPLAY_ATK1  
 };
 
-int ArmorMax[NUMCLASSES] = { 20, 18, 16, 17, 1 };
+int ArmorMax[NUMCLASSES] = { 20, 18, 16,
+#ifdef ASSASSIN
+                                       17,
+#endif
+                                       1 };
+
 /*
 ==================
 =
@@ -536,9 +549,11 @@ boolean P_UndoPlayerMorph(player_t *player)
                case PCLASS_MAGE:
                        mo = P_SpawnMobj(x, y, z, MT_PLAYER_MAGE);
                        break;
+#ifdef ASSASSIN
                case PCLASS_ASS:
                        mo = P_SpawnMobj(x, y, z, MT_PLAYER_ASS);
                        break;
+#endif
                default:
                        I_Error("P_UndoPlayerMorph:  Unknown player class %d\n", 
                                player->class);
@@ -746,7 +761,8 @@ void P_PlayerThink(player_t *player)
                                        S_StartSound(player->mo, 
                                                SFX_PLAYER_MAGE_FALLING_SCREAM);
                                }
-       case PCLASS_ASS:
+#ifdef ASSASSIN
+               case PCLASS_ASS:
                        if(player->mo->momz <= -35*FRACUNIT 
                                && player->mo->momz >= -40*FRACUNIT && !player->morphTics
                                && !S_GetSoundPlayingInfo(player->mo,
@@ -754,7 +770,9 @@ void P_PlayerThink(player_t *player)
                                {
                                        S_StartSound(player->mo, 
                                                SFX_PLAYER_MAGE_FALLING_SCREAM);
-                               }                       break;
+                               }
+                       break;
+#endif
                default:
                        break;
        }
@@ -1323,6 +1341,7 @@ boolean P_HealRadius(player_t *player)
                                        S_StartSound(mo, SFX_MYSTICINCANT);
                                }
                                break;
+#ifdef ASSASSIN
                        case PCLASS_ASS:                // Also Radius heal
                                amount = 50 + (P_Random()%50);
                                if (P_GiveBody(mo->player, amount))
@@ -1331,6 +1350,7 @@ boolean P_HealRadius(player_t *player)
                                        S_StartSound(mo, SFX_MYSTICINCANT);
                                }
                                break;
+#endif
                        case PCLASS_PIG:
                        default:
                                break;
index 3afcb12..6304ee5 100644 (file)
@@ -617,10 +617,14 @@ void SB_Init(void)
 void SB_SetClassData(void)
 {
        int class;
+#ifdef ASSASSIN
        if(PlayerClass[consoleplayer] != PCLASS_ASS) 
+#endif
        class = PlayerClass[consoleplayer]; // original player class (not pig)
+#ifdef ASSASSIN
        else
        class = 0; // Use FIghter chain and gem for now
+#endif
        PatchWEAPONSLOT = WR_CacheLumpNum(W_GetNumForName("wpslot0")
                +class, PU_STATIC);
        PatchWEAPONFULL = WR_CacheLumpNum(W_GetNumForName("wpfull0")
@@ -1680,7 +1684,9 @@ static int PieceX[NUMCLASSES][3] =
        { 190, 225, 234 },
        { 190, 212, 225 },
        { 190, 205, 224 },
+#ifdef ASSASSIN
        { 190, 205, 224 },              // Use mage xpositions for now
+#endif
        { 0, 0, 0 }                     // Pig is never used
 };
 
index 4b7c338..efe6b17 100644 (file)
@@ -456,7 +456,9 @@ typedef enum
        PCLASS_FIGHTER,
        PCLASS_CLERIC,
        PCLASS_MAGE,
+#ifdef ASSASSIN
        PCLASS_ASS,
+#endif
        PCLASS_PIG,
        NUMCLASSES
 } pclass_t;
index 002d5b9..7fc0199 100644 (file)
@@ -301,6 +301,7 @@ SPR_RADE,
 SPR_WATR,
 SPR_KORX,
 SPR_ABAT,
+#ifdef ASSASSIN
 SPR_AKTR,
 SPR_ACSB,
 SPR_AGRN,
@@ -308,6 +309,7 @@ SPR_ASTF,
 SPR_ASP1,
 SPR_ASP2,
 SPR_ASSN,
+#endif
 NUMSPRITES
 } spritenum_t;
 
@@ -3158,6 +3160,7 @@ S_BAT1,
 S_BAT2,
 S_BAT3,
 S_BAT_DEATH,
+#ifdef ASSASSIN
 S_KATARREADY,
 S_KATARDOWN,
 S_KATARUP,
@@ -3334,6 +3337,7 @@ S_APLAY_XDIE9,
 S_APLAY_XDIE10,
 S_APLAY_ICE,
 S_APLAY_ICE2,
+#endif /* ASSASSIN */
 NUMSTATES
 } statenum_t;
 
@@ -3634,7 +3638,9 @@ MT_PLAYER_SPEED,
 MT_ICECHUNK,
 MT_PLAYER_CLERIC,
 MT_PLAYER_MAGE,
+#ifdef ASSASSIN
 MT_PLAYER_ASS,
+#endif
 MT_PIGPLAYER,
 MT_PIG,
 MT_CENTAUR,
@@ -3752,10 +3758,12 @@ MT_CENTAUR_MASH,
 MT_KORAX_BOLT,
 MT_BAT_SPAWNER,
 MT_BAT,
+#ifdef ASSASSIN
 MT_AW_CROSSBOW,
 /* jim And its missiles! */
 MT_ACROSS_MISSILE,
 MT_AW_GRENADES,
+#endif
 NUMMOBJTYPES} mobjtype_t;
 
 typedef struct {