@@ -1050,17 +1050,20 @@ static void VehicleChangeInfo(byte *buf,
when it is used in the switch below?? -- TrueLight */
buf += 5;
while (numprops-- && buf < bufend) {
uint8 prop = grf_load_byte(&buf);
bool ignoring = false;
if (feature == GSF_STATION)
// stations don't share those common properties
goto run_handler;
switch (feature) {
case GSF_TRAIN:
case GSF_ROAD:
case GSF_SHIP:
case GSF_AIRCRAFT:
/* Common properties for vehicles */
switch (prop) {
case 0x00: { /* Introduction date */
FOR_EACH_OBJECT {
uint16 date = grf_load_word(&buf);
ei[i].base_intro = date;
@@ -1103,23 +1106,31 @@ static void VehicleChangeInfo(byte *buf,
* credit ;-). --pasky */
/* TODO: This needs to be supported by
* LoadUnloadVehicle() first. */
grf_load_byte(&buf);
}
goto ignoring;
ignoring = true;
break;
default: {
run_handler:
if (handler[feature](engine, numinfo, prop, &buf, bufend - buf)) {
ignoring:
grfmsg(GMS_NOTICE, "VehicleChangeInfo: Ignoring property %x (not implemented).", prop);
default:
if (handler[feature](engine, numinfo, prop, &buf, bufend - buf))
if (ignoring)
#undef FOR_EACH_OBJECT
/**
Status change: