From 5101cadc15b47dec9032254e01e069f652c480e9 Mon Sep 17 00:00:00 2001 From: johns <> Date: Sun, 31 Mar 2002 17:37:19 +0000 Subject: [PATCH] Fixed bug: Wrong error message 'illegal level', if loading .cm maps for network play. --- doc/ChangeLog.html | 3 ++- src/game/game.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 6bdc08cf6..6437c2a88 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -762,7 +762,8 @@ <LI>New video frame and game simulation timing code written. Closes bug #205006. <LI>Fixed feature request #499301: Find idle workers (from Jimmy Salmon). - <LI>++ + <LI>Fixed bug: Wrong error message "illegal level", if loading .cm maps for network play. + <LI>+++ </UL> </UL> diff --git a/src/game/game.cpp b/src/game/game.cpp index 2065aacca..21a54b35d 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -85,17 +85,25 @@ local void LoadFreeCraftMap(const char* filename, DebugLevel3Fn("%p \n",map); if (lcm_prevent_recurse) { - fprintf(stderr,"recursive use of load clone map!\n"); + fprintf(stderr,"recursive use of load FreeCraft map!\n"); exit(-1); } lcm_prevent_recurse = 1; gh_eval_file((char*)filename); lcm_prevent_recurse = 0; + +#if 0 + // Not true if multiplayer levels! if (!ThisPlayer) { /// ARI: bomb if nothing was loaded! - fprintf(stderr,"%s: invalid clone map\n", filename); + fprintf(stderr,"%s: invalid FreeCraft map\n", filename); exit(-1); } // FIXME: Retrieve map->Info from somewhere... If LoadPud is used in CCL it magically is set there :) +#endif + if( !TheMap.Width || !TheMap.Height ) { + fprintf(stderr,"%s: invalid FreeCraft map\n", filename); + exit(-1); + } } /**