mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixed: P_StartScript was missing a NULL pointer check for the error
message. When trying to puke a script outside a map it crashed. - Fixed: The random number generator for large numbers must mask out the sign bit before performing a modulo. - Now that the conversation states are pointers there is no need to make AActor::ConversationAnimation virtual. No class overrides this method anymore. - Replaced AMacil1::TakeSpecialDamage with MF5_NODAMAGE. - Fixed: AMacil2::TakeSpecialDamage and AOracle::TakeSpecialDamage didn't check whether inflictor was NULL and crashed when used with 'kill monsters'. - Fixed: Some Strife decorations didn't loop their animation SVN r113 (trunk)
This commit is contained in:
parent
bb617dfbfd
commit
b97c417101
12 changed files with 27 additions and 32 deletions
|
@ -1,4 +1,15 @@
|
|||
May 13, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: P_StartScript was missing a NULL pointer check for the error
|
||||
message. When trying to puke a script outside a map it crashed.
|
||||
- Fixed: The random number generator for large numbers must mask out the
|
||||
sign bit before performing a modulo.
|
||||
- Now that the conversation states are pointers there is no need to make
|
||||
AActor::ConversationAnimation virtual. No class overrides this method
|
||||
anymore.
|
||||
- Replaced AMacil1::TakeSpecialDamage with MF5_NODAMAGE.
|
||||
- Fixed: AMacil2::TakeSpecialDamage and AOracle::TakeSpecialDamage didn't
|
||||
check whether inflictor was NULL and crashed when used with 'kill monsters'.
|
||||
- Fixed: Some Strife decorations didn't loop their animation
|
||||
- Changed: The decision whether blood splatter sprites are spawned is no
|
||||
longer determined by game. Instead there's a new flag, MF5_BLOODSPLATTER
|
||||
which is deciding what to do. To keep backwards compatibility this flag
|
||||
|
|
|
@ -555,7 +555,7 @@ public:
|
|||
void SetShade (int r, int g, int b);
|
||||
|
||||
// Plays a conversation animation
|
||||
virtual void ConversationAnimation (int animnum);
|
||||
void ConversationAnimation (int animnum);
|
||||
|
||||
// Make this actor hate the same things as another actor
|
||||
void CopyFriendliness (const AActor *other, bool changeTarget);
|
||||
|
|
|
@ -1863,10 +1863,10 @@ void D_DoomMain (void)
|
|||
// [RH] Make sure zdoom.pk3 is always loaded,
|
||||
// as it contains magic stuff we need.
|
||||
|
||||
wad = BaseFileSearch ("zdoom.pk3", NULL, true);
|
||||
wad = BaseFileSearch (BASEWAD, NULL, true);
|
||||
if (wad == NULL)
|
||||
{
|
||||
I_FatalError ("Cannot find zdoom.pk3");
|
||||
I_FatalError ("Cannot find " BASEWAD);
|
||||
}
|
||||
|
||||
I_SetTitleString (IWADTypeNames[IdentifyVersion(wad)]);
|
||||
|
|
|
@ -17,7 +17,6 @@ class AMacil1 : public AStrifeHumanoid
|
|||
DECLARE_ACTOR (AMacil1, AStrifeHumanoid)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, int damagetype);
|
||||
};
|
||||
|
||||
FState AMacil1::States[] =
|
||||
|
@ -91,6 +90,7 @@ IMPLEMENT_ACTOR (AMacil1, Strife, 64, 0)
|
|||
PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
|
||||
PROP_Flags3 (MF3_ISMONSTER)
|
||||
PROP_Flags4 (MF4_FIRERESIST|MF4_NOICEDEATH|MF4_NOSPLASHALERT)
|
||||
PROP_Flags5 (MF5_NODAMAGE)
|
||||
PROP_MinMissileChance (150)
|
||||
PROP_RadiusFixed (20)
|
||||
PROP_HeightFixed (56)
|
||||
|
@ -112,25 +112,6 @@ void AMacil1::NoBlockingSet ()
|
|||
P_DropItem (this, "BoxOfBullets", -1, 256);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AMacil1 :: TakeSpecialDamage
|
||||
//
|
||||
// Before you storm the castle, Macil is a god and unkillable. The effort
|
||||
// required to take the castle apparently drops him to mere godlike status.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
int AMacil1::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, int damagetype)
|
||||
{
|
||||
target = source;
|
||||
if (PainState != NULL)
|
||||
{
|
||||
SetState (PainState);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
|
||||
class AMacil2 : public AMacil1
|
||||
|
@ -153,6 +134,7 @@ IMPLEMENT_STATELESS_ACTOR (AMacil2, Strife, 200, 0)
|
|||
PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
|
||||
PROP_Flags4Clear (MF4_FIRERESIST)
|
||||
PROP_Flags4Set (MF4_SPECTRAL)
|
||||
PROP_Flags5Clear (MF5_NODAMAGE)
|
||||
PROP_MinMissileChance (150)
|
||||
PROP_Tag ("MACIL")
|
||||
PROP_DeathSound ("macil/slop")
|
||||
|
@ -181,9 +163,8 @@ void AMacil2::NoBlockingSet ()
|
|||
|
||||
int AMacil2::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, int damagetype)
|
||||
{
|
||||
if (inflictor->IsKindOf (RUNTIME_CLASS(ASpectralLightningV1)))
|
||||
if (inflictor != NULL && inflictor->IsKindOf (RUNTIME_CLASS(ASpectralLightningV1)))
|
||||
return -1;
|
||||
|
||||
// This must skip the method of AMacil1 but it should call AActor's version.
|
||||
return AActor::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ void A_WakeOracleSpectre (AActor *self)
|
|||
|
||||
int AOracle::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, int damagetype)
|
||||
{
|
||||
if (inflictor->IsKindOf (RUNTIME_CLASS(ASpectralLightningV1)))
|
||||
if (inflictor != NULL && inflictor->IsKindOf (RUNTIME_CLASS(ASpectralLightningV1)))
|
||||
return -1;
|
||||
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ int FRandom::operator() (int mod)
|
|||
num = (num << 8) | (*this)();
|
||||
num = (num << 8) | (*this)();
|
||||
num = (num << 8) | (*this)();
|
||||
return num % mod;
|
||||
return (num&0x7fffffff) % mod;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4567,7 +4567,7 @@ int P_StartScript (AActor *who, line_t *where, int script, char *map, bool backS
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!net || who->player == &players[consoleplayer])
|
||||
if (!net || (who && who->player == &players[consoleplayer]))
|
||||
{
|
||||
Printf ("P_StartScript: Unknown script %d\n", script);
|
||||
}
|
||||
|
|
|
@ -2746,7 +2746,7 @@ static void P_InitTagLists ()
|
|||
}
|
||||
}
|
||||
|
||||
static void P_GetPolySpots (int lump, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors)
|
||||
void P_GetPolySpots (int lump, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors)
|
||||
{
|
||||
if (HasBehavior)
|
||||
{
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
|
||||
// This is so that derivates can use the same savegame versions without worrying about engine compatibility
|
||||
#define GAMESIG "ZDOOM"
|
||||
#define BASEWAD "zdoom.pk3"
|
||||
|
||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||
#define MINSAVEVER 232 // Used by 2.0.99
|
||||
|
|
|
@ -244,3 +244,4 @@ CCMD (vid_currentmode)
|
|||
{
|
||||
Printf ("%dx%dx%d\n", DisplayWidth, DisplayHeight, DisplayBits);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ ACTOR RadSuit : PowerupGiver 2025
|
|||
+INVENTORY.AUTOACTIVATE
|
||||
+INVENTORY.ALWAYSPICKUP
|
||||
Inventory.MaxAmount 0
|
||||
Inventory.PickupMessage "$GOTSUIT"
|
||||
Powerup.Type IronFeet
|
||||
States
|
||||
{
|
||||
|
|
|
@ -571,7 +571,7 @@ ACTOR WaterFountain 112
|
|||
Spawn:
|
||||
WTFT ABC 4
|
||||
WTFT D 4 A_LoopActiveSound
|
||||
Stop
|
||||
Loop
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -763,7 +763,7 @@ ACTOR BurningBrazier 106
|
|||
{
|
||||
Spawn:
|
||||
BRAZ ABCD 4 Bright
|
||||
Stop
|
||||
Loop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue