build 201020. ai takeover logic tweak, opengl element array binding fix

This commit is contained in:
tmj-fstate
2020-10-21 02:07:40 +02:00
parent 459d3eef45
commit dee0bd13f4
3 changed files with 9 additions and 3 deletions

View File

@@ -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

View File

@@ -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())

View File

@@ -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