entity_t and brush_t now converted to idEditorEntity and idEditorBrush

This commit is contained in:
Justin Marshall
2026-05-24 11:33:16 -07:00
parent d6d01e1faf
commit 3242531044
41 changed files with 1598 additions and 1540 deletions
+8 -11
View File
@@ -8,15 +8,12 @@
// These are present in the classic Doom 3 Radiant/DoomEdit tree.
// In some forks you may need to include the exact headers instead of externs.
extern brush_t active_brushes;
extern brush_t selected_brushes;
extern entity_t* world_entity;
extern idEditorBrush active_brushes;
extern idEditorBrush selected_brushes;
extern idEditorEntity* world_entity;
extern brush_t* Brush_Alloc(void);
extern idEditorBrush* Brush_Alloc(void);
extern face_t* Face_Alloc(void);
extern void Brush_AddToList(brush_t* b, brush_t* list);
extern void Entity_LinkBrush(entity_t* e, brush_t* b);
extern void Brush_Build(brush_t* b, bool bSnap, bool bMarkMap, bool bConvert, bool updateLights);
extern void Sys_UpdateWindows(int nBits);
extern const idMaterial* Texture_ForName(const char* name);
@@ -1065,7 +1062,7 @@ private:
return false;
}
brush_t* b = Brush_Alloc();
idEditorBrush* b = Brush_Alloc();
if (b == NULL) {
return false;
}
@@ -1095,13 +1092,13 @@ private:
b->brush_faces = f;
}
Brush_AddToList(b, &selected_brushes);
Entity_LinkBrush(world_entity, b);
b->Brush_AddToList(&selected_brushes);
world_entity->Entity_LinkBrush(b);
// Do not snap imported Build geometry. Duke slopes and tiny detail sectors
// are intentionally off-grid after scale conversion; snapping the plane
// points is a common cause of "Unable to create face winding on brush".
Brush_Build(b, false, true, false, true);
b->Brush_Build(false, true, false, true);
return true;
}