From: Rudolf Polzer Date: Fri, 2 Aug 2013 09:21:43 +0000 (+0200) Subject: mapinfo cdtrack: only take first token, for possible extension "cdtrack 17 moreargs..." X-Git-Tag: xonotic-v0.8.0~374 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e6e339166f0ccbf950490f7ba301908ea1115975;p=xonotic%2Fxonotic-data.pk3dir.git mapinfo cdtrack: only take first token, for possible extension "cdtrack 17 moreargs..." --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 82c5673d8..e78ea286f 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1073,20 +1073,21 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo } else if(t == "fog") { - if not(cvar_value_issafe(t)) + if not(cvar_value_issafe(s)) print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n"); else MapInfo_Map_fog = s; } else if(t == "cdtrack") { - if(pGametypeToSet) + t = car(s); s = cdr(s); a = stof(t); + if(pGametypeToSet) // FIXME is this check right here? { if not(cvar_value_issafe(t)) print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n"); else MapInfo_Map_clientstuff = strcat( - MapInfo_Map_clientstuff, "cd loop \"", s, "\"\n" + MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n" ); } }