diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0e9a9b5c4..28057ee1c 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,19 @@ +July 28, 2007 (Changes by Graf Zahl) +- fixed: The BFGBall's explosion sequence was missing a state. +- fixed: The brown Chaos Serpent in Hexen had an incorrect sprite for its + ice death sequence set. +- fixed: Ammo upon game start does not get multiplied when on easy skill. + Implementing this as an inventory flag IF_IGNORESKILL also allows to create + ammo/weapon/backpack types that don't multiply the ammo given when on this + skill. + +July 24, 2007 (Changes by Graf Zahl) +- moved Doom exit sounds into SNDINFO as $random definitions. + +July 18, 2007 (Changes by Graf Zahl) +- Fixed: Dying Lost Souls could be reset to their see state if they slammed into + something. + July 12, 2007 (Changes by Graf Zahl) - Added DTA_TopOffset and DTA_LeftOffset values to the automap background drawer. - Fixed: DECORATE color translations with explicit colors didn't work because the diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index c5e4f86aa..c0ec0bb83 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -76,13 +76,16 @@ bool AAmmo::HandlePickup (AInventory *item) { int receiving = item->Amount; - // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(item->ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - receiving += receiving; - else - receiving += receiving >> 1; + // extra ammo in baby mode and nightmare mode + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + receiving += receiving; + else + receiving += receiving >> 1; + } } int oldamount = Amount; Amount += receiving; @@ -133,12 +136,15 @@ AInventory *AAmmo::CreateCopy (AActor *other) int amount = Amount; // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + amount <<= 1; + else + amount += amount >> 1; + } } if (GetClass()->ParentClass != RUNTIME_CLASS(AAmmo)) @@ -1509,12 +1515,15 @@ AInventory *ABackpackItem::CreateCopy (AActor *other) AAmmo *ammo = static_cast(other->FindInventory (type)); int amount = static_cast(GetDefaultByType(type))->BackpackAmount; // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + amount <<= 1; + else + amount += amount >> 1; + } } if (ammo == NULL) { // The player did not have the ammo. Add it. @@ -1567,12 +1576,15 @@ bool ABackpackItem::HandlePickup (AInventory *item) { int amount = static_cast(probe->GetDefault())->BackpackAmount; // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(item->ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + amount <<= 1; + else + amount += amount >> 1; + } } probe->Amount += amount; if (probe->Amount > probe->MaxAmount) diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index eba565499..8155b8622 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -95,6 +95,7 @@ enum IF_FANCYPICKUPSOUND = 1<<11, // Play pickup sound in "surround" mode IF_BIGPOWERUP = 1<<12, // Affected by RESPAWN_SUPER dmflag IF_KEEPDEPLETED = 1<<13, // Items with this flag are retained even when they run out. + IF_IGNORESKILL = 1<<14, // Ignores any skill related multiplicators when giving this item. }; struct vissprite_t; @@ -248,8 +249,8 @@ public: bool DepleteAmmo (bool altFire, bool checkEnough=true); protected: - static AAmmo *AddAmmo (AActor *other, const PClass *ammotype, int amount); - static bool AddExistingAmmo (AAmmo *ammo, int amount); + AAmmo *AddAmmo (AActor *other, const PClass *ammotype, int amount); + bool AddExistingAmmo (AAmmo *ammo, int amount); AWeapon *AddWeapon (const PClass *weapon); }; diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 150da2f3c..1c83019ed 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -249,12 +249,15 @@ AAmmo *AWeapon::AddAmmo (AActor *other, const PClass *ammotype, int amount) return NULL; } // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(this->ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount += amount; - else - amount += amount >> 1; + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + amount += amount; + else + amount += amount >> 1; + } } ammo = static_cast(other->FindInventory (ammotype)); if (ammo == NULL) @@ -287,12 +290,15 @@ bool AWeapon::AddExistingAmmo (AAmmo *ammo, int amount) if (ammo != NULL && ammo->Amount < ammo->MaxAmount) { // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount += amount; - else - amount += amount >> 1; + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + amount += amount; + else + amount += amount >> 1; + } } ammo->Amount += amount; if (ammo->Amount > ammo->MaxAmount) diff --git a/src/gi.cpp b/src/gi.cpp index b3e666c64..7bca0ede9 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -44,29 +44,6 @@ const char *GameNames[9] = NULL, "Doom", "Heretic", NULL, "Hexen", NULL, NULL, NULL, "Strife" }; -static const char *quitsounds[8] = -{ - "player/male/death1", - "demon/pain", - "grunt/pain", - "misc/gibbed", - "misc/teleport", - "grunt/sight1", - "grunt/sight3", - "demon/melee" -}; - -static const char *quitsounds2[8] = -{ - "vile/active", - "misc/p_pkup", - "brain/cube", - "misc/gibbed", - "skeleton/swing", - "knight/death", - "baby/active", - "demon/melee" -}; static gameborder_t DoomBorder = { @@ -221,7 +198,7 @@ gameinfo_t SharewareGameInfo = "VICTORY2", "HELP2", { { "HELP1", "HELP2" } }, - quitsounds, + "menu/quit1", 1, "FLOOR7_2", &DoomBorder, @@ -249,7 +226,7 @@ gameinfo_t RegisteredGameInfo = "VICTORY2", "ENDPIC", { { "HELP1", "HELP2" } }, - quitsounds, + "menu/quit1", 2, "FLOOR7_2", &DoomBorder, @@ -277,7 +254,7 @@ gameinfo_t RetailGameInfo = "VICTORY2", "ENDPIC", { { "HELP1", "CREDIT" } }, - quitsounds, + "menu/quit1", 2, "FLOOR7_2", &DoomBorder, @@ -305,7 +282,7 @@ gameinfo_t CommercialGameInfo = "CREDIT", "CREDIT", { { "HELP", "CREDIT" } }, - quitsounds2, + "menu/quit2", 3, "GRNROCK", &DoomBorder, diff --git a/src/gi.h b/src/gi.h index 4120b45b8..49ab57be3 100644 --- a/src/gi.h +++ b/src/gi.h @@ -104,7 +104,7 @@ typedef struct char numPages; } indexed; } info; - const char **quitSounds; + const char *quitSound; int maxSwitch; char borderFlat[9]; gameborder_t *border; diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 258fffc7a..04a64860e 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -1967,10 +1967,9 @@ void M_QuitResponse(int ch) return; if (!netgame) { - if (gameinfo.quitSounds) + if (gameinfo.quitSound) { - S_Sound (CHAN_VOICE, gameinfo.quitSounds[(gametic>>2)&7], - 1, ATTN_SURROUND); + S_Sound (CHAN_VOICE, gameinfo.quitSound, 1, ATTN_SURROUND); I_WaitVBL (105); } } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index ea7799fb2..3ce2a5df9 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -544,6 +544,7 @@ bool AActor::SetState (FState *newstate) sprite = newsprite; } } + if (newstate->GetAction()) { // The parameterized action functions need access to the current state and @@ -553,7 +554,6 @@ bool AActor::SetState (FState *newstate) // that does not involve changing stuff throughout the code. // Of course this should be rewritten ASAP. CallingState = newstate; - newstate->GetAction() (this); // Check whether the called action function resulted in destroying the actor @@ -2365,17 +2365,20 @@ bool AActor::Slam (AActor *thing) { flags &= ~MF_SKULLFLY; momx = momy = momz = 0; - if (!(flags2 & MF2_DORMANT)) + if (health > 0) { - int dam = GetMissileDamage (7, 1); - P_DamageMobj (thing, this, this, dam, NAME_Melee); - P_TraceBleed (dam, thing, this); - SetState (SeeState != NULL ? SeeState : SpawnState); - } - else - { - SetState (SpawnState); - tics = -1; + if (!(flags2 & MF2_DORMANT)) + { + int dam = GetMissileDamage (7, 1); + P_DamageMobj (thing, this, this, dam, NAME_Melee); + P_TraceBleed (dam, thing, this); + SetState (SeeState != NULL ? SeeState : SpawnState); + } + else + { + SetState (SpawnState); + tics = -1; + } } return false; // stop moving } diff --git a/src/p_user.cpp b/src/p_user.cpp index b531047da..b4d4d70ee 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -967,6 +967,7 @@ void APlayerPawn::GiveDefaultInventory () else { item = static_cast(Spawn (ti, 0,0,0, NO_REPLACE)); + item->ItemFlags|=IF_IGNORESKILL; // no skill multiplicators here item->Amount = di->amount; if (item->IsKindOf (RUNTIME_CLASS (AWeapon))) { diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 20d67c0b6..aebc6d8de 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include "doomerrors.h" #include "m_argv.h" @@ -194,8 +195,8 @@ int main (int argc, char **argv) GtkAvailable = gtk_init_check (&argc, &argv); - setlocale (LC_ALL, "C"); - + setlocale (LC_ALL, "C"); + if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE) == -1) { fprintf (stderr, "Could not initialize SDL:\n%s\n", SDL_GetError()); diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 2213073af..c85e6144a 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -247,6 +247,7 @@ static flagdef InventoryFlags[] = DEFINE_FLAG(IF, FANCYPICKUPSOUND, AInventory, ItemFlags), DEFINE_FLAG(IF, BIGPOWERUP, AInventory, ItemFlags), DEFINE_FLAG(IF, KEEPDEPLETED, AInventory, ItemFlags), + DEFINE_FLAG(IF, IGNORESKILL, AInventory, ItemFlags), }; static flagdef WeaponFlags[] = diff --git a/src/thingdef/thingdef_states.cpp b/src/thingdef/thingdef_states.cpp index ac65b726c..92f0a1f95 100644 --- a/src/thingdef/thingdef_states.cpp +++ b/src/thingdef/thingdef_states.cpp @@ -53,6 +53,7 @@ #include "thingdef.h" #include "a_sharedglobal.h" #include "s_sound.h" +#include "i_system.h" TArray StateParameters; TArray JumpParameters; diff --git a/wadsrc/decorate/doom/doomweapons.txt b/wadsrc/decorate/doom/doomweapons.txt index fa0e12fca..e7bcbf63c 100644 --- a/wadsrc/decorate/doom/doomweapons.txt +++ b/wadsrc/decorate/doom/doomweapons.txt @@ -474,7 +474,7 @@ ACTOR BFGBall Death: BFE1 AB 8 Bright BFE1 C 8 Bright A_BFGSpray - BFE1 EF 8 Bright + BFE1 DEF 8 Bright Stop } } diff --git a/wadsrc/decorate/hexen/demons.txt b/wadsrc/decorate/hexen/demons.txt index 6d605766a..46daae3fa 100644 --- a/wadsrc/decorate/hexen/demons.txt +++ b/wadsrc/decorate/hexen/demons.txt @@ -254,10 +254,6 @@ ACTOR Demon2 : Demon1 8080 DEM2 I 0 A_SpawnItemEx("Demon2Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270) DEM2 I 6 A_SpawnItemEx("Demon2Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270) Goto Death+2 - Ice: - DEM2 Q 5 A_FreezeDeath - DEM2 Q 1 A_FreezeDeathChunks - Wait } } diff --git a/wadsrc/sndinfo.txt b/wadsrc/sndinfo.txt index ed8e9d7c8..614699159 100644 --- a/wadsrc/sndinfo.txt +++ b/wadsrc/sndinfo.txt @@ -479,6 +479,11 @@ menu/dismiss dsswtchx // Dismiss a prompt message menu/choose dspistol // Choose a menu item menu/clear dsswtchx // Close top menu +$random menu/quit1 { player/male/death1 demon/pain grunt/pain misc/gibbed misc/teleport grunt/sight1 grunt/sight3 demon/melee } +$random menu/quit2 { vile/active misc/p_pkup brain/cube misc/gibbed skeleton/swing knight/death baby/active demon/melee } + + + $endif // ifdoom