mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
Update to ZDoom r1344:
- Fixed: SBARINFO used GetSpecies instead of GetClass to check weapon types. - Added a few missing NULL pointer checks to SBARINFO code. - Changed pickup sounds of local player to unpaused to resolve problems with the time freezer and make them behave better. - Fixed: When sounds are paused not all newly started sounds should actually be played. - Fixed: SBARINFO had no means to check if a weapon uses any ammo at all and as a result the inventory icon was misplaced if a no-ammo weapon was selected. - Fixed: P_CheckMissileSpawn and AFastProjectile didn't adjust their calculations for missiles with small radii. - Added a new aiming mode to A_CustomRailgun to aim directly at the target from the actual point the shot originates from. - Added a constant name for Skulltag's 128 flag for A_SpawnItemEx. For compatibility ZDoom needs to define this name, too, even though it doesn't use it. - Fixed: The nodebuilder could hang on badly set up polyobjects. Now it aborts when the loop iterates NumberOfSegs times. - Fixed: FMOD calls for setting the water reverb must check the return code for errors. - Fixed: Hexen's dual attack weapons must check distance to targets in 3D, not 2D. - Made several DECORATE errors which do not involve parsing non-fatal. - Added a static error counter to FScriptPosition class. - Changed initialization of actor class type properties: fuglyname is gone as is the postprocessing in FinishThingdef. Instead an empty placeholder class is now created when a class is first referenced and this placeholder is later filled in. - Added option to replace backslash with '^' in state frame definitions because the backslash is just causing too many problems because it's also an escape character. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@282 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
bf7bfdfeb0
commit
8b61dada84
31 changed files with 469 additions and 269 deletions
|
@ -1073,6 +1073,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
|||
// also for monsters
|
||||
//
|
||||
//==========================================================================
|
||||
enum
|
||||
{
|
||||
CRF_DONTAIM = 0,
|
||||
CRF_AIMPARALLEL = 1,
|
||||
CRF_AIMDIRECT = 2
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
||||
{
|
||||
|
@ -1082,10 +1088,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
ACTION_PARAM_COLOR(Color1, 2);
|
||||
ACTION_PARAM_COLOR(Color2, 3);
|
||||
ACTION_PARAM_BOOL(Silent, 4);
|
||||
ACTION_PARAM_BOOL(aim, 5);
|
||||
ACTION_PARAM_INT(aim, 5);
|
||||
ACTION_PARAM_FLOAT(MaxDiff, 6);
|
||||
ACTION_PARAM_CLASS(PuffType, 7);
|
||||
|
||||
fixed_t saved_x = self->x;
|
||||
fixed_t saved_y = self->y;
|
||||
angle_t saved_angle = self->angle;
|
||||
|
||||
if (aim && self->target == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -1098,12 +1108,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
|
||||
self->flags &= ~MF_AMBUSH;
|
||||
|
||||
|
||||
if (aim)
|
||||
{
|
||||
|
||||
self->angle = R_PointToAngle2 (self->x,
|
||||
self->y,
|
||||
self->target->x,
|
||||
self->target->y);
|
||||
|
||||
}
|
||||
|
||||
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE);
|
||||
|
@ -1111,18 +1124,37 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
// Let the aim trail behind the player
|
||||
if (aim)
|
||||
{
|
||||
self->angle = R_PointToAngle2 (self->x,
|
||||
self->y,
|
||||
saved_angle = self->angle = R_PointToAngle2 (self->x, self->y,
|
||||
self->target->x - self->target->momx * 3,
|
||||
self->target->y - self->target->momy * 3);
|
||||
|
||||
if (aim == CRF_AIMDIRECT)
|
||||
{
|
||||
// Tricky: We must offset to the angle of the current position
|
||||
// but then change the angle again to ensure proper aim.
|
||||
self->x += Spawnofs_XY * finecosine[self->angle];
|
||||
self->y += Spawnofs_XY * finesine[self->angle];
|
||||
Spawnofs_XY = 0;
|
||||
self->angle = R_PointToAngle2 (self->x, self->y,
|
||||
self->target->x - self->target->momx * 3,
|
||||
self->target->y - self->target->momy * 3);
|
||||
}
|
||||
|
||||
if (self->target->flags & MF_SHADOW)
|
||||
{
|
||||
self->angle += pr_crailgun.Random2() << 21;
|
||||
angle_t rnd = pr_crailgun.Random2() << 21;
|
||||
self->angle += rnd;
|
||||
saved_angle = rnd;
|
||||
}
|
||||
}
|
||||
|
||||
angle_t angle = (self->angle - ANG90) >> ANGLETOFINESHIFT;
|
||||
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffType);
|
||||
|
||||
self->x = saved_x;
|
||||
self->y = saved_y;
|
||||
self->angle = saved_angle;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue