hedgewars/uLand.pas
changeset 3228 44a59edc7bac
parent 3225 5d8f4737b6cd
child 3236 4ab3917d7d44
--- a/hedgewars/uLand.pas	Thu Apr 01 00:56:38 2010 +0000
+++ b/hedgewars/uLand.pas	Thu Apr 01 05:10:50 2010 +0000
@@ -920,9 +920,9 @@
 end;
 
 num_cells_x := LAND_WIDTH div cellsize;
-if num_cells_x mod 2 = 0 then num_cells_x := num_cells_x - 1; //needs to be odd
+if not odd(num_cells_x) then num_cells_x := num_cells_x - 1; //needs to be odd
 num_cells_y := LAND_HEIGHT div cellsize;
-if num_cells_y mod 2 = 0 then num_cells_y := num_cells_y - 1;
+if not odd(num_cells_y) then num_cells_y := num_cells_y - 1;
 num_edges_x := num_cells_x - 1;
 num_edges_y := num_cells_y - 1;
 seen_cells_x := num_cells_x div 2;