- 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.
- moved Doom exit sounds into SNDINFO as $random definitions.
- Fixed: Dying Lost Souls could be reset to their see state if they slammed into
  something.

SVN r540 (trunk)
This commit is contained in:
Christoph Oelckers 2007-07-28 12:38:10 +00:00
parent 2829361c5c
commit 5e2e389bd1
15 changed files with 101 additions and 82 deletions

View file

@ -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

View file

@ -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<AAmmo *>(other->FindInventory (type));
int amount = static_cast<AAmmo *>(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<AAmmo*>(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)

View file

@ -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);
};

View file

@ -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<AAmmo *>(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)

View file

@ -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,

View file

@ -104,7 +104,7 @@ typedef struct
char numPages;
} indexed;
} info;
const char **quitSounds;
const char *quitSound;
int maxSwitch;
char borderFlat[9];
gameborder_t *border;

View file

@ -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);
}
}

View file

@ -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
}

View file

@ -967,6 +967,7 @@ void APlayerPawn::GiveDefaultInventory ()
else
{
item = static_cast<AInventory *>(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)))
{

View file

@ -41,6 +41,7 @@
#include <new>
#include <sys/param.h>
#include <gtk/gtk.h>
#include <locale.h>
#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());

View file

@ -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[] =

View file

@ -53,6 +53,7 @@
#include "thingdef.h"
#include "a_sharedglobal.h"
#include "s_sound.h"
#include "i_system.h"
TArray<int> StateParameters;
TArray<FName> JumpParameters;

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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