diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index acf32c89..e97aa34c 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -581,9 +581,14 @@ extern int checkarea(int maplayout_factor, char *maplayout); extern int MA; extern float Mh; +bool bad_map() // this function makes a pair with good_map from clients2c +{ + return (gamemode != GMODE_COOPEDIT && ( Mh >= MAXMHEIGHT || MA >= MAXMAREA )); +} + bool tryrespawn() { - if ( Mh >= MAXMHEIGHT || MA >= MAXMAREA ) { + if ( bad_map() ) { hudoutf("This map is not supported in multiplayer"); } else if(spawnpermission > SP_OK_NUM) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 9d2801f9..ca0fc262 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -221,7 +221,7 @@ extern int connected; bool good_map() { bool checked = ((MA = checkarea(sfactor, mlayout)) < MAXMAREA && Mh < MAXMHEIGHT); - if (!connected) return true; + if (!connected || gamemode == GMODE_COOPEDIT) return true; return checked; } @@ -457,7 +457,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) case SV_SPAWNSTATE: { - if (!good_map()) { + if (!good_map()) { // if the client is not in a good map, he will never spawn // this will disrupt hacked servers loopi(6+2*NUMGUNS) getint(p); break; }