newgrf.c
changeset 2545 aa71b3d576ce
parent 2542 812fc4357594
child 2549 5587f9a38563
equal deleted inserted replaced
2544:2c6a25db1bd0 2545:aa71b3d576ce
   392 		} break;
   392 		} break;
   393 		case 0x24: { /* High byte of vehicle weight */
   393 		case 0x24: { /* High byte of vehicle weight */
   394 			FOR_EACH_OBJECT {
   394 			FOR_EACH_OBJECT {
   395 				byte weight = grf_load_byte(&buf);
   395 				byte weight = grf_load_byte(&buf);
   396 
   396 
   397 				if (weight < 4) {
   397 				if (weight > 4) {
   398 					grfmsg(GMS_NOTICE, "RailVehicleChangeInfo: Nonsensical weight of %d tons, ignoring.", weight << 8);
   398 					grfmsg(GMS_NOTICE, "RailVehicleChangeInfo: Nonsensical weight of %d tons, ignoring.", weight << 8);
   399 				} else {
   399 				} else {
   400 					SB(rvi[i].weight, 8, 8, weight);
   400 					SB(rvi[i].weight, 8, 8, weight);
   401 				}
   401 				}
   402 			}
   402 			}