16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

build 191212. bogie sound tweak, minor bug fixes

This commit is contained in:
tmj-fstate
2019-12-12 23:14:25 +01:00
parent 8028fa2ac0
commit a54924c48d
6 changed files with 73 additions and 22 deletions

View File

@@ -459,16 +459,28 @@ drivermouse_input::poll() {
while( m_updateaccumulator > updaterate ) {
if( m_mousecommandleft != user_command::none ) {
// NOTE: basic keyboard controls don't have any parameters
// as we haven't yet implemented either item id system or multiplayer, the 'local' controlled vehicle and entity have temporary ids of 0
// TODO: pass correct entity id once the missing systems are in place
m_relay.post( m_mousecommandleft, 0, 0, GLFW_REPEAT, 0 );
if( Application.get_mouse_button( GLFW_MOUSE_BUTTON_LEFT ) == GLFW_PRESS ) {
// sanity check, as our button callback can trigger after button release leaving us with desync
// NOTE: basic keyboard controls don't have any parameters
// as we haven't yet implemented either item id system or multiplayer, the 'local' controlled vehicle and entity have temporary ids of 0
// TODO: pass correct entity id once the missing systems are in place
m_relay.post( m_mousecommandleft, 0, 0, GLFW_REPEAT, 0 );
}
else {
m_mousecommandleft = user_command::none;
}
}
if( m_mousecommandright != user_command::none ) {
if( Application.get_mouse_button( GLFW_MOUSE_BUTTON_RIGHT ) == GLFW_PRESS ) {
// sanity check, as our button callback can trigger after button release leaving us with desync
// NOTE: basic keyboard controls don't have any parameters
// as we haven't yet implemented either item id system or multiplayer, the 'local' controlled vehicle and entity have temporary ids of 0
// TODO: pass correct entity id once the missing systems are in place
m_relay.post( m_mousecommandright, 0, 0, GLFW_REPEAT, 0 );
m_relay.post( m_mousecommandright, 0, 0, GLFW_REPEAT, 0 );
}
else {
m_mousecommandright = user_command::none;
}
}
m_updateaccumulator -= updaterate;
}