- renamed a few variables for clarity.

This commit is contained in:
Christoph Oelckers 2017-01-06 11:56:17 +01:00
parent 44ad55602d
commit b11c8fef57
10 changed files with 22 additions and 22 deletions

View file

@ -1148,8 +1148,8 @@ public:
// a linked list of sectors where this object appears
struct msecnode_t *touching_sectorlist; // phares 3/14/98
struct msecnode_t *render_sectorlist; // same for cross-sectorportal rendering
struct portnode_t *render_portallist; // and for cross-lineportal
struct msecnode_t *touching_sectorportallist; // same for cross-sectorportal rendering
struct portnode_t *touching_lineportallist; // and for cross-lineportal
struct msecnode_t *touching_rendersectors; // this is the list of sectors that this thing interesects with it's max(radius, renderradius).
int validcount;

View file

@ -383,7 +383,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
GLRenderer->ProcessSprite(thing, sector, false);
}
for (msecnode_t *node = sec->render_thinglist; node; node = node->m_snext)
for (msecnode_t *node = sec->sectorportal_thinglist; node; node = node->m_snext)
{
AActor *thing = node->m_thing;
FIntCVar *cvar = thing->GetClass()->distancecheck;

View file

@ -1189,7 +1189,7 @@ void gl_RenderActorsInPortal(FGLLinePortal *glport)
if (port2 != nullptr && port->mDestination == port2->mOrigin && port->mOrigin == port2->mDestination)
{
for (portnode_t *node = port->render_thinglist; node != nullptr; node = node->m_snext)
for (portnode_t *node = port->lineportal_thinglist; node != nullptr; node = node->m_snext)
{
AActor *th = node->m_thing;

View file

@ -6728,7 +6728,7 @@ portnode_t *P_DelPortalnode(portnode_t *node)
if (sp)
sp->m_snext = sn;
else
node->m_portal->render_thinglist = sn;
node->m_portal->lineportal_thinglist = sn;
if (sn)
sn->m_sprev = sp;
@ -6770,10 +6770,10 @@ portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode)
// Add new node at head of portal thread starting at s->touching_thinglist
node->m_sprev = NULL; // prev node on portal thread
node->m_snext = s->render_thinglist; // next node on portal thread
if (s->render_thinglist)
node->m_snext = s->lineportal_thinglist; // next node on portal thread
if (s->lineportal_thinglist)
node->m_snext->m_sprev = node;
s->render_thinglist = node;
s->lineportal_thinglist = node;
return node;
}
@ -6805,7 +6805,7 @@ void AActor::UpdateRenderSectorList()
if (p.mType == PORTT_VISUAL) continue;
if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin))
{
render_portallist = P_AddPortalnode(&p, this, render_portallist);
touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist);
}
}
}
@ -6821,7 +6821,7 @@ void AActor::UpdateRenderSectorList()
lasth = planeh;
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling);
sec = P_PointInSector(newpos);
render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist);
touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist);
}
sec = Sector;
lasth = FLT_MAX;
@ -6833,25 +6833,25 @@ void AActor::UpdateRenderSectorList()
lasth = planeh;
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor);
sec = P_PointInSector(newpos);
render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist);
touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist);
}
}
}
void AActor::ClearRenderSectorList()
{
msecnode_t *node = render_sectorlist;
msecnode_t *node = touching_sectorportallist;
while (node)
node = P_DelSecnode(node, &sector_t::render_thinglist);
render_sectorlist = NULL;
node = P_DelSecnode(node, &sector_t::sectorportal_thinglist);
touching_sectorportallist = NULL;
}
void AActor::ClearRenderLineList()
{
portnode_t *node = render_portallist;
portnode_t *node = touching_lineportallist;
while (node)
node = P_DelPortalnode(node);
render_portallist = NULL;
touching_lineportallist = NULL;
}

View file

@ -1337,7 +1337,7 @@ DEFINE_FIELD_X(Sector, sector_t, bottommap)
DEFINE_FIELD_X(Sector, sector_t, midmap)
DEFINE_FIELD_X(Sector, sector_t, topmap)
DEFINE_FIELD_X(Sector, sector_t, touching_thinglist)
DEFINE_FIELD_X(Sector, sector_t, render_thinglist)
DEFINE_FIELD_X(Sector, sector_t, sectorportal_thinglist)
DEFINE_FIELD_X(Sector, sector_t, gravity)
DEFINE_FIELD_X(Sector, sector_t, damagetype)
DEFINE_FIELD_X(Sector, sector_t, damageamount)

View file

@ -1508,7 +1508,7 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex)
tagManager.AddSectorTag(i, LittleShort(ms->tag));
ss->thinglist = nullptr;
ss->touching_thinglist = nullptr; // phares 3/14/98
ss->render_thinglist = nullptr;
ss->sectorportal_thinglist = nullptr;
ss->touching_renderthings = nullptr;
ss->seqType = defSeqType;
ss->SeqName = NAME_None;

View file

@ -1297,7 +1297,7 @@ public:
sec->SetAlpha(sector_t::ceiling, 1.);
sec->thinglist = nullptr;
sec->touching_thinglist = nullptr; // phares 3/14/98
sec->render_thinglist = nullptr;
sec->sectorportal_thinglist = nullptr;
sec->touching_renderthings = nullptr;
sec->seqType = (level.flags & LEVEL_SNDSEQTOTALCTRL) ? 0 : -1;
sec->nextsec = -1; //jff 2/26/98 add fields to support locking out

View file

@ -191,7 +191,7 @@ struct FLinePortal
DAngle mAngleDiff;
double mSinRot;
double mCosRot;
portnode_t *render_thinglist;
portnode_t *lineportal_thinglist;
};
extern TArray<FLinePortal> linePortals;

View file

@ -1049,7 +1049,7 @@ public:
// list of mobjs that are at least partially in the sector
// thinglist is a subset of touching_thinglist
struct msecnode_t *touching_thinglist; // phares 3/14/98
struct msecnode_t *render_thinglist; // for cross-portal rendering.
struct msecnode_t *sectorportal_thinglist; // for cross-portal rendering.
struct msecnode_t *touching_renderthings; // this is used to allow wide things to be rendered not only from their main sector.
double gravity; // [RH] Sector gravity (1.0 is normal)

View file

@ -283,7 +283,7 @@ struct Sector native
native uint bottommap, midmap, topmap;
//struct msecnode_t *touching_thinglist;
//struct msecnode_t *render_thinglist;
//struct msecnode_t *sectorportal_thinglist;
native double gravity;
native Name damagetype;