From: Rudolf Polzer <divVerent@xonotic.org>
Date: Wed, 9 Feb 2011 08:11:21 +0000 (+0100)
Subject: print a message when encountering "type"
X-Git-Tag: xonotic-v0.5.0~311^2~30
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6a5784b990be05a8852c1c902253536e4c6633d3;p=xonotic%2Fxonotic-data.pk3dir.git

print a message when encountering "type"
---

diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc
index 35a827f90..741565f3d 100644
--- a/qcsrc/common/mapinfo.qc
+++ b/qcsrc/common/mapinfo.qc
@@ -410,6 +410,10 @@ string _MapInfo_GetDefault(float t)
 		case MAPINFO_TYPE_CTS:             return "20 0 0";
 		case MAPINFO_TYPE_FREEZETAG:       return "10 20 0";
 		case MAPINFO_TYPE_KEEPAWAY:	   return "30 20 0";
+		// NOTE: DO NOT ADD ANY MORE GAME TYPES HERE
+		// THIS IS JUST LEGACY SUPPORT FOR NEXUIZ MAPS
+		// ONLY ADD NEW STUFF TO _MapInfo_GetDefaultEx
+		// THIS FUNCTION WILL EVENTUALLY BE REMOVED
 		default:                           return "";
 	}
 }
@@ -945,6 +949,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
 		{
 			t = car(s); s = cdr(s);
 			f = MapInfo_Type_FromString(t);
+			print("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
 			if(f)
 				_MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, TRUE);
 			else