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

build 180309. additional control commands, serial port output fix

This commit is contained in:
tmj-fstate
2018-03-09 19:31:19 +01:00
parent 5d60080084
commit 0bf9d233aa
13 changed files with 84 additions and 16 deletions

View File

@@ -5095,7 +5095,7 @@ void TDynamicObject::LoadMMediaFile( std::string BaseDir, std::string TypeName,
if( ( sides == "both" )
|| ( sides == "left" ) ) {
// left...
auto const location { glm::vec3 { MoverParameters->DimHalf.x, MoverParameters->DimHalf.y, offset } };
auto const location { glm::vec3 { MoverParameters->Dim.W * 0.5f, MoverParameters->Dim.H * 0.5f, offset } };
door.rsDoorClose.offset( location );
door.rsDoorOpen.offset( location );
m_doorsounds.emplace_back( door );
@@ -5103,7 +5103,7 @@ void TDynamicObject::LoadMMediaFile( std::string BaseDir, std::string TypeName,
if( ( sides == "both" )
|| ( sides == "right" ) ) {
// ...and right
auto const location { glm::vec3 { -MoverParameters->DimHalf.x, MoverParameters->DimHalf.y, offset } };
auto const location { glm::vec3 { MoverParameters->Dim.W * -0.5f, MoverParameters->Dim.H * 0.5f, offset } };
door.rsDoorClose.offset( location );
door.rsDoorOpen.offset( location );
m_doorsounds.emplace_back( door );
@@ -5360,12 +5360,12 @@ void TDynamicObject::LoadMMediaFile( std::string BaseDir, std::string TypeName,
dooranimationfirstindex += iAnimType[ i ];
}
// couplers
auto const frontcoupleroffset { glm::vec3{ 0.f, 1.f, MoverParameters->DimHalf.z } };
auto const frontcoupleroffset { glm::vec3{ 0.f, 1.f, MoverParameters->Dim.L * 0.5f } };
m_couplersounds[ side::front ].dsbCouplerAttach.offset( frontcoupleroffset );
m_couplersounds[ side::front ].dsbCouplerDetach.offset( frontcoupleroffset );
m_couplersounds[ side::front ].dsbCouplerStretch.offset( frontcoupleroffset );
m_couplersounds[ side::front ].dsbBufferClamp.offset( frontcoupleroffset );
auto const rearcoupleroffset{ glm::vec3{ 0.f, 1.f, MoverParameters->DimHalf.z * -1.f } };
auto const rearcoupleroffset { glm::vec3{ 0.f, 1.f, MoverParameters->Dim.L * -0.5f } };
m_couplersounds[ side::rear ].dsbCouplerAttach.offset( rearcoupleroffset );
m_couplersounds[ side::rear ].dsbCouplerDetach.offset( rearcoupleroffset );
m_couplersounds[ side::rear ].dsbCouplerStretch.offset( rearcoupleroffset );