- 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

@ -120,7 +120,6 @@ void PO_Init (void);
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static FPolyObj *GetPolyobj (int polyNum);
static int GetPolyobjMirror (int poly);
static void UpdateSegBBox (seg_t *seg);
static void RotatePt (int an, fixed_t *x, fixed_t *y, fixed_t startSpotX,
@ -184,7 +183,7 @@ DPolyAction::DPolyAction (int polyNum)
void DPolyAction::Destroy()
{
FPolyObj *poly = GetPolyobj (m_PolyObj);
FPolyObj *poly = PO_GetPolyobj (m_PolyObj);
if (poly->specialdata == NULL || poly->specialdata == this)
{
@ -197,7 +196,7 @@ void DPolyAction::Destroy()
void DPolyAction::SetInterpolation ()
{
FPolyObj *poly = GetPolyobj (m_PolyObj);
FPolyObj *poly = PO_GetPolyobj (m_PolyObj);
m_Interpolation = poly->SetInterpolation();
}
@ -278,7 +277,7 @@ void DRotatePoly::Tick ()
m_Dist -= absSpeed;
if (m_Dist == 0)
{
FPolyObj *poly = GetPolyobj (m_PolyObj);
FPolyObj *poly = PO_GetPolyobj (m_PolyObj);
if (poly->specialdata == this)
{
poly->specialdata = NULL;
@ -307,7 +306,7 @@ bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle,
DRotatePoly *pe;
FPolyObj *poly;
if ( (poly = GetPolyobj(polyNum)) )
if ( (poly = PO_GetPolyobj(polyNum)) )
{
if (poly->specialdata && !overRide)
{ // poly is already moving
@ -338,9 +337,9 @@ bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle,
poly->specialdata = pe;
SN_StartSequence (poly, poly->seqType, SEQ_DOOR, 0);
while ( (mirror = GetPolyobjMirror( polyNum)) )
while ( (mirror = GetPolyobjMirror(polyNum)) )
{
poly = GetPolyobj(mirror);
poly = PO_GetPolyobj(mirror);
if (poly == NULL)
{
I_Error ("EV_RotatePoly: Invalid polyobj num: %d\n", polyNum);
@ -390,7 +389,7 @@ void DMovePoly::Tick ()
m_Dist -= absSpeed;
if (m_Dist <= 0)
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
if (poly->specialdata == this)
{
poly->specialdata = NULL;
@ -421,7 +420,7 @@ bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle,
FPolyObj *poly;
angle_t an;
if ( (poly = GetPolyobj(polyNum)) )
if ( (poly = PO_GetPolyobj(polyNum)) )
{
if (poly->specialdata && !overRide)
{ // poly is already moving
@ -455,7 +454,7 @@ bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle,
while ( (mirror = GetPolyobjMirror(polyNum)) )
{
poly = GetPolyobj(mirror);
poly = PO_GetPolyobj(mirror);
if (poly && poly->specialdata && !overRide)
{ // mirroring poly is already in motion
break;
@ -493,7 +492,7 @@ void DPolyDoor::Tick ()
{
if (!--m_Tics)
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
SN_StartSequence (poly, poly->seqType, SEQ_DOOR, m_Close);
}
return;
@ -507,7 +506,7 @@ void DPolyDoor::Tick ()
m_Dist -= absSpeed;
if (m_Dist <= 0)
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
SN_StopSequence (poly);
if (!m_Close)
{
@ -531,7 +530,7 @@ void DPolyDoor::Tick ()
}
else
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
if (poly->crush || !m_Close)
{ // continue moving if the poly is a crusher, or is opening
return;
@ -560,7 +559,7 @@ void DPolyDoor::Tick ()
m_Dist -= absSpeed;
if (m_Dist <= 0)
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
SN_StopSequence (poly);
if (!m_Close)
{
@ -581,7 +580,7 @@ void DPolyDoor::Tick ()
}
else
{
poly = GetPolyobj (m_PolyObj);
poly = PO_GetPolyobj (m_PolyObj);
if(poly->crush || !m_Close)
{ // continue moving if the poly is a crusher, or is opening
return;
@ -614,7 +613,7 @@ bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle,
DPolyDoor *pd;
FPolyObj *poly;
if( (poly = GetPolyobj(polyNum)) )
if( (poly = PO_GetPolyobj(polyNum)) )
{
if (poly->specialdata)
{ // poly is already moving
@ -649,7 +648,7 @@ bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle,
while ( (mirror = GetPolyobjMirror (polyNum)) )
{
poly = GetPolyobj (mirror);
poly = PO_GetPolyobj (mirror);
if (poly && poly->specialdata)
{ // mirroring poly is already in motion
break;
@ -683,11 +682,11 @@ bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle,
//==========================================================================
//
// GetPolyobj
// PO_GetPolyobj
//
//==========================================================================
static FPolyObj *GetPolyobj (int polyNum)
FPolyObj *PO_GetPolyobj (int polyNum)
{
int i;
@ -844,7 +843,7 @@ bool PO_MovePolyobj (int num, int x, int y, bool force)
{
FPolyObj *po;
if (!(po = GetPolyobj (num)))
if (!(po = PO_GetPolyobj (num)))
{
I_Error ("PO_MovePolyobj: Invalid polyobj number: %d\n", num);
}
@ -954,7 +953,7 @@ bool PO_RotatePolyobj (int num, angle_t angle)
FPolyObj *po;
bool blocked;
if(!(po = GetPolyobj(num)))
if(!(po = PO_GetPolyobj(num)))
{
I_Error("PO_RotatePolyobj: Invalid polyobj number: %d\n", num);
}
@ -1662,7 +1661,7 @@ bool PO_Busy (int polyobj)
{
FPolyObj *poly;
poly = GetPolyobj (polyobj);
poly = PO_GetPolyobj (polyobj);
if (poly == NULL || poly->specialdata == NULL)
{
return false;