mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-01 09:41:58 +00:00
Update to ZDoom r2037:
- fixed: The UDMF blockfloaters flag was misnamed. Changed to match the spec. - made the initial weave index for A_BishopMissileWeave and A_CStaffMissileSlither a configurable actor property. - added a menu item for snd_channels. - Extended MF3_SKYEXPLODE to apply to horizon walls as well. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@671 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
1cb4fb4adc
commit
8653592339
9 changed files with 54 additions and 29 deletions
|
@ -765,6 +765,7 @@ public:
|
||||||
DWORD flags6; // Shit! Where did all the flags go?
|
DWORD flags6; // Shit! Where did all the flags go?
|
||||||
int special1; // Special info
|
int special1; // Special info
|
||||||
int special2; // Special info
|
int special2; // Special info
|
||||||
|
int weaveindex; // Separated from special2 because it's used by globally accessible functions.
|
||||||
int health;
|
int health;
|
||||||
BYTE movedir; // 0-7
|
BYTE movedir; // 0-7
|
||||||
SBYTE visdir;
|
SBYTE visdir;
|
||||||
|
|
|
@ -60,7 +60,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopAttack2)
|
||||||
if (mo != NULL)
|
if (mo != NULL)
|
||||||
{
|
{
|
||||||
mo->tracer = self->target;
|
mo->tracer = self->target;
|
||||||
mo->special2 = 16; // High word == x/y, Low word == z
|
|
||||||
}
|
}
|
||||||
self->special1--;
|
self->special1--;
|
||||||
}
|
}
|
||||||
|
@ -77,10 +76,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopMissileWeave)
|
||||||
int weaveXY, weaveZ;
|
int weaveXY, weaveZ;
|
||||||
int angle;
|
int angle;
|
||||||
|
|
||||||
if (self->special2 == 0) self->special2 = 16;
|
// for compatibility this needs to set the value itself if it was never done by the projectile itself
|
||||||
|
if (self->weaveindex == -1) self->weaveindex = 16;
|
||||||
|
|
||||||
weaveXY = self->special2 >> 16;
|
// since these values are now user configurable we have to do a proper range check to avoid array overflows.
|
||||||
weaveZ = self->special2 & 0xFFFF;
|
weaveXY = (self->weaveindex >> 16) & 63;
|
||||||
|
weaveZ = (self->weaveindex & 63);
|
||||||
angle = (self->angle + ANG90) >> ANGLETOFINESHIFT;
|
angle = (self->angle + ANG90) >> ANGLETOFINESHIFT;
|
||||||
newX = self->x - FixedMul (finecosine[angle], FloatBobOffsets[weaveXY]<<1);
|
newX = self->x - FixedMul (finecosine[angle], FloatBobOffsets[weaveXY]<<1);
|
||||||
newY = self->y - FixedMul (finesine[angle], FloatBobOffsets[weaveXY]<<1);
|
newY = self->y - FixedMul (finesine[angle], FloatBobOffsets[weaveXY]<<1);
|
||||||
|
@ -91,7 +92,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopMissileWeave)
|
||||||
self->z -= FloatBobOffsets[weaveZ];
|
self->z -= FloatBobOffsets[weaveZ];
|
||||||
weaveZ = (weaveZ + 2) & 63;
|
weaveZ = (weaveZ + 2) & 63;
|
||||||
self->z += FloatBobOffsets[weaveZ];
|
self->z += FloatBobOffsets[weaveZ];
|
||||||
self->special2 = weaveZ + (weaveXY<<16);
|
self->weaveindex = weaveZ + (weaveXY<<16);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -135,12 +135,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffAttack)
|
||||||
mo = P_SpawnPlayerMissile (self, RUNTIME_CLASS(ACStaffMissile), self->angle-(ANG45/15));
|
mo = P_SpawnPlayerMissile (self, RUNTIME_CLASS(ACStaffMissile), self->angle-(ANG45/15));
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
mo->special2 = 32;
|
mo->weaveindex = 32;
|
||||||
}
|
}
|
||||||
mo = P_SpawnPlayerMissile (self, RUNTIME_CLASS(ACStaffMissile), self->angle+(ANG45/15));
|
mo = P_SpawnPlayerMissile (self, RUNTIME_CLASS(ACStaffMissile), self->angle+(ANG45/15));
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
mo->special2 = 0;
|
mo->weaveindex = 0;
|
||||||
}
|
}
|
||||||
S_Sound (self, CHAN_WEAPON, "ClericCStaffFire", 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, "ClericCStaffFire", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffMissileSlither)
|
||||||
int weaveXY;
|
int weaveXY;
|
||||||
int angle;
|
int angle;
|
||||||
|
|
||||||
weaveXY = self->special2;
|
if (self->weaveindex == -1) self->weaveindex = 0;
|
||||||
|
|
||||||
|
// since these values are now user configurable we have to do a proper range check to avoid array overflows.
|
||||||
|
weaveXY = self->weaveindex & 63;
|
||||||
angle = (self->angle+ANG90)>>ANGLETOFINESHIFT;
|
angle = (self->angle+ANG90)>>ANGLETOFINESHIFT;
|
||||||
newX = self->x-FixedMul(finecosine[angle], FloatBobOffsets[weaveXY]);
|
newX = self->x-FixedMul(finecosine[angle], FloatBobOffsets[weaveXY]);
|
||||||
newY = self->y-FixedMul(finesine[angle], FloatBobOffsets[weaveXY]);
|
newY = self->y-FixedMul(finesine[angle], FloatBobOffsets[weaveXY]);
|
||||||
|
@ -165,7 +168,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffMissileSlither)
|
||||||
newX += FixedMul(finecosine[angle], FloatBobOffsets[weaveXY]);
|
newX += FixedMul(finecosine[angle], FloatBobOffsets[weaveXY]);
|
||||||
newY += FixedMul(finesine[angle], FloatBobOffsets[weaveXY]);
|
newY += FixedMul(finesine[angle], FloatBobOffsets[weaveXY]);
|
||||||
P_TryMove (self, newX, newY, true);
|
P_TryMove (self, newX, newY, true);
|
||||||
self->special2 = weaveXY;
|
self->weaveindex = weaveXY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -370,7 +370,7 @@ xx(Blockplayers)
|
||||||
xx(Blockeverything)
|
xx(Blockeverything)
|
||||||
xx(Zoneboundary)
|
xx(Zoneboundary)
|
||||||
xx(Jumpover)
|
xx(Jumpover)
|
||||||
xx(Blockfloating)
|
xx(Blockfloaters)
|
||||||
xx(Clipmidtex)
|
xx(Clipmidtex)
|
||||||
xx(Wrapmidtex)
|
xx(Wrapmidtex)
|
||||||
xx(Midtex3d)
|
xx(Midtex3d)
|
||||||
|
|
|
@ -312,6 +312,14 @@ void AActor::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
arc << DamageFactor;
|
arc << DamageFactor;
|
||||||
}
|
}
|
||||||
|
if (SaveVersion >= 2036)
|
||||||
|
{
|
||||||
|
arc << weaveindex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
weaveindex = special2;
|
||||||
|
}
|
||||||
|
|
||||||
// Skip past uservar array in old savegames
|
// Skip past uservar array in old savegames
|
||||||
if (SaveVersion < 1933)
|
if (SaveVersion < 1933)
|
||||||
|
@ -1190,7 +1198,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line != NULL && line->special == Line_Horizon)
|
if (line != NULL && line->special == Line_Horizon && !(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
{
|
{
|
||||||
// [RH] Don't explode missiles on horizon lines.
|
// [RH] Don't explode missiles on horizon lines.
|
||||||
mo->Destroy ();
|
mo->Destroy ();
|
||||||
|
@ -1901,22 +1909,24 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
||||||
}
|
}
|
||||||
explode:
|
explode:
|
||||||
// explode a missile
|
// explode a missile
|
||||||
if (tm.ceilingline &&
|
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
tm.ceilingline->backsector &&
|
|
||||||
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
|
||||||
mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y) && //killough
|
|
||||||
!(mo->flags3 & MF3_SKYEXPLODE))
|
|
||||||
{
|
{
|
||||||
// Hack to prevent missiles exploding against the sky.
|
if (tm.ceilingline &&
|
||||||
// Does not handle sky floors.
|
tm.ceilingline->backsector &&
|
||||||
mo->Destroy ();
|
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||||
return oldfloorz;
|
mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y))
|
||||||
}
|
{
|
||||||
// [RH] Don't explode on horizon lines.
|
// Hack to prevent missiles exploding against the sky.
|
||||||
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
|
// Does not handle sky floors.
|
||||||
{
|
mo->Destroy ();
|
||||||
mo->Destroy ();
|
return oldfloorz;
|
||||||
return oldfloorz;
|
}
|
||||||
|
// [RH] Don't explode on horizon lines.
|
||||||
|
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
|
||||||
|
{
|
||||||
|
mo->Destroy ();
|
||||||
|
return oldfloorz;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj);
|
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj);
|
||||||
return oldfloorz;
|
return oldfloorz;
|
||||||
|
|
|
@ -691,7 +691,7 @@ struct UDMFParser
|
||||||
Flag(ld->flags, ML_RAILING, key);
|
Flag(ld->flags, ML_RAILING, key);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case NAME_Blockfloating:
|
case NAME_Blockfloaters:
|
||||||
CHECK_N(St | Zd | Zdt | Va)
|
CHECK_N(St | Zd | Zdt | Va)
|
||||||
Flag(ld->flags, ML_BLOCK_FLOATERS, key);
|
Flag(ld->flags, ML_BLOCK_FLOATERS, key);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "2033"
|
#define ZD_SVN_REVISION_STRING "2037"
|
||||||
#define ZD_SVN_REVISION_NUMBER 2033
|
#define ZD_SVN_REVISION_NUMBER 2037
|
||||||
|
|
|
@ -902,6 +902,15 @@ DEFINE_PROPERTY(bouncecount, I, Actor)
|
||||||
defaults->bouncecount = id;
|
defaults->bouncecount = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
DEFINE_PROPERTY(weaveindex, I, Actor)
|
||||||
|
{
|
||||||
|
PROP_INT_PARM(id, 0);
|
||||||
|
defaults->weaveindex = id;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -19,6 +19,7 @@ ACTOR Actor native //: Thinker
|
||||||
Gravity 1
|
Gravity 1
|
||||||
DamageFactor 1.0
|
DamageFactor 1.0
|
||||||
PushFactor 0.25
|
PushFactor 0.25
|
||||||
|
WeaveIndex -1
|
||||||
|
|
||||||
// Variables for the expression evaluator
|
// Variables for the expression evaluator
|
||||||
// NOTE: fixed_t and angle_t are only used here to ensure proper conversion
|
// NOTE: fixed_t and angle_t are only used here to ensure proper conversion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue