summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/map.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 57be9ffe4..976c0812d 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ 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/09
+ * Fixed map_waterheight prefixing extra "data\" [Lance]
* Mob_ai update. The attacked checks will trigger even if the mob can't
move. Being attacked while the mob can't move no longer will trigger
rude-attacked skills. [Skotlex]
diff --git a/src/map/map.c b/src/map/map.c
index b580ce07e..a6702c3cc 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2351,7 +2351,7 @@ int map_setwaterheight(int m, char *mapname, int height) {
*/
int map_waterheight(char *mapname) {
char fn[256];
- char *rsw;
+ char *rsw, *found;
float whtemp;
int wh;
@@ -2365,7 +2365,11 @@ int map_waterheight(char *mapname) {
//Look up for the rsw
sprintf(fn,"data\\%s",mapname);
- sprintf(fn,"data\\%s",grfio_find_file(fn));
+ found = grfio_find_file(fn);
+ if(!strstr(found,"data\\"))
+ sprintf(fn,"data\\%s", found);
+ else
+ strcpy(fn, found);
rsw = strstr(fn, ".");
if (rsw && strstr(fn, ".rsw") == NULL)