- started cleanup of model code.
* refactored FBoundingBox so that the game dependent members are global functions now. * changed some methods of the model renderer to take a render style parameter instead of a full actor.
This commit is contained in:
parent
b58e3172fc
commit
67a50d084a
30 changed files with 179 additions and 168 deletions
|
|
@ -204,7 +204,7 @@ static bool PIT_FindFloorCeiling(FMultiBlockLinesIterator &mit, FMultiBlockLines
|
|||
{
|
||||
line_t *ld = cres.line;
|
||||
|
||||
if (!box.inRange(ld) || box.BoxOnLineSide(ld) != -1)
|
||||
if (!inRange(box, ld) || BoxOnLineSide(box, ld) != -1)
|
||||
return true;
|
||||
|
||||
// A line has been hit
|
||||
|
|
@ -776,7 +776,7 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
|
|||
line_t *ld = cres.line;
|
||||
bool rail = false;
|
||||
|
||||
if (!box.inRange(ld) || box.BoxOnLineSide(ld) != -1)
|
||||
if (!inRange(box, ld) || BoxOnLineSide(box, ld) != -1)
|
||||
return true;
|
||||
|
||||
// A line has been hit
|
||||
|
|
@ -1073,7 +1073,7 @@ static bool PIT_CheckPortal(FMultiBlockLinesIterator &mit, FMultiBlockLinesItera
|
|||
// if in another vertical section let's just ignore it.
|
||||
if (cres.portalflags & (FFCF_NOCEILING | FFCF_NOFLOOR)) return false;
|
||||
|
||||
if (!box.inRange(cres.line) || box.BoxOnLineSide(cres.line) != -1)
|
||||
if (!inRange(box, cres.line) || BoxOnLineSide(box, cres.line) != -1)
|
||||
return false;
|
||||
|
||||
line_t *lp = cres.line->getPortalDestination();
|
||||
|
|
@ -1095,7 +1095,7 @@ static bool PIT_CheckPortal(FMultiBlockLinesIterator &mit, FMultiBlockLinesItera
|
|||
// Check all lines at the destination
|
||||
while ((ld = it.Next()))
|
||||
{
|
||||
if (!pbox.inRange(ld) || pbox.BoxOnLineSide(ld) != -1)
|
||||
if (!inRange(pbox, ld) || BoxOnLineSide(pbox, ld) != -1)
|
||||
continue;
|
||||
|
||||
if (ld->backsector == NULL)
|
||||
|
|
@ -3453,7 +3453,7 @@ bool FSlide::BounceWall(AActor *mo)
|
|||
movelen = mo->Vel.XY().Length() * mo->wallbouncefactor;
|
||||
|
||||
FBoundingBox box(mo->X(), mo->Y(), mo->radius);
|
||||
if (box.BoxOnLineSide(line) == -1)
|
||||
if (BoxOnLineSide(box, line) == -1)
|
||||
{
|
||||
DVector2 ofs = deltaangle.ToVector(mo->radius);
|
||||
DVector3 pos = mo->Vec3Offset(ofs.X, ofs.Y, 0.);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue