mirror of https://github.com/OpenTTD/OpenTTD
(svn r2474) - Fix: [newgrf] Some road vehicle action 0 properties were loaded as the wrong type (int8,int16,int32) causing undefined results. (like cargo types being wrong)
parent
7549cb5271
commit
7b0c767238
4
newgrf.c
4
newgrf.c
|
@ -427,7 +427,7 @@ static bool RoadVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
|
||||||
case 0x0A: { /* Running cost base */
|
case 0x0A: { /* Running cost base */
|
||||||
/* TODO: I have no idea. --pasky */
|
/* TODO: I have no idea. --pasky */
|
||||||
FOR_EACH_OBJECT {
|
FOR_EACH_OBJECT {
|
||||||
grf_load_byte(&buf);
|
grf_load_dword(&buf);
|
||||||
}
|
}
|
||||||
ret = true;
|
ret = true;
|
||||||
} break;
|
} break;
|
||||||
|
@ -448,7 +448,7 @@ static bool RoadVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
|
||||||
} break;
|
} break;
|
||||||
case 0x0F: { /* Cargo capacity */
|
case 0x0F: { /* Cargo capacity */
|
||||||
FOR_EACH_OBJECT {
|
FOR_EACH_OBJECT {
|
||||||
uint16 capacity = grf_load_word(&buf);
|
uint16 capacity = grf_load_byte(&buf);
|
||||||
|
|
||||||
rvi[i].capacity = capacity;
|
rvi[i].capacity = capacity;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue