Update polyobjs every frame (wtb UpdateLevelMesh notification about this)
This commit is contained in:
parent
a4b57c5fbe
commit
944c6994b7
2 changed files with 11 additions and 0 deletions
|
|
@ -176,6 +176,12 @@ DoomLevelMesh::DoomLevelMesh(FLevelLocals& doomMap)
|
|||
|
||||
void DoomLevelMesh::BeginFrame(FLevelLocals& doomMap)
|
||||
{
|
||||
// To do: we don't need to always do this. UpdateLevelMesh should tell us when polyobjs move.
|
||||
for (side_t* side : PolySides)
|
||||
{
|
||||
UpdateSide(doomMap, side->Index());
|
||||
}
|
||||
|
||||
CreateLights(doomMap);
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +348,10 @@ void DoomLevelMesh::CreateSurfaces(FLevelLocals& doomMap)
|
|||
side_t* side = &doomMap.sides[i];
|
||||
bool isPolyLine = !!(side->Flags & WALLF_POLYOBJ);
|
||||
if (isPolyLine)
|
||||
{
|
||||
PolySides.Push(side);
|
||||
continue;
|
||||
}
|
||||
|
||||
UpdateSide(doomMap, i);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ private:
|
|||
|
||||
TArray<SideSurfaceBlock> Sides;
|
||||
TArray<FlatSurfaceBlock> Flats;
|
||||
TArray<side_t*> PolySides;
|
||||
|
||||
std::map<LightmapTileBinding, int> bindings;
|
||||
MeshBuilder state;
|
||||
bool LightsCreated = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue