diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-19 00:28:42 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-19 00:28:42 +0000 |
commit | a956523f8f6989039d6b0a2802055ff5f1e7861a (patch) | |
tree | ccf980a3fe9c04ba2cd3db519db491c9fcabb230 | |
parent | 6bc3bdd85030561169370b5c70476eb4421cc2fd (diff) | |
download | hercules-a956523f8f6989039d6b0a2802055ff5f1e7861a.tar.gz hercules-a956523f8f6989039d6b0a2802055ff5f1e7861a.tar.bz2 hercules-a956523f8f6989039d6b0a2802055ff5f1e7861a.tar.xz hercules-a956523f8f6989039d6b0a2802055ff5f1e7861a.zip |
- Fixed a typo in map_search_freecell which was returning incorrect cells according to the ranges given. Increased the max number of iteration for finding a suitable cell to 100.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6172 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/map.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 6c8622a26..b31f124c5 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/18
+ * Fixed a typo in map_search_freecell which was returning incorrect cells
+ according to the ranges given. [Skotlex]
* A tiny fix to @kami [Zido]
* The IRC Bot can now autojoin when kicked, set in irc_athena. [Zido]
* Added @who to the IRC Bot, outputs all online characters. [Zido]
diff --git a/src/map/map.c b/src/map/map.c index 4e293c489..f3106668e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1402,13 +1402,13 @@ int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx } if (rx >= 0 && ry >= 0) { tries = rx2*ry2; - if (tries > 50) tries = 50; + if (tries > 100) tries = 100; } else tries = 100; while(tries--) { *x = (rx >= 0)?(rand()%rx2-rx+bx):(rand()%(map[m].xs-2)+1); - *y = (ry >= 0)?(rand()%rx2-ry+by):(rand()%(map[m].ys-2)+1); + *y = (ry >= 0)?(rand()%ry2-ry+by):(rand()%(map[m].ys-2)+1); if (map_getcell(m,*x,*y,CELL_CHKREACH)) { |