diff --git a/config/docs.cfg b/config/docs.cfg
index 3eddcb99..69344bbd 100644
--- a/config/docs.cfg
+++ b/config/docs.cfg
@@ -799,7 +799,7 @@ docargument [V] [the volume] [default 255] [0];
docremark [Will play map-specific sound so long as the player is within the radius. However, only up to the max uses allowed for N (specified in the mapsound command) will play, even if the player is within the radius of more N sounds than the max. By default (size 0), the sound is a point source. Its volume is maximal at the entity's location, and tapers off to 0 at the radius. If size is specified, the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always defined as distance from the entity's location, so a size greater than or equal to the radius will just make a sound that is always max volume within the radius, and off outside.];
docremark [A sound entity can be either ambient or non-ambient. Ambient sounds have no specific direction, they are 'just there'. Non-ambient sounds however appear to come from a specific direction (stereo panning). If S is set to 0, the sound is a single point and will therefore be non-ambient. However if S is greater than 0, the sound will be ambient as it covers a specified area instead of being a single point.];
docident [newmap] [Creates a new map.];
-docargument [S] [the size of the new map] [6..12] [0];
+docargument [S] [the size of the new map] [6..9] [0];
docremark [The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.];
docident [nextclosestent] [Choose another 'closest ent'.];
docremark [Use this, when two entities are placed in exactly the same location.];
diff --git a/docs/reference.xml b/docs/reference.xml
index e48b4bcf..a5ae199c 100644
--- a/docs/reference.xml
+++ b/docs/reference.xml
@@ -3252,7 +3252,7 @@ Output:
The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.
-
+
diff --git a/source/src/world.cpp b/source/src/world.cpp
index 5b3d6fa5..e9ccb2d3 100644
--- a/source/src/world.cpp
+++ b/source/src/world.cpp
@@ -500,10 +500,14 @@ bool empty_world(int factor, bool force) // main empty world creation routine
void mapenlarge() { if(empty_world(-1, false)) addmsg(SV_NEWMAP, "ri", -1); }
void mapshrink() { if(empty_world(-2, false)) addmsg(SV_NEWMAP, "ri", -2); }
void newmap(int i) {
- if(empty_world(i, false))
+ if(i < 6 || i > 9) conoutf("\f3Error: \f5newmap has a valid range of \f26-9"); // TODO: update this valid range when /newmap >9 stops crashing the client ;) - Bukz 2011apr27
+ else
{
- addmsg(SV_NEWMAP, "ri", max(i, 0));
- if(identexists("onNewMap")) execute("onNewMap");
+ if(empty_world(i, false))
+ {
+ addmsg(SV_NEWMAP, "ri", max(i, 0));
+ if(identexists("onNewMap")) execute("onNewMap");
+ }
}
}