- Fixed: FPolyObj::LinkPolyobj() did not add the polyobject's first side to the polyobject's

bounding box. It should also add both vertices from each side, since non-closed polyobjects
  are possible with PolyObj_ExplicitLine.

SVN r2485 (trunk)
This commit is contained in:
Randy Heit 2010-08-01 19:50:41 +00:00
parent b9ea9a415e
commit fc6e48dd3f

View file

@ -1314,20 +1314,18 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
void FPolyObj::LinkPolyobj ()
{
int leftX, rightX;
int topY, bottomY;
polyblock_t **link;
polyblock_t *tempLink;
// calculate the polyobj bbox
vertex_t *vt = Sidedefs[0]->V1();
rightX = leftX = vt->x;
topY = bottomY = vt->y;
Bounds.ClearBox();
for(unsigned i = 1; i < Sidedefs.Size(); i++)
for(unsigned i = 0; i < Sidedefs.Size(); i++)
{
vt = Sidedefs[i]->V1();
vertex_t *vt;
vt = Sidedefs[i]->linedef->v1;
Bounds.AddToBox(vt->x, vt->y);
vt = Sidedefs[i]->linedef->v2;
Bounds.AddToBox(vt->x, vt->y);
}
bbox[BOXRIGHT] = (Bounds.Right() - bmaporgx) >> MAPBLOCKSHIFT;