mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 10:29:19 +02: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 {
|
else {
|
||||||
// jeśli nic nie robi
|
// jeśli nic nie robi
|
||||||
|
OrderNext( Prepare_engine );
|
||||||
if( pVehicle->MoverParameters->iLights[ ( mvOccupied->CabActive < 0 ?
|
if( pVehicle->MoverParameters->iLights[ ( mvOccupied->CabActive < 0 ?
|
||||||
end::rear :
|
end::rear :
|
||||||
end::front ) ]
|
end::front ) ]
|
||||||
& ( light::headlight_left | light::headlight_right | light::headlight_upper ) ) // któreś ze świateł zapalone?
|
& ( light::headlight_left | light::headlight_right | light::headlight_upper ) ) // któreś ze świateł zapalone?
|
||||||
{ // od wersji 357 oczekujemy podania komend dla AI przez scenerię
|
{ // 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
|
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
|
OrderNext( Obey_train ); // jazda pociągowa
|
||||||
else
|
else
|
||||||
OrderNext( Shunt ); // jazda manewrowa
|
OrderNext( Shunt ); // jazda manewrowa
|
||||||
|
*/
|
||||||
if( mvOccupied->Vel >= 1.0 ) // jeśli jedzie (dla 0.1 ma stać)
|
if( mvOccupied->Vel >= 1.0 ) // jeśli jedzie (dla 0.1 ma stać)
|
||||||
iDrivigFlags &= ~moveStopHere; // to ma nie czekać na sygnał, tylko jechać
|
iDrivigFlags &= ~moveStopHere; // to ma nie czekać na sygnał, tylko jechać
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ bool opengl33_renderer::Init(GLFWwindow *Window)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
glfwMakeContextCurrent(m_window);
|
glfwMakeContextCurrent(m_window);
|
||||||
|
gl::vao::unbind();
|
||||||
gl::buffer::unbind();
|
gl::buffer::unbind();
|
||||||
|
|
||||||
if (Global.gfx_shadowmap_enabled)
|
if (Global.gfx_shadowmap_enabled)
|
||||||
@@ -470,6 +471,7 @@ bool opengl33_renderer::Render()
|
|||||||
}
|
}
|
||||||
|
|
||||||
glfwMakeContextCurrent(m_window);
|
glfwMakeContextCurrent(m_window);
|
||||||
|
gl::vao::unbind();
|
||||||
gl::buffer::unbind();
|
gl::buffer::unbind();
|
||||||
m_current_viewport = &(*m_viewports.front());
|
m_current_viewport = &(*m_viewports.front());
|
||||||
/*
|
/*
|
||||||
@@ -581,6 +583,7 @@ void opengl33_renderer::Render_pass(viewport_config &vp, rendermode const Mode)
|
|||||||
|
|
||||||
glDebug("context switch");
|
glDebug("context switch");
|
||||||
glfwMakeContextCurrent(vp.window);
|
glfwMakeContextCurrent(vp.window);
|
||||||
|
gl::vao::unbind();
|
||||||
gl::buffer::unbind();
|
gl::buffer::unbind();
|
||||||
m_current_viewport = &vp;
|
m_current_viewport = &vp;
|
||||||
|
|
||||||
@@ -3925,6 +3928,7 @@ void opengl33_renderer::Render_Alpha(TSubModel *Submodel)
|
|||||||
void opengl33_renderer::Update_Pick_Control()
|
void opengl33_renderer::Update_Pick_Control()
|
||||||
{
|
{
|
||||||
// context-switch workaround
|
// context-switch workaround
|
||||||
|
gl::vao::unbind();
|
||||||
gl::buffer::unbind();
|
gl::buffer::unbind();
|
||||||
|
|
||||||
if (!m_picking_pbo->is_busy())
|
if (!m_picking_pbo->is_busy())
|
||||||
|
|||||||
Reference in New Issue
Block a user