diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index f1babfb7f4..7f98c7f3c5 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -167,8 +167,8 @@ void gl_LoadExtensions() gl.flags |= RFL_SAMPLER_OBJECTS; } - // The minimum requirement for the modern render path are GL 3.0 + uniform buffers - if (gl_version < 3.0f || (gl_version < 3.1f && !CheckExtension("GL_ARB_uniform_buffer_object") && strstr(gl.vendorstring, "X.Org") == nullptr)) + // The minimum requirement for the modern render path are GL 3.0 + uniform buffers. Also exclude the Linux Mesa driver at GL 3.0 because it errors out on shader compilation. + if (gl_version < 3.0f || (gl_version < 3.1f && (!CheckExtension("GL_ARB_uniform_buffer_object") || strstr(gl.vendorstring, "X.Org") != nullptr))) { gl.legacyMode = true; gl.lightmethod = LM_LEGACY; @@ -294,10 +294,10 @@ void gl_PrintStartupLog() Printf ("GL_RENDERER: %s\n", glGetString(GL_RENDERER)); Printf ("GL_VERSION: %s (%s profile)\n", glGetString(GL_VERSION), (v & GL_CONTEXT_CORE_PROFILE_BIT)? "Core" : "Compatibility"); Printf ("GL_SHADING_LANGUAGE_VERSION: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); - Printf ("GL_EXTENSIONS:"); + Printf (PRINT_LOG, "GL_EXTENSIONS:"); for (unsigned i = 0; i < m_Extensions.Size(); i++) { - Printf(" %s", m_Extensions[i].GetChars()); + Printf(PRINT_LOG, " %s", m_Extensions[i].GetChars()); } glGetIntegerv(GL_MAX_TEXTURE_SIZE, &v); diff --git a/src/r_utility.cpp b/src/r_utility.cpp index ff34a772b3..c28422dffa 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -491,6 +491,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie if (ViewPos.Z > viewsector->GetPortalPlaneZ(sector_t::ceiling)) { ViewPos += viewsector->GetPortalDisplacement(sector_t::ceiling); + ViewActorPos += viewsector->GetPortalDisplacement(sector_t::ceiling); viewsector = R_PointInSubsector(ViewPos)->sector; moved = true; } @@ -503,6 +504,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie if (ViewPos.Z < viewsector->GetPortalPlaneZ(sector_t::floor)) { ViewPos += viewsector->GetPortalDisplacement(sector_t::floor); + ViewActorPos += viewsector->GetPortalDisplacement(sector_t::floor); viewsector = R_PointInSubsector(ViewPos)->sector; moved = true; } diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index dc28f953c5..ed0c272700 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -8926,15 +8926,20 @@ ExpEmit FxSwitchStatement::Emit(VMFunctionBuilder *build) bool FxSwitchStatement::CheckReturn() { - //A switch statement returns when it contains no breaks and ends with a return + bool founddefault = false; + //A switch statement returns when it contains a no breaks, a default case, and ends with a return for (auto line : Content) { if (line->ExprType == EFX_JumpStatement) { return false; // Break means that the end of the statement will be reached, Continue cannot happen in the last statement of the last block. } + else if (line->ExprType == EFX_CaseStatement) + { + if (static_cast(line)->Condition == nullptr) founddefault = true; + } } - return Content.Size() > 0 && Content.Last()->CheckReturn(); + return founddefault && Content.Size() > 0 && Content.Last()->CheckReturn(); } //==========================================================================