Browse Source

Expanded max maps per instance define
* Follow up to c97be60.
* Increased the max amount of maps per instance to the limit.

aleos89 9 years ago
parent
commit
1408eefd80
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/map/instance.h

+ 5 - 1
src/map/instance.h

@@ -10,7 +10,7 @@
 struct block_list;
 
 #define MAX_INSTANCE_DATA		300	// Essentially how many instances we can create, but instance creation is primarily decided by MAX_MAP_PER_SERVER
-#define MAX_MAP_PER_INSTANCE	9	// Max number of maps per instance (Enter map is counted as one) - Supports up to 255 maps
+#define MAX_MAP_PER_INSTANCE	UINT8_MAX	// Max number of maps per instance (Enter map is counted as one) - Supports up to 255 maps
 
 #define INSTANCE_NAME_LENGTH (60+1)
 
@@ -83,4 +83,8 @@ void do_reload_instance(void);
 void do_init_instance(void);
 void do_final_instance(void);
 
+#if MAX_MAP_PER_INSTANCE > UINT8_MAX
+	#error Too many maps per instance defined! Please adjust MAX_MAP_PER_INSTANCE to a lower value.
+#endif
+
 #endif