mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r3002) -Fix, Newgrf: Max speed of 0xFFFF means no max speed.
-Fix, Newgrf: Don't mark an engine as a wagon after setting speed -- wagons can have speed limits.
This commit is contained in:
parent
ed8c9c91d6
commit
eb1d025d08
3
newgrf.c
3
newgrf.c
@ -226,9 +226,10 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
|
|||||||
case 0x09: { /* Speed */
|
case 0x09: { /* Speed */
|
||||||
FOR_EACH_OBJECT {
|
FOR_EACH_OBJECT {
|
||||||
uint16 speed = grf_load_word(&buf);
|
uint16 speed = grf_load_word(&buf);
|
||||||
|
if (speed == 0xFFFF)
|
||||||
|
speed = 0;
|
||||||
|
|
||||||
rvi[i].max_speed = speed;
|
rvi[i].max_speed = speed;
|
||||||
dewagonize(speed, engine + i);
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case 0x0B: { /* Power */
|
case 0x0B: { /* Power */
|
||||||
|
Loading…
Reference in New Issue
Block a user