mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 09:59:10 +00:00
NewGRFs relied on the incorrectly motion counter that was 'fixed' in #12229, so always update v->motion_counter for all vehicle parts.
This commit is contained in:
@@ -1033,6 +1033,9 @@ void CallVehicleTicks()
|
|||||||
/* Do not play any sound when stopped */
|
/* Do not play any sound when stopped */
|
||||||
if ((front->vehstatus & VS_STOPPED) && (front->type != VEH_TRAIN || front->cur_speed == 0)) continue;
|
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 */
|
/* Check vehicle type specifics */
|
||||||
switch (v->type) {
|
switch (v->type) {
|
||||||
case VEH_TRAIN:
|
case VEH_TRAIN:
|
||||||
@@ -1051,7 +1054,6 @@ void CallVehicleTicks()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
v->motion_counter += front->cur_speed;
|
|
||||||
/* 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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user