mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-18 21:21:36 +00:00
- Fixed: A_SpawnItem() should use CopyFriendliness().
- Fixed: AExplosiveBarrel should have MF2_MCROSS set. - Fixed: Passing 0 numrays to A_BFGSpray should default to 40. - Fixed: New A_JumpIfCloser() function. - Future-proofing: thingdef.cpp/FindState() allows the 2.1 names for SwitchingDecorations. - Fixed: ASwitchingDecoration declared itself as deriving from AActor instead of ASwitchableDecoration. - Fixed: AWeaponHolder::Serialize() did not call its supermethod. SVN r19 (trunk)
This commit is contained in:
parent
75d072c09a
commit
4acc8a6954
8 changed files with 44 additions and 28 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
March 12, 2006
|
||||||
|
- Fixed: A_SpawnItem() should use CopyFriendliness().
|
||||||
|
- Fixed: AExplosiveBarrel should have MF2_MCROSS set.
|
||||||
|
- Fixed: Passing 0 numrays to A_BFGSpray should default to 40.
|
||||||
|
- Fixed: New A_JumpIfCloser() function.
|
||||||
|
- Future-proofing: thingdef.cpp/FindState() allows the 2.1 names for
|
||||||
|
SwitchingDecorations.
|
||||||
|
- Fixed: ASwitchingDecoration declared itself as deriving from AActor instead of
|
||||||
|
ASwitchableDecoration.
|
||||||
|
|
||||||
|
March 9, 2006
|
||||||
|
- Fixed: AWeaponHolder::Serialize() did not call its supermethod.
|
||||||
|
|
||||||
March 1, 2006
|
March 1, 2006
|
||||||
- Rewrote MusicVolumes handling so it's a list and not an array.
|
- Rewrote MusicVolumes handling so it's a list and not an array.
|
||||||
- Removed I_SetMusicVolume(). It isn't used.
|
- Removed I_SetMusicVolume(). It isn't used.
|
||||||
|
|
|
@ -37,6 +37,7 @@ IMPLEMENT_ACTOR (AExplosiveBarrel, Doom, 2035, 125)
|
||||||
PROP_RadiusFixed (10)
|
PROP_RadiusFixed (10)
|
||||||
PROP_HeightFixed (34)
|
PROP_HeightFixed (34)
|
||||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD)
|
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD)
|
||||||
|
PROP_Flags2 (MF2_MCROSS)
|
||||||
PROP_Flags3 (MF3_DONTGIB)
|
PROP_Flags3 (MF3_DONTGIB)
|
||||||
PROP_Flags4 (MF4_NOICEDEATH)
|
PROP_Flags4 (MF4_NOICEDEATH)
|
||||||
|
|
||||||
|
|
|
@ -1338,6 +1338,7 @@ void A_FireBFG (AActor *actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool thebfugu;
|
bool thebfugu;
|
||||||
|
int EvalExpressionI (int id, AActor *self);
|
||||||
//
|
//
|
||||||
// A_BFGSpray
|
// A_BFGSpray
|
||||||
// Spawn a BFG explosion on every monster in view
|
// Spawn a BFG explosion on every monster in view
|
||||||
|
@ -1356,8 +1357,8 @@ void A_BFGSpray (AActor *mo)
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
spraytype = TypeInfo::FindType ((const char *)StateParameters[index]);
|
spraytype = TypeInfo::FindType ((const char *)StateParameters[index]);
|
||||||
numrays = (int)StateParameters[index+1];
|
numrays = EvalExpressionI (StateParameters[index+1], mo);
|
||||||
if (numrays < 0)
|
if (numrays <= 0)
|
||||||
numrays = 40;
|
numrays = 40;
|
||||||
}
|
}
|
||||||
if (spraytype == NULL)
|
if (spraytype == NULL)
|
||||||
|
|
|
@ -149,4 +149,12 @@ public:
|
||||||
const char *PickupMessage ();
|
const char *PickupMessage ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ASwitchableDecoration : public AActor
|
||||||
|
{
|
||||||
|
DECLARE_STATELESS_ACTOR (ASwitchableDecoration, AActor)
|
||||||
|
public:
|
||||||
|
void Activate (AActor *activator);
|
||||||
|
void Deactivate (AActor *activator);
|
||||||
|
};
|
||||||
|
|
||||||
#endif //__A_HEXENGLOBAL_H__
|
#endif //__A_HEXENGLOBAL_H__
|
||||||
|
|
|
@ -23,14 +23,6 @@ static FRandom pr_soaexplode ("SoAExplode");
|
||||||
|
|
||||||
// SwitchableDecoration: Activate and Deactivate change state ---------------
|
// SwitchableDecoration: Activate and Deactivate change state ---------------
|
||||||
|
|
||||||
class ASwitchableDecoration : public AActor
|
|
||||||
{
|
|
||||||
DECLARE_STATELESS_ACTOR (ASwitchableDecoration, AActor)
|
|
||||||
public:
|
|
||||||
void Activate (AActor *activator);
|
|
||||||
void Deactivate (AActor *activator);
|
|
||||||
};
|
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_ACTOR (ASwitchableDecoration)
|
IMPLEMENT_ABSTRACT_ACTOR (ASwitchableDecoration)
|
||||||
|
|
||||||
void ASwitchableDecoration::Activate (AActor *activator)
|
void ASwitchableDecoration::Activate (AActor *activator)
|
||||||
|
@ -47,7 +39,7 @@ void ASwitchableDecoration::Deactivate (AActor *activator)
|
||||||
|
|
||||||
class ASwitchingDecoration : public ASwitchableDecoration
|
class ASwitchingDecoration : public ASwitchableDecoration
|
||||||
{
|
{
|
||||||
DECLARE_STATELESS_ACTOR (ASwitchingDecoration, AActor)
|
DECLARE_STATELESS_ACTOR (ASwitchingDecoration, ASwitchableDecoration)
|
||||||
public:
|
public:
|
||||||
void Deactivate (AActor *activator) {}
|
void Deactivate (AActor *activator) {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ public:
|
||||||
|
|
||||||
void Serialize (FArchive &arc)
|
void Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
|
Super::Serialize(arc);
|
||||||
arc << PieceMask ;
|
arc << PieceMask ;
|
||||||
if (arc.IsStoring()) arc.UserWriteClass(PieceWeapon);
|
if (arc.IsStoring()) arc.UserWriteClass(PieceWeapon);
|
||||||
else arc.UserWriteClass(PieceWeapon);
|
else arc.UserWriteClass(PieceWeapon);
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "doomerrors.h"
|
#include "doomerrors.h"
|
||||||
#include "a_doomglobal.h"
|
#include "a_doomglobal.h"
|
||||||
|
#include "a_hexenglobal.h"
|
||||||
#include "a_weaponpiece.h"
|
#include "a_weaponpiece.h"
|
||||||
#include "p_conversation.h"
|
#include "p_conversation.h"
|
||||||
|
|
||||||
|
@ -625,7 +626,7 @@ AFuncDesc AFTable[]=
|
||||||
FUNC(A_StopSound, NULL )
|
FUNC(A_StopSound, NULL )
|
||||||
FUNC(A_SeekerMissile, "XX" )
|
FUNC(A_SeekerMissile, "XX" )
|
||||||
FUNC(A_Jump, "XL" )
|
FUNC(A_Jump, "XL" )
|
||||||
FUNC(A_CustomMissile, "MXXxxx" )
|
FUNC(A_CustomMissile, "MXXxxxx" )
|
||||||
FUNC(A_CustomBulletAttack, "XXXXmx" )
|
FUNC(A_CustomBulletAttack, "XXXXmx" )
|
||||||
FUNC(A_CustomRailgun, "Xxccxxx" )
|
FUNC(A_CustomRailgun, "Xxccxxx" )
|
||||||
FUNC(A_JumpIfHealthLower, "XL" )
|
FUNC(A_JumpIfHealthLower, "XL" )
|
||||||
|
@ -1128,7 +1129,7 @@ FState ** FindState(AActor * actor, const TypeInfo * type, const char * name)
|
||||||
return (&static_cast<AWeapon*>(actor)->UpState)+i;
|
return (&static_cast<AWeapon*>(actor)->UpState)+i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type->IsDescendantOf (RUNTIME_CLASS(ACustomInventory)))
|
else if (type->IsDescendantOf (RUNTIME_CLASS(ACustomInventory)))
|
||||||
{
|
{
|
||||||
for(i=0;inventory_statenames[i];i++)
|
for(i=0;inventory_statenames[i];i++)
|
||||||
{
|
{
|
||||||
|
@ -1136,6 +1137,12 @@ FState ** FindState(AActor * actor, const TypeInfo * type, const char * name)
|
||||||
return (&static_cast<ACustomInventory*>(actor)->UseState)+i;
|
return (&static_cast<ACustomInventory*>(actor)->UseState)+i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (type->IsDescendantOf (RUNTIME_CLASS(ASwitchableDecoration)))
|
||||||
|
{
|
||||||
|
// These are the names that 2.1.0 will use
|
||||||
|
if (!stricmp(name, "ACTIVE")) return &actor->SeeState;
|
||||||
|
if (!stricmp(name, "INACTIVE")) return &actor->MeleeState;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ void A_JumpIfCloser(AActor * self)
|
||||||
if (target==NULL) return;
|
if (target==NULL) return;
|
||||||
|
|
||||||
fixed_t dist = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
fixed_t dist = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
||||||
if (index>0 && P_AproxDistance(self->x-self->target->x, self->y-self->target->y) < dist)
|
if (index > 0 && P_AproxDistance(self->x-target->x, self->y-target->y) < dist)
|
||||||
DoJump(self, CallingState, StateParameters[index+1]);
|
DoJump(self, CallingState, StateParameters[index+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ void A_CallSpecial(AActor * self)
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
void A_CustomMissile(AActor * self)
|
void A_CustomMissile(AActor * self)
|
||||||
{
|
{
|
||||||
int index=CheckIndex(6);
|
int index=CheckIndex(7);
|
||||||
if (index<0) return;
|
if (index<0) return;
|
||||||
|
|
||||||
const char * MissileName=(const char*)StateParameters[index];
|
const char * MissileName=(const char*)StateParameters[index];
|
||||||
|
@ -500,6 +500,7 @@ void A_CustomMissile(AActor * self)
|
||||||
angle_t Angle=EvalExpressionF (StateParameters[index+3], self) * ANGLE_1;
|
angle_t Angle=EvalExpressionF (StateParameters[index+3], self) * ANGLE_1;
|
||||||
int aimmode=EvalExpressionI (StateParameters[index+4], self);
|
int aimmode=EvalExpressionI (StateParameters[index+4], self);
|
||||||
angle_t pitch=EvalExpressionF (StateParameters[index+5], self) * ANGLE_1;
|
angle_t pitch=EvalExpressionF (StateParameters[index+5], self) * ANGLE_1;
|
||||||
|
BOOL realtarget = EvalExpressionI (StateParameters[index+6], self);
|
||||||
|
|
||||||
AActor * targ;
|
AActor * targ;
|
||||||
AActor * missile;
|
AActor * missile;
|
||||||
|
@ -1064,16 +1065,8 @@ void A_SpawnItem(AActor * self)
|
||||||
{
|
{
|
||||||
if (originator->flags3&MF3_ISMONSTER)
|
if (originator->flags3&MF3_ISMONSTER)
|
||||||
{
|
{
|
||||||
// If this is a monster transfer all friendliness information
|
// If this is a monster, transfer all friendliness information
|
||||||
mo->target = originator->target;
|
mo->CopyFriendliness (originator, true);
|
||||||
mo->TIDtoHate = originator->TIDtoHate;
|
|
||||||
mo->LastLook = originator->LastLook;
|
|
||||||
mo->flags3 |= originator->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS);
|
|
||||||
mo->flags4 |= originator->flags4 & MF4_NOHATEPLAYERS;
|
|
||||||
mo->flags = (mo->flags & ~MF_FRIENDLY) | (originator->flags & MF_FRIENDLY);
|
|
||||||
// Note to Randy: This line is missing from all other friendliness transfers!
|
|
||||||
mo->FriendPlayer=originator->FriendPlayer;
|
|
||||||
|
|
||||||
if (useammo) mo->master = originator; // don't let it attack you (optional)!
|
if (useammo) mo->master = originator; // don't let it attack you (optional)!
|
||||||
}
|
}
|
||||||
else if (originator->player)
|
else if (originator->player)
|
||||||
|
|
Loading…
Reference in a new issue