src/water_cmd.cpp
changeset 6106 2898cd9417fd
parent 5991 ec2eebfe86de
child 6134 871305fd9ab7
equal deleted inserted replaced
6105:760134e9dab6 6106:2898cd9417fd
   227 	sx = TileX(p1);
   227 	sx = TileX(p1);
   228 	sy = TileY(p1);
   228 	sy = TileY(p1);
   229 
   229 
   230 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   230 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   231 
   231 
   232 	if (x < sx) intswap(x, sx);
   232 	if (x < sx) Swap(x, sx);
   233 	if (y < sy) intswap(y, sy);
   233 	if (y < sy) Swap(y, sy);
   234 	size_x = (x - sx) + 1;
   234 	size_x = (x - sx) + 1;
   235 	size_y = (y - sy) + 1;
   235 	size_y = (y - sy) + 1;
   236 
   236 
   237 	/* Outside the editor you can only drag canals, and not areas */
   237 	/* Outside the editor you can only drag canals, and not areas */
   238 	if (_game_mode != GM_EDITOR && (sx != x && sy != y)) return CMD_ERROR;
   238 	if (_game_mode != GM_EDITOR && (sx != x && sy != y)) return CMD_ERROR;