MCPcopy Create free account
hub / github.com/ZDoom/Raze / get

Method get

source/core/sectorgeometry.cpp:492–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490//==========================================================================
491
492SectionGeometryPlane* SectionGeometry::get(Section* section, int plane, const FVector2& offset, TArray<int>** pIndices)
493{
494 if (!section || section->index >= data.Size()) return nullptr;
495 auto sectp = &sector[section->sector];
496 if (sectp->dirty) MarkDirty(sectp);
497 if (section->dirty & EDirty::GeometryDirty)
498 {
499 bool res = CreateMesh(section);
500 if (!res)
501 {
502 section->dirty &= ~EDirty::GeometryDirty; // sector is in an invalid state, so pretend the old setup is still valid. Happens in some SW maps.
503 }
504 }
505 if (!ValidateSection(section, plane))
506 {
507 CreatePlaneMesh(section, plane, offset);
508 }
509 *pIndices = &data[section->index].meshIndices;
510 return &data[section->index].planes[plane];
511}

Callers 6

renderDrawMapViewFunction · 0.45
CONFIG_ReadCombatMacrosFunction · 0.45
ParseMaterialMethod · 0.45
DispatchSpritesMethod · 0.45
DrawSceneMethod · 0.45
MakeVerticesMethod · 0.45

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected