Check vehicle sound setting before motion/tick counts in CallVehicleTicks
This commit is contained in:
@@ -1214,6 +1214,7 @@ void CallVehicleTicks()
|
|||||||
}
|
}
|
||||||
|
|
||||||
v->motion_counter += front->cur_speed;
|
v->motion_counter += front->cur_speed;
|
||||||
|
if (_settings_client.sound.vehicle) {
|
||||||
/* Play a running sound if the motion counter passes 256 (Do we not skip sounds?) */
|
/* Play a running sound if the motion counter passes 256 (Do we not skip sounds?) */
|
||||||
if (GB(v->motion_counter, 0, 8) < front->cur_speed) PlayVehicleSound(v, VSE_RUNNING);
|
if (GB(v->motion_counter, 0, 8) < front->cur_speed) PlayVehicleSound(v, VSE_RUNNING);
|
||||||
|
|
||||||
@@ -1223,6 +1224,7 @@ void CallVehicleTicks()
|
|||||||
bool running = (front->cur_speed > 0) && !(front->vehstatus & (VS_STOPPED | VS_TRAIN_SLOWING));
|
bool running = (front->cur_speed > 0) && !(front->vehstatus & (VS_STOPPED | VS_TRAIN_SLOWING));
|
||||||
PlayVehicleSound(v, running ? VSE_RUNNING_16 : VSE_STOPPED_16);
|
PlayVehicleSound(v, running ? VSE_RUNNING_16 : VSE_STOPPED_16);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user