From 0a76b4c5af714ab74126751991ed3399356f76bb Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> Date: Sat, 12 Feb 2005 16:08:01 +0000 Subject: stupid me, forgot to change some variables [Shinomori] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1092 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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) ) -- cgit v1.2.3-70-g09d2