mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-02 10:11:31 +00:00
* Updated to ZDoom r3319:
- Fixed: Cht_ChangeLevel cheats should not check for disabled cheats. - Added SMF_CURSPEED flag for A_SeekerMissile to cause it to use the missile's current speed rather than its Speed property. - Initialize all parameters when converting MBF_PlaySound to A_PlaySound, because volume was being passed as 0 to A_PlaySound. - Fix: Use correct pickup flash color. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1265 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
7038a4ee5b
commit
1ec6c3625b
8 changed files with 27 additions and 18 deletions
|
@ -691,8 +691,11 @@ void SetDehParams(FState * state, int codepointer)
|
||||||
if (value2) StateParams.Set(ParamIndex+1, new FxConstant(SoundMap[value2-1], *pos)); // hit sound
|
if (value2) StateParams.Set(ParamIndex+1, new FxConstant(SoundMap[value2-1], *pos)); // hit sound
|
||||||
break;
|
break;
|
||||||
case MBF_PlaySound:
|
case MBF_PlaySound:
|
||||||
StateParams.Set(ParamIndex+0, new FxConstant(SoundMap[value1-1], *pos)); // soundid
|
StateParams.Set(ParamIndex+0, new FxConstant(SoundMap[value1-1], *pos)); // soundid
|
||||||
StateParams.Set(ParamIndex+4, new FxConstant((value2?ATTN_NONE:ATTN_NORM), *pos)); // attenuation
|
StateParams.Set(ParamIndex+1, new FxConstant(CHAN_BODY, *pos)); // channel
|
||||||
|
StateParams.Set(ParamIndex+2, new FxConstant(1.0, *pos)); // volume
|
||||||
|
StateParams.Set(ParamIndex+3, new FxConstant(false, *pos)); // looping
|
||||||
|
StateParams.Set(ParamIndex+4, new FxConstant((value2 ? ATTN_NONE : ATTN_NORM), *pos)); // attenuation
|
||||||
break;
|
break;
|
||||||
case MBF_RandomJump:
|
case MBF_RandomJump:
|
||||||
StateParams.Set(ParamIndex+0, new FxConstant(2, *pos)); // count
|
StateParams.Set(ParamIndex+0, new FxConstant(2, *pos)); // count
|
||||||
|
|
|
@ -97,7 +97,7 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer=false);
|
||||||
|
|
||||||
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
||||||
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
||||||
bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool precise = false);
|
bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool precise = false, bool usecurspeed=false);
|
||||||
|
|
||||||
enum EPuffFlags
|
enum EPuffFlags
|
||||||
{
|
{
|
||||||
|
|
|
@ -1468,16 +1468,18 @@ bool AActor::CanSeek(AActor *target) const
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool precise)
|
bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool precise, bool usecurspeed)
|
||||||
{
|
{
|
||||||
int dir;
|
int dir;
|
||||||
int dist;
|
int dist;
|
||||||
angle_t delta;
|
angle_t delta;
|
||||||
angle_t angle;
|
angle_t angle;
|
||||||
AActor *target;
|
AActor *target;
|
||||||
|
fixed_t speed;
|
||||||
|
|
||||||
|
speed = !usecurspeed ? actor->Speed : xs_CRoundToInt(TVector3<double>(actor->velx, actor->vely, actor->velz).Length());
|
||||||
target = actor->tracer;
|
target = actor->tracer;
|
||||||
if (target == NULL || actor->Speed == 0 || !actor->CanSeek(target))
|
if (target == NULL || speed == 0 || !actor->CanSeek(target))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1507,8 +1509,8 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
|
||||||
|
|
||||||
if (!precise)
|
if (!precise)
|
||||||
{
|
{
|
||||||
actor->velx = FixedMul (actor->Speed, finecosine[angle]);
|
actor->velx = FixedMul (speed, finecosine[angle]);
|
||||||
actor->vely = FixedMul (actor->Speed, finesine[angle]);
|
actor->vely = FixedMul (speed, finesine[angle]);
|
||||||
|
|
||||||
if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
|
if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
|
||||||
{
|
{
|
||||||
|
@ -1516,7 +1518,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
|
||||||
target->z + target->height < actor->z)
|
target->z + target->height < actor->z)
|
||||||
{ // Need to seek vertically
|
{ // Need to seek vertically
|
||||||
dist = P_AproxDistance (target->x - actor->x, target->y - actor->y);
|
dist = P_AproxDistance (target->x - actor->x, target->y - actor->y);
|
||||||
dist = dist / actor->Speed;
|
dist = dist / speed;
|
||||||
if (dist < 1)
|
if (dist < 1)
|
||||||
{
|
{
|
||||||
dist = 1;
|
dist = 1;
|
||||||
|
@ -1541,8 +1543,8 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
|
||||||
pitch >>= ANGLETOFINESHIFT;
|
pitch >>= ANGLETOFINESHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t xyscale = FixedMul(actor->Speed, finecosine[pitch]);
|
fixed_t xyscale = FixedMul(speed, finecosine[pitch]);
|
||||||
actor->velz = FixedMul(actor->Speed, finesine[pitch]);
|
actor->velz = FixedMul(speed, finesine[pitch]);
|
||||||
actor->velx = FixedMul(xyscale, finecosine[angle]);
|
actor->velx = FixedMul(xyscale, finecosine[angle]);
|
||||||
actor->vely = FixedMul(xyscale, finesine[angle]);
|
actor->vely = FixedMul(xyscale, finesine[angle]);
|
||||||
}
|
}
|
||||||
|
@ -1872,6 +1874,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Reflect the missile along angle
|
// Reflect the missile along angle
|
||||||
mo->angle = angle;
|
mo->angle = angle;
|
||||||
angle >>= ANGLETOFINESHIFT;
|
angle >>= ANGLETOFINESHIFT;
|
||||||
|
@ -2468,6 +2471,7 @@ void P_NightmareRespawn (AActor *mobj)
|
||||||
|
|
||||||
z = mo->z;
|
z = mo->z;
|
||||||
|
|
||||||
|
|
||||||
// inherit attributes from deceased one
|
// inherit attributes from deceased one
|
||||||
mo->SpawnPoint[0] = mobj->SpawnPoint[0];
|
mo->SpawnPoint[0] = mobj->SpawnPoint[0];
|
||||||
mo->SpawnPoint[1] = mobj->SpawnPoint[1];
|
mo->SpawnPoint[1] = mobj->SpawnPoint[1];
|
||||||
|
|
|
@ -193,7 +193,7 @@ static cheatseq_t DoomCheats[] =
|
||||||
{ CheatPowerup[4], 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic },
|
{ CheatPowerup[4], 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic },
|
||||||
{ CheatPowerup[5], 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic },
|
{ CheatPowerup[5], 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic },
|
||||||
{ CheatChoppers, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic },
|
{ CheatChoppers, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic },
|
||||||
{ CheatClev, 0, 0, 0, {0,0}, Cht_ChangeLevel }
|
{ CheatClev, 0, 1, 0, {0,0}, Cht_ChangeLevel }
|
||||||
};
|
};
|
||||||
|
|
||||||
static cheatseq_t HereticCheats[] =
|
static cheatseq_t HereticCheats[] =
|
||||||
|
@ -211,7 +211,7 @@ static cheatseq_t HereticCheats[] =
|
||||||
{ CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic },
|
{ CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic },
|
||||||
{ CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic },
|
{ CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic },
|
||||||
{ CheatMassacre, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic },
|
{ CheatMassacre, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic },
|
||||||
{ CheatEngage, 0, 0, 0, {0,0}, Cht_ChangeLevel },
|
{ CheatEngage, 0, 1, 0, {0,0}, Cht_ChangeLevel },
|
||||||
{ CheatPowerup1[0], 0, 0, 0, {CHT_GIMMIEA,0}, Cht_Generic },
|
{ CheatPowerup1[0], 0, 0, 0, {CHT_GIMMIEA,0}, Cht_Generic },
|
||||||
{ CheatPowerup1[1], 0, 0, 0, {CHT_GIMMIEB,0}, Cht_Generic },
|
{ CheatPowerup1[1], 0, 0, 0, {CHT_GIMMIEB,0}, Cht_Generic },
|
||||||
{ CheatPowerup1[2], 0, 0, 0, {CHT_GIMMIEC,0}, Cht_Generic },
|
{ CheatPowerup1[2], 0, 0, 0, {CHT_GIMMIEC,0}, Cht_Generic },
|
||||||
|
@ -262,7 +262,7 @@ static cheatseq_t StrifeCheats[] =
|
||||||
{ CheatPowerup2[4], 0, 0, 0, {CHT_PUMPUPP,0}, Cht_Generic },
|
{ CheatPowerup2[4], 0, 0, 0, {CHT_PUMPUPP,0}, Cht_Generic },
|
||||||
{ CheatPowerup2[5], 0, 0, 0, {CHT_PUMPUPS,0}, Cht_Generic },
|
{ CheatPowerup2[5], 0, 0, 0, {CHT_PUMPUPS,0}, Cht_Generic },
|
||||||
{ CheatPowerup2[6], 0, 0, 0, {CHT_PUMPUPT,0}, Cht_Generic },
|
{ CheatPowerup2[6], 0, 0, 0, {CHT_PUMPUPT,0}, Cht_Generic },
|
||||||
{ CheatRift, 0, 0, 0, {0,0}, Cht_ChangeLevel },
|
{ CheatRift, 0, 1, 0, {0,0}, Cht_ChangeLevel },
|
||||||
{ CheatDonnyTrump, 0, 0, 0, {CHT_DONNYTRUMP,0},Cht_Generic },
|
{ CheatDonnyTrump, 0, 0, 0, {CHT_DONNYTRUMP,0},Cht_Generic },
|
||||||
{ CheatScoot, 0, 0, 0, {0,0}, Cht_ChangeStartSpot },
|
{ CheatScoot, 0, 0, 0, {0,0}, Cht_ChangeStartSpot },
|
||||||
{ CheatLego, 0, 0, 0, {CHT_LEGO,0}, Cht_Generic },
|
{ CheatLego, 0, 0, 0, {CHT_LEGO,0}, Cht_Generic },
|
||||||
|
@ -284,7 +284,7 @@ static cheatseq_t ChexCheats[] =
|
||||||
{ CheatDigitalCafe, 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic },
|
{ CheatDigitalCafe, 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic },
|
||||||
{ CheatJoshuaStorms, 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic },
|
{ CheatJoshuaStorms, 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic },
|
||||||
{ CheatJoelKoenigs, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic },
|
{ CheatJoelKoenigs, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic },
|
||||||
{ CheatLeeSnyder, 0, 0, 0, {0,0}, Cht_ChangeLevel }
|
{ CheatLeeSnyder, 0, 1, 0, {0,0}, Cht_ChangeLevel }
|
||||||
};
|
};
|
||||||
|
|
||||||
static cheatseq_t SpecialCheats[] =
|
static cheatseq_t SpecialCheats[] =
|
||||||
|
|
|
@ -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 "3315"
|
#define ZD_SVN_REVISION_STRING "3319"
|
||||||
#define ZD_SVN_REVISION_NUMBER 3315
|
#define ZD_SVN_REVISION_NUMBER 3319
|
||||||
|
|
|
@ -487,6 +487,7 @@ enum
|
||||||
{
|
{
|
||||||
SMF_LOOK = 1,
|
SMF_LOOK = 1,
|
||||||
SMF_PRECISE = 2,
|
SMF_PRECISE = 2,
|
||||||
|
SMF_CURSPEED = 4,
|
||||||
};
|
};
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SeekerMissile)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SeekerMissile)
|
||||||
{
|
{
|
||||||
|
@ -501,7 +502,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SeekerMissile)
|
||||||
{
|
{
|
||||||
self->tracer = P_RoughMonsterSearch (self, distance);
|
self->tracer = P_RoughMonsterSearch (self, distance);
|
||||||
}
|
}
|
||||||
P_SeekerMissile(self, clamp<int>(ang1, 0, 90) * ANGLE_1, clamp<int>(ang2, 0, 90) * ANGLE_1, !!(flags & SMF_PRECISE));
|
P_SeekerMissile(self, clamp<int>(ang1, 0, 90) * ANGLE_1, clamp<int>(ang2, 0, 90) * ANGLE_1, !!(flags & SMF_PRECISE), !!(flags & SMF_CURSPEED));
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -124,6 +124,7 @@ const int BF_AFFECTBOSSES = 4;
|
||||||
// Flags for A_SeekerMissile
|
// Flags for A_SeekerMissile
|
||||||
const int SMF_LOOK = 1;
|
const int SMF_LOOK = 1;
|
||||||
const int SMF_PRECISE = 2;
|
const int SMF_PRECISE = 2;
|
||||||
|
const int SMF_CURSPEED = 4;
|
||||||
|
|
||||||
// Flags for A_CustomPunch
|
// Flags for A_CustomPunch
|
||||||
const int CPF_USEAMMO = 1;
|
const int CPF_USEAMMO = 1;
|
||||||
|
|
|
@ -43,7 +43,7 @@ gameinfo
|
||||||
endoom = "ENDOOM"
|
endoom = "ENDOOM"
|
||||||
player5start = 4001
|
player5start = 4001
|
||||||
drawreadthis = true
|
drawreadthis = true
|
||||||
pickupcolor = "d6 ba 45"
|
pickupcolor = "d7 ba 45"
|
||||||
quitmessages = "$QUITMSG", "$QUITMSG23", "$QUITMSG24", "$QUITMSG25", "$QUITMSG26", "$QUITMSG27", "$QUITMSG28", "$QUITMSG29"
|
quitmessages = "$QUITMSG", "$QUITMSG23", "$QUITMSG24", "$QUITMSG25", "$QUITMSG26", "$QUITMSG27", "$QUITMSG28", "$QUITMSG29"
|
||||||
menufontcolor_title = "GREEN"
|
menufontcolor_title = "GREEN"
|
||||||
menufontcolor_label = "UNTRANSLATED"
|
menufontcolor_label = "UNTRANSLATED"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue