- fixed: Calculating sector heights with transparent door hacks was wrong.

- fixed: Sector height was wrong for sectors that have a slope transfer for
  a horizontal plane.
- better error reporting for shader compile errors.


Update to ZDoom r1942:

- Changes to both A_MonsterRail() and A_CustomRailgun(): Save actor's pitch,
  use a larger aiming range, ignore non-targets in P_AimLineAttack(), and
  aim at the target anyway even if P_AimLineAttack() decides it has no
  chance of hitting.
- Added another parameter to P_AimLineAttack(): A target to be aimed at. If
  this is non-NULL, then all actors between the shooter and the target will
  be ignored.
- Added new sound sequence ACS functions:
    SoundSequenceOnActor(int tid, string seqname);
    SoundSequenceOnSector(int tag, string seqname, int location);
    SoundSequenceOnPolyobj(int polynum, string seqname);
  SoundSequenceOnSector takes an extra parameter that specifies where in the
  sector the sound comes from (floor, ceiling, interior, or all of it). See
  the SECSEQ defines in zdefs.acs.
- Fixed: R_RenderDecal() must save various Wall globals, because the originals
  may still be needed. In particular, when drawing a seg with a midtexture is
  split by foreground geometry, the first drawseg generated from it will have
  the correct WallSZ1,2 values, but subsequent ones will have whatever
  R_RenderDecal() left behind. These values are used to calculate the upper
  and lower bounds of the midtexture. (Ironically, my work to Build-ify things
  had done away with these globals, but that's gone now.)


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@581 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-28 20:14:24 +00:00
parent 4799da28a3
commit 83bc5817e1
17 changed files with 250 additions and 146 deletions

View file

@ -1179,9 +1179,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
ACTION_PARAM_FLOAT(MaxDiff, 6);
ACTION_PARAM_CLASS(PuffType, 7);
AActor *linetarget;
fixed_t saved_x = self->x;
fixed_t saved_y = self->y;
angle_t saved_angle = self->angle;
fixed_t saved_pitch = self->pitch;
if (aim && self->target == NULL)
{
@ -1198,16 +1201,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
if (aim)
{
self->angle = R_PointToAngle2 (self->x,
self->y,
self->target->x,
self->target->y);
}
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE);
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE, &linetarget, ANGLE_1*60, false, false, false, aim ? self->target : NULL);
if (linetarget == NULL && aim)
{
// We probably won't hit the target, but aim at it anyway so we don't look stupid.
FVector2 xydiff(self->target->x - self->x, self->target->y - self->y);
double zdiff = (self->target->z + (self->target->height>>1)) -
(self->z + (self->height>>1) - self->floorclip);
self->pitch = int(atan2(zdiff, xydiff.Length()) * ANGLE_180 / -M_PI);
}
// Let the aim trail behind the player
if (aim)
{
@ -1242,6 +1249,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
self->x = saved_x;
self->y = saved_y;
self->angle = saved_angle;
self->pitch = saved_pitch;
}
//===========================================================================