- Reintroduced Doom.exe's player_t::usedown variable so that respawning a
player does not immediately activate switches. oldbuttons was not usable for this. This also required that CopyPlayer preserves this info. - Fixed: When restarting the music there was a NULL pointer check missing so it crashed when the game was started wi - Fixed: If the Use key is used to respawn the player it must be cleared so that it doesn't trigger any subsequent actions after respawning. - Fixed: Resurrecting a monster did not restore flags5 and flags6. - Fixed: Projectiles which killed a non-monster were unable to determine what precisely they hit because MF_CORPSE is only valid for monsters. A new flag, MF6_KILLED that gets set for all objects that die, was added for this case. - Added a generic A_Weave function that exposes all possible options of A_BishopMissileWeave and A_CStaffMissileSlither. These 2 functions are no longer needed from DECORATE and therefore deprecated. SVN r2045 (trunk)
This commit is contained in:
parent
b3986a0235
commit
85c683e0c7
16 changed files with 102 additions and 51 deletions
|
|
@ -3019,6 +3019,58 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Quake)
|
|||
P_StartQuake(self, 0, intensity, duration, damrad, tremrad, sound);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_Weave
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdist)
|
||||
{
|
||||
fixed_t newX, newY;
|
||||
int weaveXY, weaveZ;
|
||||
int angle;
|
||||
fixed_t dist;
|
||||
|
||||
weaveXY = self->WeaveIndexXY & 63;
|
||||
weaveZ = self->WeaveIndexZ & 63;
|
||||
angle = (self->angle + ANG90) >> ANGLETOFINESHIFT;
|
||||
|
||||
if (xydist != 0 && xyspeed != 0)
|
||||
{
|
||||
dist = FixedMul(FloatBobOffsets[weaveXY], xydist);
|
||||
newX = self->x - FixedMul (finecosine[angle], dist);
|
||||
newY = self->y - FixedMul (finesine[angle], dist);
|
||||
weaveXY = (weaveXY + xyspeed) & 63;
|
||||
dist = FixedMul(FloatBobOffsets[weaveXY], xydist);
|
||||
newX += FixedMul (finecosine[angle], dist);
|
||||
newY += FixedMul (finesine[angle], dist);
|
||||
P_TryMove (self, newX, newY, true);
|
||||
self->WeaveIndexXY = weaveXY;
|
||||
}
|
||||
|
||||
if (zdist != 0 && zspeed != 0)
|
||||
{
|
||||
self->z -= FixedMul(FloatBobOffsets[weaveZ], zdist);
|
||||
weaveZ = (weaveZ + zspeed) & 63;
|
||||
self->z += FixedMul(FloatBobOffsets[weaveZ], zdist);
|
||||
self->WeaveIndexZ = weaveZ;
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Weave)
|
||||
{
|
||||
ACTION_PARAM_START(4);
|
||||
ACTION_PARAM_INT(xspeed, 0);
|
||||
ACTION_PARAM_INT(yspeed, 1);
|
||||
ACTION_PARAM_FIXED(xdist, 2);
|
||||
ACTION_PARAM_FIXED(ydist, 3);
|
||||
A_Weave(self, xspeed, yspeed, xdist, ydist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_LineEffect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue