oldloader.c
branch0.5
changeset 5500 636a87c38ec1
parent 5447 fdd232ac18d0
child 5507 65cf99137628
equal deleted inserted replaced
5499:d8a566b68999 5500:636a87c38ec1
   341 	/* Check for shared orders, and link them correctly */
   341 	/* Check for shared orders, and link them correctly */
   342 	Vehicle* v;
   342 	Vehicle* v;
   343 
   343 
   344 	FOR_ALL_VEHICLES(v) {
   344 	FOR_ALL_VEHICLES(v) {
   345 		Vehicle *u;
   345 		Vehicle *u;
       
   346 
       
   347 		/* We haven't used this bit for stations for ages */
       
   348 		if (v->type == VEH_Road) CLRBIT(v->u.road.state, 2);
   346 
   349 
   347 		FOR_ALL_VEHICLES_FROM(u, v->index + 1) {
   350 		FOR_ALL_VEHICLES_FROM(u, v->index + 1) {
   348 			/* If a vehicle has the same orders, add the link to eachother
   351 			/* If a vehicle has the same orders, add the link to eachother
   349 			 * in both vehicles */
   352 			 * in both vehicles */
   350 			if (v->orders == u->orders) {
   353 			if (v->orders == u->orders) {
  1509 		_m[i].m4 = _old_map3[i * 2 + 1];
  1512 		_m[i].m4 = _old_map3[i * 2 + 1];
  1510 	}
  1513 	}
  1511 
  1514 
  1512 	for (i = 0; i < OLD_MAP_SIZE; i ++) {
  1515 	for (i = 0; i < OLD_MAP_SIZE; i ++) {
  1513 		switch (GetTileType(i)) {
  1516 		switch (GetTileType(i)) {
       
  1517 			case MP_STATION: _m[i].m4 = 0; break; // We don't understand this grf mapping (yet)
  1514 			case MP_RAILWAY:
  1518 			case MP_RAILWAY:
  1515 				/* We save presignals different from TTDPatch, convert them */
  1519 				/* We save presignals different from TTDPatch, convert them */
  1516 				if (GetRailTileType(i) == RAIL_TILE_SIGNALS) {
  1520 				if (GetRailTileType(i) == RAIL_TILE_SIGNALS) {
  1517 					/* This byte is always zero in TTD for this type of tile */
  1521 					/* This byte is always zero in TTD for this type of tile */
  1518 					if (_m[i].m4) /* Convert the presignals to our own format */
  1522 					if (_m[i].m4) /* Convert the presignals to our own format */