stupid me, forgot to change some variables [Shinomori]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1092 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
(no author) 2005-02-12 16:08:01 +00:00
parent d1518bb819
commit 1b2a05dd0b

View File

@ -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) // linear equation for finding a single line between (x0,y0)->(x1,y1)
// independent of the given xy-values // independent of the given xy-values
double deltax = (x1-x0);
double deltay = (y1-y0);
double dx = 0.0; double dx = 0.0;
double dy = 0.0; double dy = 0.0;
int bx=-1; // initialize block coords to some impossible value 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 // go along the index
for(t=0; t<=tmax; t++) for(t=0; t<=tmax; t++)
{ // xy-values of the line including start and end point { // xy-values of the line including start and end point
int x = (int)floor(deltax * (double)t +0.5)+x0; int x = (int)floor(dx * (double)t +0.5)+x0;
int y = (int)floor(deltay * (double)t +0.5)+y0; int y = (int)floor(dy * (double)t +0.5)+y0;
// check the block index of the calculated xy // check the block index of the calculated xy
if( (bx!=x/BLOCK_SIZE) || (by!=y/BLOCK_SIZE) ) if( (bx!=x/BLOCK_SIZE) || (by!=y/BLOCK_SIZE) )