mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- Fixed: G_NewInit destroyed the players' userinfo data.
- Changed the special radius damage handling for the barrel and boss brain into an actor flag. - Added A_RadiusThrust code pointer for DECORATE and adjusted the radius attack functions accordingly. SVN r236 (trunk)
This commit is contained in:
parent
0398ddcc76
commit
9e6d5c8fd9
10 changed files with 63 additions and 11 deletions
|
@ -1,12 +1,19 @@
|
|||
June 30, 2006
|
||||
- Changed the earthquake view shaking so that it works for anything and not
|
||||
just players.
|
||||
July 2, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: G_NewInit destroyed the players' userinfo data.
|
||||
- Changed the special radius damage handling for the barrel and boss brain
|
||||
into an actor flag.
|
||||
- Added A_RadiusThrust code pointer for DECORATE and adjusted the radius
|
||||
attack functions accordingly.
|
||||
|
||||
July 1, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: In multiplayer games, when trying to change targets, A_Chase forgot
|
||||
to check whether the new target was the same as the old one and treated
|
||||
this case as a real target change.
|
||||
|
||||
June 30, 2006
|
||||
- Changed the earthquake view shaking so that it works for anything and not
|
||||
just players.
|
||||
|
||||
June 29, 2006
|
||||
- Added some hackery at the start of MouseRead_Win32() that prevents it from
|
||||
yanking the mouse around if they keys haven't been read yet to combat the
|
||||
|
|
|
@ -282,6 +282,7 @@ enum
|
|||
MF5_NODAMAGE = 0x00000040, // Actor can be shot and reacts to being shot but takes no damage
|
||||
MF5_CHASEGOAL = 0x00000080, // Walks to goal instead of target if a valid goal is set.
|
||||
MF5_BLOODSPLATTER = 0x00000100, // Blood splatter like in Raven's games.
|
||||
MF5_OLDRADIUSDMG = 0x00000200, // Use old radius damage code (for barrels and boss brain)
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ IMPLEMENT_ACTOR (ABossBrain, Doom, 88, 0)
|
|||
PROP_PainChance (255)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE)
|
||||
PROP_Flags4 (MF4_NOICEDEATH)
|
||||
PROP_Flags5 (MF5_OLDRADIUSDMG)
|
||||
|
||||
PROP_SpawnState (S_BRAIN)
|
||||
PROP_PainState (S_BRAIN_PAIN)
|
||||
|
|
|
@ -40,6 +40,7 @@ IMPLEMENT_ACTOR (AExplosiveBarrel, Doom, 2035, 125)
|
|||
PROP_Flags2 (MF2_MCROSS)
|
||||
PROP_Flags3 (MF3_DONTGIB)
|
||||
PROP_Flags4 (MF4_NOICEDEATH)
|
||||
PROP_Flags5 (MF5_OLDRADIUSDMG)
|
||||
|
||||
PROP_SpawnState (S_BAR)
|
||||
PROP_DeathState (S_BEXP)
|
||||
|
|
|
@ -1372,10 +1372,12 @@ void G_NewInit ()
|
|||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
player_t *p = &players[i];
|
||||
userinfo_t saved_ui = players[i].userinfo;
|
||||
p->~player_t();
|
||||
::new(p) player_t;
|
||||
players[i].playerstate = PST_DEAD;
|
||||
playeringame[i] = 0;
|
||||
players[i].userinfo = saved_ui;
|
||||
}
|
||||
BackupSaveName = "";
|
||||
consoleplayer = 0;
|
||||
|
|
|
@ -1080,12 +1080,21 @@ bool AInventory::DrawPowerup (int x, int y)
|
|||
/***************************************************************************/
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerupGiver, Any, -1, 0)
|
||||
PROP_Inventory_RespawnTics (30+1400)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
AT_GAME_SET(PowerupGiver)
|
||||
{
|
||||
APowerupGiver * giver = GetDefault<APowerupGiver>();
|
||||
|
||||
if (gameinfo.gametype & GAME_Raven)
|
||||
{
|
||||
giver->RespawnTics = 1400+30;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AInventory :: DoRespawn
|
||||
|
|
|
@ -315,7 +315,7 @@ extern fixed_t CameraX, CameraY, CameraZ;
|
|||
extern sector_t *CameraSector;
|
||||
|
||||
// [RH] Means of death
|
||||
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int damageType, bool hurtSelf, bool thrustless=false);
|
||||
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int damageType, bool hurtSelf, bool thrustless=false, bool dodamage=true);
|
||||
|
||||
void P_DelSector_List();
|
||||
void P_DelSeclist(msecnode_t *); // phares 3/16/98
|
||||
|
|
|
@ -3415,6 +3415,7 @@ bool DamageSource;
|
|||
int bombmod;
|
||||
vec3_t bombvec;
|
||||
bool bombthrustless;
|
||||
bool bombdodamage;
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
|
@ -3463,9 +3464,7 @@ BOOL PIT_RadiusAttack (AActor *thing)
|
|||
// them far too "active." BossBrains also use the old code
|
||||
// because some user levels require they have a height of 16,
|
||||
// which can make them near impossible to hit with the new code.
|
||||
if (!bombspot->IsKindOf (RUNTIME_CLASS(AExplosiveBarrel)) &&
|
||||
!thing->IsKindOf (RUNTIME_CLASS(AExplosiveBarrel)) &&
|
||||
!thing->IsKindOf (RUNTIME_CLASS(ABossBrain)))
|
||||
if (!bombdodamage || !((bombspot->flags5 | thing->flags5) & MF5_OLDRADIUSDMG))
|
||||
{
|
||||
// [RH] New code. The bounding box only covers the
|
||||
// height of the thing and not the height of the map.
|
||||
|
@ -3523,11 +3522,13 @@ BOOL PIT_RadiusAttack (AActor *thing)
|
|||
float thrust;
|
||||
int damage = (int)points;
|
||||
|
||||
P_DamageMobj (thing, bombspot, bombsource, damage, bombmod);
|
||||
if (bombdodamage) P_DamageMobj (thing, bombspot, bombsource, damage, bombmod);
|
||||
else thing->flags2 |= MF2_BLASTED;
|
||||
|
||||
if (!(bombspot->flags2 & MF2_NODMGTHRUST) &&
|
||||
!(thing->flags & MF_ICECORPSE))
|
||||
{
|
||||
P_TraceBleed (damage, thing, bombspot);
|
||||
if (bombdodamage) P_TraceBleed (damage, thing, bombspot);
|
||||
|
||||
if (!bombthrustless)
|
||||
{
|
||||
|
@ -3591,7 +3592,7 @@ BOOL PIT_RadiusAttack (AActor *thing)
|
|||
// Source is the creature that caused the explosion at spot.
|
||||
//
|
||||
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int damageType,
|
||||
bool hurtSource, bool thrustless)
|
||||
bool hurtSource, bool thrustless, bool dodamage)
|
||||
{
|
||||
static TArray<AActor *> radbt;
|
||||
|
||||
|
@ -3616,6 +3617,7 @@ void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int
|
|||
DamageSource = hurtSource;
|
||||
bombdamagefloat = (float)damage;
|
||||
bombmod = damageType;
|
||||
bombdodamage = dodamage;
|
||||
VectorPosition (spot, bombvec);
|
||||
|
||||
radbt.Clear();
|
||||
|
|
|
@ -216,6 +216,7 @@ static flagdef ActorFlags[]=
|
|||
DEFINE_FLAG(MF5, EXPLODEONWATER, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, OLDRADIUSDMG, AActor, flags5),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
@ -499,6 +500,7 @@ ACTOR(CountdownArg)
|
|||
ACTOR(CustomMeleeAttack)
|
||||
ACTOR(Light)
|
||||
ACTOR(Burst)
|
||||
ACTOR(RadiusThrust)
|
||||
|
||||
|
||||
#include "d_dehackedactions.h"
|
||||
|
@ -688,6 +690,7 @@ AFuncDesc AFTable[]=
|
|||
FUNC(A_CountdownArg, "X")
|
||||
FUNC(A_CustomMeleeAttack, "XXXsty" )
|
||||
FUNC(A_Burst, "M")
|
||||
FUNC(A_RadiusThrust, "xxy")
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -482,6 +482,32 @@ void A_ExplodeParms (AActor *self)
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// A_RadiusThrust
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void A_RadiusThrust (AActor *self)
|
||||
{
|
||||
int index=CheckIndex(3);
|
||||
if (index<0) return;
|
||||
|
||||
int force = EvalExpressionI (StateParameters[index], self);
|
||||
if (force==0) force=128;
|
||||
|
||||
int distance = EvalExpressionI (StateParameters[index+1], self);
|
||||
if (distance==0) distance=128;
|
||||
|
||||
bool affectSource = EvalExpressionN (StateParameters[index+2], self);;
|
||||
|
||||
P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false, false);
|
||||
if (self->z <= self->floorz + (distance<<FRACBITS))
|
||||
{
|
||||
P_HitFloor (self);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Execute a line special / script
|
||||
|
|
Loading…
Reference in a new issue