- Fixed: Hexen's ammo display in the status bar cannot be refreshed

partially because the background patch has to be drawn always to 
  overwrite the old display.
- Fixed: Giving a health item to a non-player caused a crash.
- Added a compatibility option to limit deh.MaxHealth to the health bonus.
  Originally this value wasn't used for health packs. Doing this was a bug
  in Boom but since there's quite a few maps out there which require
  Boom's altered behavior it has to be compatibility optioned.
- Fixed: The health bonus's max health must be defined by deh.MaxHealth, 
  not deh.MaxSoulsphere. To achieve this deh.MaxHealth's handling had to
  be altered because it has to default to 100.
- Fixed: ZDBSP created incorrect side references with compressed sidedefs
  and both sidedefs of a linedef being the same. This only affects the
  external tool because the internal node builder is run after uncompressing
  the sidedefs.
- Added Jim's latest makefile.linux.
- Added a consistency check to the PNAMES loader because one crash log
  indicated that it crashed due to a corrupt PNAMES lump.
- Brought back the sector based sound target handling as a compatibility
  option. This radical change just broke far too many maps that depend
  on the original behavior. Strife's special AI functions are excluded 
  though because they work better with the new method.


SVN r56 (trunk)
This commit is contained in:
Christoph Oelckers 2006-04-20 14:21:27 +00:00
parent 24d4f0b45c
commit 702d5bbc3e
1 changed files with 57 additions and 3 deletions

View File

@ -186,9 +186,36 @@ DWORD FNodeBuilder::PushGLSeg (TArray<MapSegGLEx> &segs, const FPrivSeg *seg)
newseg.v1 = seg->v1;
newseg.v2 = seg->v2;
newseg.linedef = seg->linedef;
newseg.side = newseg.linedef != NO_INDEX
? Level.Lines[newseg.linedef].sidenum[1] == seg->sidedef ? 1 : 0
: 0;
// Just checking the sidedef to determine the side is insufficient.
// When a level is sidedef compressed both sides may well have the same sidedef.
if (newseg.linedef != NO_INDEX)
{
MapLineDef2 * ld = &Level.Lines[newseg.linedef];
if (ld->sidenum[0]==ld->sidenum[1])
{
// When both sidedefs are the same a quick check doesn't work so this
// has to be done by comparing the distances of the seg's end point to
// the line's start.
WideVertex * lv1 = &Level.Vertices[ld->v1];
WideVertex * sv1 = &Level.Vertices[seg->v1];
WideVertex * sv2 = &Level.Vertices[seg->v2];
double dist1sq = double(sv1->x-lv1->x)*(sv1->x-lv1->x) + double(sv1->y-lv1->y)*(sv1->y-lv1->y);
double dist2sq = double(sv2->x-lv1->x)*(sv2->x-lv1->x) + double(sv2->y-lv1->y)*(sv2->y-lv1->y);
newseg.side = dist1sq<dist2sq? 0:1;
}
else
{
newseg.side = ld->sidenum[1] == seg->sidedef ? 1 : 0;
}
}
else newseg.side=0;
newseg.partner = seg->partner;
return segs.Push (newseg);
}
@ -319,6 +346,33 @@ int FNodeBuilder::StripMinisegs (TArray<MapSeg> &segs, int subsector, short bbox
newseg.angle = org->angle >> 16;
newseg.offset = org->offset >> FRACBITS;
newseg.linedef = org->linedef;
// Just checking the sidedef to determine the side is insufficient.
// When a level is sidedef compressed both sides may well have the same sidedef.
MapLineDef2 * ld = &Level.Lines[newseg.linedef];
if (ld->sidenum[0]==ld->sidenum[1])
{
// When both sidedefs are the same a quick check doesn't work so this
// has to be done by comparing the distances of the seg's end point to
// the line's start.
WideVertex * lv1 = &Level.Vertices[ld->v1];
WideVertex * sv1 = &Level.Vertices[org->v1];
WideVertex * sv2 = &Level.Vertices[org->v2];
double dist1sq = double(sv1->x-lv1->x)*(sv1->x-lv1->x) + double(sv1->y-lv1->y)*(sv1->y-lv1->y);
double dist2sq = double(sv2->x-lv1->x)*(sv2->x-lv1->x) + double(sv2->y-lv1->y)*(sv2->y-lv1->y);
newseg.side = dist1sq<dist2sq? 0:1;
}
else
{
newseg.side = ld->sidenum[1] == org->sidedef ? 1 : 0;
}
newseg.side = Level.Lines[org->linedef].sidenum[1] == org->sidedef ? 1 : 0;
segs.Push (newseg);
++count;