tunnelbridge_cmd.c
changeset 3218 68decfba698f
parent 3217 60f832048cd4
child 3220 149ce8c6ba10
equal deleted inserted replaced
3217:60f832048cd4 3218:68decfba698f
   818 			return CMD_ERROR;
   818 			return CMD_ERROR;
   819 		}
   819 		}
   820 
   820 
   821 		if (GB(_m[tile].m3, 0, 4) == totype) return CMD_ERROR;
   821 		if (GB(_m[tile].m3, 0, 4) == totype) return CMD_ERROR;
   822 
   822 
   823 		SB(_m[tile].m3, 0, 4, totype);
   823 		if (exec) {
   824 		SB(_m[endtile].m3, 0, 4, totype);
   824 			SB(_m[tile].m3, 0, 4, totype);
       
   825 			SB(_m[endtile].m3, 0, 4, totype);
       
   826 			MarkTileDirtyByTile(tile);
       
   827 			MarkTileDirtyByTile(endtile);
       
   828 		}
   825 		cost = 2 * (_price.build_rail >> 1);
   829 		cost = 2 * (_price.build_rail >> 1);
   826 		delta = TileOffsByDir(GetBridgeRampDirection(tile));
   830 		delta = TileOffsByDir(GetBridgeRampDirection(tile));
   827 		for (tile += delta; tile != endtile; tile += delta) {
   831 		for (tile += delta; tile != endtile; tile += delta) {
   828 			if (exec) {
   832 			if (exec) {
   829 				SB(_m[tile].m3, 4, 4, totype);
   833 				SB(_m[tile].m3, 4, 4, totype);