- char name[MAX_OSPATH];
- FS_StripExtension (com_argv[0], name, sizeof (name));
- COM_ToLowerString (name, name, sizeof (name));
-
- if (strstr(name, "transfusion"))
- gamemode = GAME_TRANSFUSION;
- else if (strstr(name, "nexuiz"))
- gamemode = GAME_NEXUIZ;
- else if (strstr(name, "nehahra"))
- gamemode = GAME_NEHAHRA;
- else if (strstr(name, "hipnotic"))
- gamemode = GAME_HIPNOTIC;
- else if (strstr(name, "rogue"))
- gamemode = GAME_ROGUE;
- else if (strstr(name, "gvb2"))
- gamemode = GAME_GOODVSBAD2;
- else if (strstr(name, "teu"))
- gamemode = GAME_TEU;
- else if (strstr(name, "battlemech"))
- gamemode = GAME_BATTLEMECH;
- else if (strstr(name, "zymotic"))
- gamemode = GAME_ZYMOTIC;
- else if (strstr(name, "fniggium"))
- gamemode = GAME_FNIGGIUM;
- else if (strstr(name, "setheral"))
- gamemode = GAME_SETHERAL;
- else if (strstr(name, "som"))
- gamemode = GAME_SOM;
- else if (strstr(name, "tenebrae"))
- gamemode = GAME_TENEBRAE;
- else
- gamemode = GAME_NORMAL;
-
- if (COM_CheckParm ("-transfusion"))
- gamemode = GAME_TRANSFUSION;
- else if (COM_CheckParm ("-nexuiz"))
- gamemode = GAME_NEXUIZ;
- else if (COM_CheckParm ("-nehahra"))
- gamemode = GAME_NEHAHRA;
- else if (COM_CheckParm ("-hipnotic"))
- gamemode = GAME_HIPNOTIC;
- else if (COM_CheckParm ("-rogue"))
- gamemode = GAME_ROGUE;
- else if (COM_CheckParm ("-quake"))
- gamemode = GAME_NORMAL;
- else if (COM_CheckParm ("-goodvsbad2"))
- gamemode = GAME_GOODVSBAD2;
- else if (COM_CheckParm ("-teu"))
- gamemode = GAME_TEU;
- else if (COM_CheckParm ("-battlemech"))
- gamemode = GAME_BATTLEMECH;
- else if (COM_CheckParm ("-zymotic"))
- gamemode = GAME_ZYMOTIC;
- else if (COM_CheckParm ("-fniggium"))
- gamemode = GAME_FNIGGIUM;
- else if (COM_CheckParm ("-setheral"))
- gamemode = GAME_SETHERAL;
- else if (COM_CheckParm ("-som"))
- gamemode = GAME_SOM;
- else if (COM_CheckParm ("-tenebrae"))
- gamemode = GAME_TENEBRAE;
-
- switch(gamemode)
- {
- case GAME_NORMAL:
- gamename = "DarkPlaces-Quake";
- gamedirname = "";
- break;
- case GAME_HIPNOTIC:
- gamename = "Darkplaces-Hipnotic";
- gamedirname = "hipnotic";
- break;
- case GAME_ROGUE:
- gamename = "Darkplaces-Rogue";
- gamedirname = "rogue";
- break;
- case GAME_NEHAHRA:
- gamename = "DarkPlaces-Nehahra";
- gamedirname = "nehahra";
- break;
- case GAME_NEXUIZ:
- gamename = "Nexuiz";
- gamedirname = "data";
- break;
- case GAME_TRANSFUSION:
- gamename = "Transfusion";
- gamedirname = "basetf";
- break;
- case GAME_GOODVSBAD2:
- gamename = "GoodVs.Bad2";
- gamedirname = "rts";
- break;
- case GAME_TEU:
- gamename = "TheEvilUnleashed";
- gamedirname = "baseteu";
- break;
- case GAME_BATTLEMECH:
- gamename = "Battlemech";
- gamedirname = "base";
- break;
- case GAME_ZYMOTIC:
- gamename = "Zymotic";
- gamedirname = "data";
- break;
- case GAME_FNIGGIUM:
- gamename = "Fniggium";
- gamedirname = "data";
- break;
- case GAME_SETHERAL:
- gamename = "Setheral";
- gamedirname = "data";
- break;
- case GAME_SOM:
- gamename = "Son of Man";
- gamedirname = "data";
- break;
- case GAME_TENEBRAE:
- gamename = "DarkPlaces-Tenebrae";
- gamedirname = "tenebrae";
- break;
- default:
- Sys_Error("COM_InitGameType: unknown gamemode %i\n", gamemode);
- break;
- }