mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
fixes
This commit is contained in:
@@ -154,6 +154,7 @@ TButton::play( sound* Sound ) {
|
||||
|
||||
if( Sound == nullptr ) { return; }
|
||||
|
||||
Sound->stop();
|
||||
Sound->play();
|
||||
return;
|
||||
}
|
||||
|
||||
8
EU07.cpp
8
EU07.cpp
@@ -109,12 +109,12 @@ void window_resize_callback(GLFWwindow *window, int w, int h)
|
||||
|
||||
void cursor_pos_callback(GLFWwindow *window, double x, double y)
|
||||
{
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
input::Mouse.move( x, y );
|
||||
|
||||
if( true == Global::ControlPicking ) {
|
||||
glfwSetCursorPos( window, x, y );
|
||||
}
|
||||
else {
|
||||
if( !Global::ControlPicking ) {
|
||||
glfwSetCursorPos( window, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,6 +320,7 @@ TGauge::play( sound *Sound ) {
|
||||
|
||||
if( Sound == nullptr ) { return; }
|
||||
|
||||
Sound->stop();
|
||||
Sound->play();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6848,10 +6848,6 @@ bool TTrain::InitializeCab(int NewCabNo, std::string const &asFileName)
|
||||
{
|
||||
DynamicObject->mdKabina->Init(); // obrócenie modelu oraz optymalizacja, również zapisanie binarnego
|
||||
set_cab_controls();
|
||||
// HACK: for some reason simulation at the start is slow until a sound is played
|
||||
// until we do a proper fix, try to play a 'silent' sound when cab is entered
|
||||
// TBD: it could be instead a legit sound of door closing
|
||||
play_sound( dsbSwitch, 0.0f );
|
||||
return true;
|
||||
}
|
||||
return (token == "none");
|
||||
|
||||
@@ -1122,9 +1122,6 @@ bool TWorld::Update()
|
||||
|
||||
dt = Timer::GetDeltaRenderTime(); // nie uwzględnia pauzowania ani mnożenia czasu
|
||||
|
||||
sound_man->set_listener(Camera.Pos, Camera.LookAt, Camera.vUp);
|
||||
sound_man->update(dt);
|
||||
|
||||
// fixed step render time routines
|
||||
|
||||
fTime50Hz += dt; // w pauzie też trzeba zliczać czas, bo przy dużym FPS będzie problem z odczytem ramek
|
||||
@@ -1151,6 +1148,9 @@ bool TWorld::Update()
|
||||
|
||||
Update_Camera( dt );
|
||||
|
||||
sound_man->set_listener(Camera.Pos, Camera.LookAt, Camera.vUp);
|
||||
sound_man->update(dt);
|
||||
|
||||
GfxRenderer.Update( dt );
|
||||
ResourceSweep();
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ ui_layer::~ui_layer() {
|
||||
|
||||
bool
|
||||
ui_layer::init( GLFWwindow *Window ) {
|
||||
m_window = Window;
|
||||
|
||||
#ifndef _WIN32
|
||||
Global::bGlutFont = true;
|
||||
@@ -43,7 +44,6 @@ ui_layer::init( GLFWwindow *Window ) {
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
m_window = Window;
|
||||
HFONT font; // Windows Font ID
|
||||
m_fontbase = ::glGenLists(96); // storage for 96 characters
|
||||
HDC hDC = ::GetDC( glfwGetWin32Window( m_window ) );
|
||||
|
||||
Reference in New Issue
Block a user