@@ -1053,70 +1053,81 @@ static void VehicleChangeInfo(byte *buf,
while (numprops-- && buf < bufend) {
uint8 prop = grf_load_byte(&buf);
if (feature == GSF_STATION)
// stations don't share those common properties
goto run_handler;
bool ignoring = false;
switch (prop) {
case 0x00: { /* Introduction date */
FOR_EACH_OBJECT {
uint16 date = grf_load_word(&buf);
switch (feature) {
case GSF_TRAIN:
case GSF_ROAD:
case GSF_SHIP:
case GSF_AIRCRAFT:
/* Common properties for vehicles */
ei[i].base_intro = date;
}
} break;
case 0x02: { /* Decay speed */
uint8 decay = grf_load_byte(&buf);
ei[i].unk2 &= 0x80;
ei[i].unk2 |= decay & 0x7f;
case 0x03: { /* Vehicle life */
uint8 life = grf_load_byte(&buf);
ei[i].lifelength = life;
case 0x04: { /* Model life */
ei[i].base_life = life;
case 0x06: { /* Climates available */
uint8 climates = grf_load_byte(&buf);
ei[i].railtype_climates &= 0xf0;
ei[i].railtype_climates |= climates;
case 0x07: { /* Loading speed */
/* TODO */
/* Hyronymus explained me what does
* this mean and insists on having a
* credit ;-). --pasky */
/* TODO: This needs to be supported by
* LoadUnloadVehicle() first. */
grf_load_byte(&buf);
goto ignoring;
ignoring = true;
break;
default:
if (handler[feature](engine, numinfo, prop, &buf, bufend - buf))
default: {
run_handler:
if (handler[feature](engine, numinfo, prop, &buf, bufend - buf)) {
ignoring:
grfmsg(GMS_NOTICE, "VehicleChangeInfo: Ignoring property %x (not implemented).", prop);
if (ignoring)
Status change: