From fdd9bbbcf8c620336065a10831463bc14ff51d34 Mon Sep 17 00:00:00 2001 From: Stephen Saunders Date: Thu, 6 May 2021 12:21:12 -0400 Subject: [PATCH 1/2] Fix com_smp = -1 logic error in Frame() if com_editors active --- neo/framework/common_frame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neo/framework/common_frame.cpp b/neo/framework/common_frame.cpp index d483e131..da38afde 100644 --- a/neo/framework/common_frame.cpp +++ b/neo/framework/common_frame.cpp @@ -871,7 +871,8 @@ void idCommonLocal::Frame() gameReturn_t ret = gameThread.RunGameAndDraw( numGameFrames, userCmdMgr, IsClient(), gameFrame - numGameFrames ); // foresthale 2014-05-12: also check com_editors as many of them are not particularly thread-safe (editLights for example) - if( com_smp.GetInteger() == 0 || com_editors != 0 ) + // SRS - if com_editors is active make sure com_smp != -1, otherwise skip and call SwapCommandBuffers_FinishRendering later + if( com_smp.GetInteger() == 0 || ( com_smp.GetInteger() > 0 && com_editors != 0 ) ) { // in non-smp mode, run the commands we just generated, instead of // frame-delayed ones from a background thread From b60f3907fca8329db47b5140936951d8b7dffa42 Mon Sep 17 00:00:00 2001 From: ErickMx Date: Thu, 20 May 2021 00:21:13 -0500 Subject: [PATCH 2/2] Fixed loading empty ASE Models --- neo/renderer/Model.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/neo/renderer/Model.cpp b/neo/renderer/Model.cpp index 53be2fed..3a78daf3 100644 --- a/neo/renderer/Model.cpp +++ b/neo/renderer/Model.cpp @@ -2272,8 +2272,12 @@ bool idRenderModelStatic::ConvertASEToModelSurfaces( const struct aseModel_s* as { object = ase->objects[objectNum]; mesh = &object->mesh; - material = ase->materials[object->materialRef]; - im1 = declManager->FindMaterial( material->name ); + //material = ase->materials[object->materialRef]; + //im1 = declManager->FindMaterial( material->name ); + // + // caedes dhewm3 fix for ASE meshes without materials (a lot of Doom 3 mods have this issue) 05-18-2021 + material = (ase->materials.Num() > object->materialRef) ? ase->materials[object->materialRef] : NULL; + im1 = declManager->FindMaterial(material ? material->name : NULL); bool normalsParsed = mesh->normalsParsed;