summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 9a4f35a35..ac480cbab 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -999,8 +999,6 @@ if you want to keep this that way then check and swap x0,y0 with x1,y1
//////////////////////////////////////////////////////////////
// linear equation for finding a single line between (x0,y0)->(x1,y1)
// independent of the given xy-values
- double deltax = (x1-x0);
- double deltay = (y1-y0);
double dx = 0.0;
double dy = 0.0;
int bx=-1; // initialize block coords to some impossible value
@@ -1022,8 +1020,8 @@ if you want to keep this that way then check and swap x0,y0 with x1,y1
// go along the index
for(t=0; t<=tmax; t++)
{ // xy-values of the line including start and end point
- int x = (int)floor(deltax * (double)t +0.5)+x0;
- int y = (int)floor(deltay * (double)t +0.5)+y0;
+ int x = (int)floor(dx * (double)t +0.5)+x0;
+ int y = (int)floor(dy * (double)t +0.5)+y0;
// check the block index of the calculated xy
if( (bx!=x/BLOCK_SIZE) || (by!=y/BLOCK_SIZE) )