road_cmd.c
changeset 1245 768d9bc95aaa
parent 1214 33e07bbb7779
child 1247 01711347f9ac
equal deleted inserted replaced
1244:7c87de28da3c 1245:768d9bc95aaa
   971 
   971 
   972 			grp = GetTownRadiusGroup(t, tile);
   972 			grp = GetTownRadiusGroup(t, tile);
   973 
   973 
   974 			// Show an animation to indicate road work
   974 			// Show an animation to indicate road work
   975 			if (t->road_build_months != 0 &&
   975 			if (t->road_build_months != 0 &&
   976 					!(GetTileDist(t->xy, tile) >= 8 && grp==0) &&
   976 					!(DistanceManhattan(t->xy, tile) >= 8 && grp == 0) &&
   977 					(_map5[tile]==5 || _map5[tile]==10)) {
   977 					(_map5[tile]==5 || _map5[tile]==10)) {
   978 				if (GetTileSlope(tile, NULL) == 0 && EnsureNoVehicle(tile) && CHANCE16(1,20)) {
   978 				if (GetTileSlope(tile, NULL) == 0 && EnsureNoVehicle(tile) && CHANCE16(1,20)) {
   979 					_map2[tile] = ((_map2[tile]&7) <= 1) ? 6 : 7;
   979 					_map2[tile] = ((_map2[tile]&7) <= 1) ? 6 : 7;
   980 
   980 
   981 					SndPlayTileFx(SND_21_JACKHAMMER, tile);
   981 					SndPlayTileFx(SND_21_JACKHAMMER, tile);