- 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:
Christoph Oelckers 2020-04-27 00:03:23 +02:00
commit 67a50d084a
30 changed files with 179 additions and 168 deletions

View file

@ -242,7 +242,7 @@ msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector
while ((ld = it.Next()))
{
if (!box.inRange(ld) || box.BoxOnLineSide(ld) != -1)
if (!inRange(box, ld) || BoxOnLineSide(box, ld) != -1)
continue;
// This line crosses through the object.
@ -398,7 +398,7 @@ void AActor::UpdateRenderSectorList()
for (auto &p : Level->linePortals)
{
if (p.mType == PORTT_VISUAL) continue;
if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin))
if (inRange(bb, p.mOrigin) && BoxOnLineSide(bb, p.mOrigin))
{
touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist);
}