This commit is contained in:
Peter Nelson 2024-04-27 00:36:35 +02:00 committed by GitHub
commit 6e2c0d7cd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1033,6 +1033,9 @@ void CallVehicleTicks()
/* Do not play any sound when stopped */
if ((front->vehstatus & VS_STOPPED) && (front->type != VEH_TRAIN || front->cur_speed == 0)) continue;
/* Update motion counter for animation purposes. */
v->motion_counter += front->cur_speed;
/* Check vehicle type specifics */
switch (v->type) {
case VEH_TRAIN:
@ -1051,7 +1054,6 @@ void CallVehicleTicks()
break;
}
v->motion_counter += front->cur_speed;
/* 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);