Explorar o código

* Removed auto-add feature from mapindex code, as map indexes are used for save data, thus need to be constant across server starts (since r4726).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14807 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei %!s(int64=14) %!d(string=hai) anos
pai
achega
e7e8d8b953
Modificáronse 3 ficheiros con 2 adicións e 13 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 0 10
      src/common/mapindex.c
  3. 0 3
      src/common/mapindex.h

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/05/01
+	* Removed auto-add feature from mapindex code, as map indexes are used for save data, thus need to be constant across server starts (since r4726). [Ai4rei]
 2011/04/28
 	* Fixed @makehomun not checking for existing homunculus properly and thus allowing to create a homunculus when one is already present but inactive (bugreport:4879, since r10272). [Ai4rei]
 	* Updated packet 0x163 (ZC_BAN_LIST) to reflect change in packet layout introduced with 2010-08-03aRagexeRE (bugreport:4881, follow up to r14718). [Ai4rei]

+ 0 - 10
src/common/mapindex.c

@@ -128,18 +128,8 @@ unsigned short mapindex_name2id(const char* name)
 		if (strcmp(indexes[i].name,map_name)==0)
 			return i;
 	}
-#ifdef MAPINDEX_AUTOADD
-	if( mapindex_addmap(i,map_name) )
-	{
-		ShowDebug("mapindex_name2id: Auto-added map \"%s\" to position %d\n", map_name, i);
-		return i;
-	}
-	ShowWarning("mapindex_name2id: Failed to auto-add map \"%s\" to position %d!\n", map_name, i);
-	return 0;
-#else
 	ShowDebug("mapindex_name2id: Map \"%s\" not found in index list!\n", map_name);
 	return 0;
-#endif
 }
 
 const char* mapindex_id2name(unsigned short id)

+ 0 - 3
src/common/mapindex.h

@@ -7,9 +7,6 @@
 //File in charge of assigning a numberic ID to each map in existance for space saving when passing map info between servers.
 extern char mapindex_cfgfile[80];
 
-//whether to enable auto-adding of maps during run. Not so secure as the map indexes will vary!
-//#define MAPINDEX_AUTOADD
-
 #define MAX_MAPINDEX 2000
 
 //Some definitions for the mayor city maps.