(svn r5772) Road depots always have an player as owner, so remove an useless check
authortron
Sat, 05 Aug 2006 16:57:39 +0000
changeset 4226 3926da9dc486
parent 4225 a14f76451e03
child 4227 55651eaaedb5
(svn r5772) Road depots always have an player as owner, so remove an useless check
road_cmd.c
--- a/road_cmd.c	Sat Aug 05 16:54:55 2006 +0000
+++ b/road_cmd.c	Sat Aug 05 16:57:39 2006 +0000
@@ -783,15 +783,12 @@
 
 		default:
 		case ROAD_TILE_DEPOT: {
-			uint32 ormod;
-			PlayerID player;
 			const DrawRoadSeqStruct* drss;
+			uint32 palette;
 
 			if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
 
-			ormod = PALETTE_TO_GREY;	//was this a bug/problem?
-			player = GetTileOwner(ti->tile);
-			if (player < MAX_PLAYERS) ormod = PLAYER_SPRITE_COLOR(player);
+			palette = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile));
 
 			drss = _road_depot[GetRoadDepotDirection(ti->tile)];
 
@@ -800,8 +797,11 @@
 			for (; drss->image != 0; drss++) {
 				uint32 image = drss->image;
 
-				if (image & PALETTE_MODIFIER_COLOR) image |= ormod;
-				if (_display_opt & DO_TRANS_BUILDINGS) MAKE_TRANSPARENT(image);
+				if (_display_opt & DO_TRANS_BUILDINGS) {
+					MAKE_TRANSPARENT(image);
+				} else if (image & PALETTE_MODIFIER_COLOR) {
+					image |= palette;
+				}
 
 				AddSortableSpriteToDraw(
 					image, ti->x | drss->subcoord_x,