Added new editor layout similar to idTech 5.

Cleaned up the entity inspector.
Fixed numerous radiant bugs.
This commit is contained in:
Justin Marshall
2026-05-06 12:47:20 -07:00
parent baeae00185
commit 1a08d4af90
11 changed files with 3883 additions and 723 deletions
+33 -10
View File
@@ -163,22 +163,36 @@ if only patches selected, will read the patch texdef
extern void Face_GetScale_BrushPrimit(face_t *face, float *s, float *t, float *rot);
void CSurfaceDlg::SetTexMods() {
UpdateData(TRUE);
// Default to the current texture window material.
m_strMaterial = g_qeglobals.d_texturewin.texdef.name;
patchMesh_t *p = SinglePatchSelected();
patchMesh_t* p = SinglePatchSelected();
if (p) {
m_subdivide = p->explicitSubdivisions;
m_strMaterial = p->d_texture->GetName();
} else {
m_subdivide = false;
if (p->d_texture) {
m_strMaterial = p->d_texture->GetName();
}
m_horzScale = 1.0f;
m_vertScale = 1.0f;
UpdateData(FALSE);
return;
}
m_subdivide = false;
int faceCount = g_ptrSelectedFaces.GetSize();
face_t *selFace = NULL;
face_t* selFace = NULL;
if (faceCount) {
selFace = reinterpret_cast < face_t * > (g_ptrSelectedFaces.GetAt(0));
} else {
selFace = reinterpret_cast<face_t*>(g_ptrSelectedFaces.GetAt(0));
}
else {
if (selected_brushes.next != &selected_brushes) {
brush_t *b = selected_brushes.next;
brush_t* b = selected_brushes.next;
if (!b->pPatch) {
selFace = b->brush_faces;
}
@@ -186,9 +200,18 @@ void CSurfaceDlg::SetTexMods() {
}
if (selFace) {
// Fill the surface material textbox with the selected face material.
if (selFace->d_texture) {
m_strMaterial = selFace->d_texture->GetName();
}
else if (selFace->texdef.name[0]) {
m_strMaterial = selFace->texdef.name;
}
float rot;
Face_GetScale_BrushPrimit(selFace, &m_horzScale, &m_vertScale, &rot);
} else {
Face_GetScale_BrushPrimit(selFace, &m_horzScale, &m_vertScale, &rot);
}
else {
m_horzScale = 1.0f;
m_vertScale = 1.0f;
}