mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- 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:
parent
b9ea9a415e
commit
fc6e48dd3f
1 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue