mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
build 201020. ai takeover logic tweak, opengl element array binding fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user