]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
mapinfo cdtrack: only take first token, for possible extension "cdtrack 17 moreargs..."
authorRudolf Polzer <divverent@xonotic.org>
Fri, 2 Aug 2013 09:21:43 +0000 (11:21 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 2 Aug 2013 09:21:43 +0000 (11:21 +0200)
qcsrc/common/mapinfo.qc

index 82c5673d8b44ee22cb479844517c44e8e30cea73..e78ea286f90cee9583541991fa9c197a1f38c144 100644 (file)
@@ -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"
                                        );
                        }
                }