mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 08:10:32 +02:00
entity_t and brush_t now converted to idEditorEntity and idEditorBrush
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user