Check vehicle sound setting before motion/tick counts in CallVehicleTicks

pull/78/head
Jonathan G Rennison 6 years ago
parent 3cb5bfe1a9
commit f4180e8714

@ -1214,6 +1214,7 @@ void CallVehicleTicks()
}
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?) */
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));
PlayVehicleSound(v, running ? VSE_RUNNING_16 : VSE_STOPPED_16);
}
}
break;
}

Loading…
Cancel
Save