From dee0bd13f453750909ed437d9053ce02b1a0c7df Mon Sep 17 00:00:00 2001 From: tmj-fstate Date: Wed, 21 Oct 2020 02:07:40 +0200 Subject: [PATCH] build 201020. ai takeover logic tweak, opengl element array binding fix --- Driver.cpp | 4 +++- opengl33renderer.cpp | 4 ++++ version.h | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Driver.cpp b/Driver.cpp index ea4791eb..55ae0230 100644 --- a/Driver.cpp +++ b/Driver.cpp @@ -7490,16 +7490,18 @@ void TController::TakeControl( bool const Aidriver, bool const Forcevehiclecheck } else { // jeśli nic nie robi + OrderNext( Prepare_engine ); if( pVehicle->MoverParameters->iLights[ ( mvOccupied->CabActive < 0 ? end::rear : end::front ) ] & ( light::headlight_left | light::headlight_right | light::headlight_upper ) ) // któreś ze świateł zapalone? { // od wersji 357 oczekujemy podania komend dla AI przez scenerię - OrderNext( Prepare_engine ); +/* if( pVehicle->MoverParameters->iLights[ mvOccupied->CabActive < 0 ? end::rear : end::front ] & light::headlight_upper ) // górne światło zapalone OrderNext( Obey_train ); // jazda pociągowa else OrderNext( Shunt ); // jazda manewrowa +*/ if( mvOccupied->Vel >= 1.0 ) // jeśli jedzie (dla 0.1 ma stać) iDrivigFlags &= ~moveStopHere; // to ma nie czekać na sygnał, tylko jechać else diff --git a/opengl33renderer.cpp b/opengl33renderer.cpp index e41a6fb4..eb93df50 100644 --- a/opengl33renderer.cpp +++ b/opengl33renderer.cpp @@ -179,6 +179,7 @@ bool opengl33_renderer::Init(GLFWwindow *Window) return false; } glfwMakeContextCurrent(m_window); + gl::vao::unbind(); gl::buffer::unbind(); if (Global.gfx_shadowmap_enabled) @@ -470,6 +471,7 @@ bool opengl33_renderer::Render() } glfwMakeContextCurrent(m_window); + gl::vao::unbind(); gl::buffer::unbind(); m_current_viewport = &(*m_viewports.front()); /* @@ -581,6 +583,7 @@ void opengl33_renderer::Render_pass(viewport_config &vp, rendermode const Mode) glDebug("context switch"); glfwMakeContextCurrent(vp.window); + gl::vao::unbind(); gl::buffer::unbind(); m_current_viewport = &vp; @@ -3925,6 +3928,7 @@ void opengl33_renderer::Render_Alpha(TSubModel *Submodel) void opengl33_renderer::Update_Pick_Control() { // context-switch workaround + gl::vao::unbind(); gl::buffer::unbind(); if (!m_picking_pbo->is_busy()) diff --git a/version.h b/version.h index 3b87a5b4..ad9cfb85 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #pragma once #define VERSION_MAJOR 20 -#define VERSION_MINOR 1018 -#define VERSION_REVISION 1 +#define VERSION_MINOR 1020 +#define VERSION_REVISION 0