mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r3386) - NewGRF: Small comment update, and fix for possible issue with engine class not getting set.
This commit is contained in:
parent
c86e6e008d
commit
793a0099d4
11
newgrf.c
11
newgrf.c
@ -333,8 +333,13 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
|
|||||||
ret = true;
|
ret = true;
|
||||||
} break;
|
} break;
|
||||||
case 0x19: { /* Engine traction type */
|
case 0x19: { /* Engine traction type */
|
||||||
/* TODO: What do the individual numbers mean?
|
/* What do the individual numbers mean?
|
||||||
* XXX: And in what base are they, in fact? --pasky */
|
* 0x00 .. 0x07: Steam
|
||||||
|
* 0x08 .. 0x27: Diesel
|
||||||
|
* 0x28 .. 0x31: Electric
|
||||||
|
* 0x32 .. 0x37: Monorail
|
||||||
|
* 0x38 .. 0x41: Maglev
|
||||||
|
*/
|
||||||
FOR_EACH_OBJECT {
|
FOR_EACH_OBJECT {
|
||||||
uint8 traction = grf_load_byte(&buf);
|
uint8 traction = grf_load_byte(&buf);
|
||||||
int engclass;
|
int engclass;
|
||||||
@ -343,7 +348,7 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
|
|||||||
engclass = 0;
|
engclass = 0;
|
||||||
else if (traction <= 0x27)
|
else if (traction <= 0x27)
|
||||||
engclass = 1;
|
engclass = 1;
|
||||||
else if (traction <= 0x31)
|
else if (traction <= 0x41)
|
||||||
engclass = 2;
|
engclass = 2;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user