summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-12 16:08:01 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-12 16:08:01 +0000
commit0a76b4c5af714ab74126751991ed3399356f76bb (patch)
tree2e5061717a7357342a139e98a32299146573db1a
parent985c83199719ccf8324cae2b87612e2599bcafe2 (diff)
downloadhercules-0a76b4c5af714ab74126751991ed3399356f76bb.tar.gz
hercules-0a76b4c5af714ab74126751991ed3399356f76bb.tar.bz2
hercules-0a76b4c5af714ab74126751991ed3399356f76bb.tar.xz
hercules-0a76b4c5af714ab74126751991ed3399356f76bb.zip
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
-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) )