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

next fixes for missing sound crashes

This commit is contained in:
milek7
2017-08-19 19:43:50 +02:00
parent 417d4a7e9e
commit 9cb61b0285

View File

@@ -3336,12 +3336,12 @@ bool TDynamicObject::Update(double dt, double dt1)
} // koniec pętli po pantografach
if ((MoverParameters->PantFrontSP == false) && (MoverParameters->PantFrontUp == false))
{
sPantDown->gain(vol).position(vPosition).play();
if (sPantDown) sPantDown->gain(vol).position(vPosition).play();
MoverParameters->PantFrontSP = true;
}
if ((MoverParameters->PantRearSP == false) && (MoverParameters->PantRearUp == false))
{
sPantDown->gain(vol).position(vPosition).play();
if (sPantDown) sPantDown->gain(vol).position(vPosition).play();
MoverParameters->PantRearSP = true;
}
/*
@@ -3444,24 +3444,24 @@ bool TDynamicObject::Update(double dt, double dt1)
// NBMX Obsluga drzwi, MC: zuniwersalnione
if ((dDoorMoveL < MoverParameters->DoorMaxShiftL) && (MoverParameters->DoorLeftOpened))
{
rsDoorOpen->position(vPosition).play();
if (rsDoorOpen) rsDoorOpen->position(vPosition).play();
dDoorMoveL += dt1 * 0.5 * MoverParameters->DoorOpenSpeed;
}
if ((dDoorMoveL > 0) && (!MoverParameters->DoorLeftOpened))
{
rsDoorClose->position(vPosition).play();
if (rsDoorClose) rsDoorClose->position(vPosition).play();
dDoorMoveL -= dt1 * MoverParameters->DoorCloseSpeed;
if (dDoorMoveL < 0)
dDoorMoveL = 0;
}
if ((dDoorMoveR < MoverParameters->DoorMaxShiftR) && (MoverParameters->DoorRightOpened))
{
rsDoorOpen->position(vPosition).play();
if (rsDoorOpen) rsDoorOpen->position(vPosition).play();
dDoorMoveR += dt1 * 0.5 * MoverParameters->DoorOpenSpeed;
}
if ((dDoorMoveR > 0) && (!MoverParameters->DoorRightOpened))
{
rsDoorClose->position(vPosition).play();
if (rsDoorClose) rsDoorClose->position(vPosition).play();
dDoorMoveR -= dt1 * MoverParameters->DoorCloseSpeed;
if (dDoorMoveR < 0)
dDoorMoveR = 0;