From: Rene S. <sa...@us...> - 2004-08-20 21:30:09
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1597/src/jake2/server Modified Files: SV_CCMDS.java SV_INIT.java SV.java SV_WORLD.java Log Message: savegames now seem to work. Index: SV_WORLD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_WORLD.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SV_WORLD.java 9 Jul 2004 06:50:49 -0000 1.4 --- SV_WORLD.java 20 Aug 2004 21:29:57 -0000 1.5 *************** *** 177,180 **** --- 177,181 ---- if (null == ent.area.prev) return; // not linked in anywhere + RemoveLink(ent.area); ent.area.prev= ent.area.next= null; *************** *** 213,217 **** // encode the size into the entity_state for client prediction if (ent.solid == SOLID_BBOX && 0 == (ent.svflags & SVF_DEADMONSTER)) ! { // assume that x/y are equal and symetric int i= (int) (ent.maxs[0] / 8); if (i < 1) --- 214,219 ---- // encode the size into the entity_state for client prediction if (ent.solid == SOLID_BBOX && 0 == (ent.svflags & SVF_DEADMONSTER)) ! { ! // assume that x/y are equal and symetric int i= (int) (ent.maxs[0] / 8); if (i < 1) *************** *** 245,249 **** // set the abs box if (ent.solid == SOLID_BSP && (ent.s.angles[0] != 0 || ent.s.angles[1] != 0 || ent.s.angles[2] != 0)) ! { // expand for rotation float max, v; --- 247,252 ---- // set the abs box if (ent.solid == SOLID_BSP && (ent.s.angles[0] != 0 || ent.s.angles[1] != 0 || ent.s.angles[2] != 0)) ! { ! // expand for rotation float max, v; *************** *** 265,269 **** } else ! { // normal VectorAdd(ent.s.origin, ent.mins, ent.absmin); VectorAdd(ent.s.origin, ent.maxs, ent.absmax); --- 268,273 ---- } else ! { ! // normal VectorAdd(ent.s.origin, ent.mins, ent.absmin); VectorAdd(ent.s.origin, ent.maxs, ent.absmax); *************** *** 285,289 **** ent.areanum2= 0; ! //get all leafs, including solids int iw[] = {topnode}; --- 289,293 ---- ent.areanum2= 0; ! // get all leafs, including solids int iw[] = {topnode}; Index: SV.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SV.java 30 Jul 2004 06:07:23 -0000 1.5 --- SV.java 20 Aug 2004 21:29:57 -0000 1.6 *************** *** 5,9 **** * $Id$ */ ! /* Copyright (C) 1997-2001 Id Software, Inc. --- 5,9 ---- * $Id$ */ ! /* Copyright (C) 1997-2001 Id Software, Inc. [...2050 lines suppressed...] ====================== ! *///ok ! public static boolean SV_CloseEnough(edict_t ent, edict_t goal, float dist) { int i; ! ! for (i = 0; i < 3; i++) { if (goal.absmin[i] > ent.absmax[i] + dist) return false; --- 1194,1204 ---- ====================== ! */ //ok ! public static boolean SV_CloseEnough(edict_t ent, edict_t goal, float dist) ! { int i; ! ! for (i= 0; i < 3; i++) ! { if (goal.absmin[i] > ent.absmax[i] + dist) return false; Index: SV_INIT.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_INIT.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SV_INIT.java 30 Jul 2004 06:07:23 -0000 1.5 --- SV_INIT.java 20 Aug 2004 21:29:57 -0000 1.6 *************** *** 34,41 **** import java.io.RandomAccessFile; ! public class SV_INIT extends Globals { ! public static server_static_t svs = new server_static_t(); // persistant server info ! public static server_t sv = new server_t(); // local server /* --- 34,42 ---- import java.io.RandomAccessFile; ! public class SV_INIT extends Globals ! { ! public static server_static_t svs= new server_static_t(); // persistant server info ! public static server_t sv= new server_t(); // local server /* *************** *** 45,49 **** ================ */ ! public static int SV_FindIndex(String name, int start, int max, boolean create) { int i; --- 46,51 ---- ================ */ ! public static int SV_FindIndex(String name, int start, int max, boolean create) ! { int i; *************** *** 51,55 **** return 0; ! for (i = 1; i < max && sv.configstrings[start + i] != null; i++) if (0 == strcmp(sv.configstrings[start + i], name)) return i; --- 53,57 ---- return 0; ! for (i= 1; i < max && sv.configstrings[start + i] != null; i++) if (0 == strcmp(sv.configstrings[start + i], name)) return i; *************** *** 62,68 **** //strncpy (sv.configstrings[start+i], name, sizeof(sv.configstrings[i])); ! sv.configstrings[start + i] = name; ! if (sv.state != ss_loading) { // send the update to everyone SZ.Clear(sv.multicast); MSG.WriteChar(sv.multicast, svc_configstring); --- 64,71 ---- //strncpy (sv.configstrings[start+i], name, sizeof(sv.configstrings[i])); ! sv.configstrings[start + i]= name; ! if (sv.state != ss_loading) ! { // send the update to everyone SZ.Clear(sv.multicast); MSG.WriteChar(sv.multicast, svc_configstring); *************** *** 75,87 **** } ! public static int SV_ModelIndex(String name) { return SV_FindIndex(name, CS_MODELS, MAX_MODELS, true); } ! public static int SV_SoundIndex(String name) { return SV_FindIndex(name, CS_SOUNDS, MAX_SOUNDS, true); } ! public static int SV_ImageIndex(String name) { return SV_FindIndex(name, CS_IMAGES, MAX_IMAGES, true); } --- 78,93 ---- } ! public static int SV_ModelIndex(String name) ! { return SV_FindIndex(name, CS_MODELS, MAX_MODELS, true); } ! public static int SV_SoundIndex(String name) ! { return SV_FindIndex(name, CS_SOUNDS, MAX_SOUNDS, true); } ! public static int SV_ImageIndex(String name) ! { return SV_FindIndex(name, CS_IMAGES, MAX_IMAGES, true); } *************** *** 96,106 **** ================ */ ! public static void SV_CreateBaseline() { edict_t svent; int entnum; ! for (entnum = 1; entnum < SV_GAME.ge.num_edicts; entnum++) { //svent = EDICT_NUM(entnum); ! svent = SV_GAME.ge.edicts[entnum]; if (!svent.inuse) --- 102,114 ---- ================ */ ! public static void SV_CreateBaseline() ! { edict_t svent; int entnum; ! for (entnum= 1; entnum < SV_GAME.ge.num_edicts; entnum++) ! { //svent = EDICT_NUM(entnum); ! svent= SV_GAME.ge.edicts[entnum]; if (!svent.inuse) *************** *** 108,112 **** if (0 == svent.s.modelindex && 0 == svent.s.sound && 0 == svent.s.effects) continue; ! svent.s.number = entnum; // --- 116,120 ---- if (0 == svent.s.modelindex && 0 == svent.s.sound && 0 == svent.s.effects) continue; ! svent.s.number= entnum; // *************** *** 115,119 **** VectorCopy(svent.s.origin, svent.s.old_origin); // rst: bugfix ! sv.baselines[entnum].set(svent.s);// = svent.s.getClone(); } } --- 123,127 ---- VectorCopy(svent.s.origin, svent.s.old_origin); // rst: bugfix ! sv.baselines[entnum].set(svent.s); // = svent.s.getClone(); } } *************** *** 124,128 **** ================= */ ! public static void SV_CheckForSavegame() { //char name[MAX_OSPATH]; String name; --- 132,137 ---- ================= */ ! public static void SV_CheckForSavegame() ! { //char name[MAX_OSPATH]; String name; *************** *** 138,154 **** return; ! name = FS.Gamedir() + "/save/current/" + sv.name + ".sav"; ! try { ! f = new RandomAccessFile(name, "r"); } ! catch (Exception e) { return; // no savegame } ! try { f.close(); } ! catch (IOException e1) { e1.printStackTrace(); } --- 147,167 ---- return; ! name= FS.Gamedir() + "/save/current/" + sv.name + ".sav"; ! try ! { ! f= new RandomAccessFile(name, "r"); } ! catch (Exception e) ! { return; // no savegame } ! try ! { f.close(); } ! catch (IOException e1) ! { e1.printStackTrace(); } *************** *** 159,163 **** SV_CCMDS.SV_ReadLevelFile(); ! if (!sv.loadgame) { // coming back to a level after being in a different // level, so run it for ten seconds --- 172,177 ---- SV_CCMDS.SV_ReadLevelFile(); ! if (!sv.loadgame) ! { // coming back to a level after being in a different // level, so run it for ten seconds *************** *** 167,176 **** int previousState; // PGM ! previousState = sv.state; // PGM ! sv.state = ss_loading; // PGM ! for (i = 0; i < 100; i++) SV_GAME.ge.RunFrame(); ! sv.state = previousState; // PGM } } --- 181,190 ---- int previousState; // PGM ! previousState= sv.state; // PGM ! sv.state= ss_loading; // PGM ! for (i= 0; i < 100; i++) SV_GAME.ge.RunFrame(); ! sv.state= previousState; // PGM } } *************** *** 185,196 **** ================ */ ! public static void SV_SpawnServer( ! String server, ! String spawnpoint, ! int serverstate, ! boolean attractloop, ! boolean loadgame) { int i; ! int checksum = 0; if (attractloop) --- 199,206 ---- ================ */ ! public static void SV_SpawnServer(String server, String spawnpoint, int serverstate, boolean attractloop, boolean loadgame) ! { int i; ! int checksum= 0; if (attractloop) *************** *** 201,264 **** Com.DPrintf("SpawnServer: " + server + "\n"); if (sv.demofile != null) ! try { sv.demofile.close(); } ! catch (Exception e) { } svs.spawncount++; // any partially connected client will be // restarted sv.state = ss_dead; Globals.server_state= sv.state; // wipe the entire per-level structure //memset(sv, 0, sizeof(sv)); ! sv = new server_t(); ! ! svs.realtime = 0; ! sv.loadgame = loadgame; ! sv.attractloop = attractloop; // save name for levels that don't set message sv.configstrings[CS_NAME]= server; ! ! if (Cvar.VariableValue("deathmatch")!=0) { ! sv.configstrings[CS_AIRACCEL] = ""+SV_MAIN.sv_airaccelerate.value; ! PMove.pm_airaccelerate = SV_MAIN.sv_airaccelerate.value; } ! else { ! sv.configstrings[CS_AIRACCEL] = "0"; ! PMove.pm_airaccelerate = 0; } SZ.Init(sv.multicast, sv.multicast_buf, sv.multicast_buf.length); ! sv.name = server; // leave slots at start for clients only ! for (i = 0; i < SV_MAIN.maxclients.value; i++) { // needs to reconnect if (svs.clients[i].state > cs_connected) ! svs.clients[i].state = cs_connected; ! svs.clients[i].lastframe = -1; } ! sv.time = 1000; ! sv.name=server; ! sv.configstrings[CS_NAME] = server; ! ! int iw[] = {checksum}; ! if (serverstate != ss_game) { ! sv.models[1] = CM.CM_LoadMap("", false, iw); // no real map } ! else { ! sv.configstrings[CS_MODELS + 1] = "maps/" + server + ".bsp"; ! sv.models[1] = CM.CM_LoadMap(sv.configstrings[CS_MODELS + 1], false, iw); } ! checksum = iw[0]; ! sv.configstrings[CS_MAPCHECKSUM] = "" + checksum; // --- 211,283 ---- Com.DPrintf("SpawnServer: " + server + "\n"); if (sv.demofile != null) ! try ! { sv.demofile.close(); } ! catch (Exception e) ! { } svs.spawncount++; // any partially connected client will be // restarted + sv.state = ss_dead; Globals.server_state= sv.state; + // wipe the entire per-level structure //memset(sv, 0, sizeof(sv)); ! sv= new server_t(); ! ! svs.realtime= 0; ! sv.loadgame= loadgame; ! sv.attractloop= attractloop; // save name for levels that don't set message sv.configstrings[CS_NAME]= server; ! ! if (Cvar.VariableValue("deathmatch") != 0) ! { ! sv.configstrings[CS_AIRACCEL]= "" + SV_MAIN.sv_airaccelerate.value; ! PMove.pm_airaccelerate= SV_MAIN.sv_airaccelerate.value; } ! else ! { ! sv.configstrings[CS_AIRACCEL]= "0"; ! PMove.pm_airaccelerate= 0; } SZ.Init(sv.multicast, sv.multicast_buf, sv.multicast_buf.length); ! sv.name= server; // leave slots at start for clients only ! for (i= 0; i < SV_MAIN.maxclients.value; i++) ! { // needs to reconnect if (svs.clients[i].state > cs_connected) ! svs.clients[i].state= cs_connected; ! svs.clients[i].lastframe= -1; } ! sv.time= 1000; ! sv.name= server; ! sv.configstrings[CS_NAME]= server; ! int iw[]= { checksum }; ! ! if (serverstate != ss_game) ! { ! sv.models[1]= CM.CM_LoadMap("", false, iw); // no real map } ! else ! { ! sv.configstrings[CS_MODELS + 1]= "maps/" + server + ".bsp"; ! sv.models[1]= CM.CM_LoadMap(sv.configstrings[CS_MODELS + 1], false, iw); } ! checksum= iw[0]; ! sv.configstrings[CS_MAPCHECKSUM]= "" + checksum; // *************** *** 267,274 **** SV_WORLD.SV_ClearWorld(); ! for (i = 1; i < CM.CM_NumInlineModels(); i++) { ! sv.configstrings[CS_MODELS + 1 + i] = "*" + i; // copy references ! sv.models[i + 1] = CM.InlineModel(sv.configstrings[CS_MODELS + 1 + i]); } --- 286,294 ---- SV_WORLD.SV_ClearWorld(); ! for (i= 1; i < CM.CM_NumInlineModels(); i++) ! { ! sv.configstrings[CS_MODELS + 1 + i]= "*" + i; // copy references ! sv.models[i + 1]= CM.InlineModel(sv.configstrings[CS_MODELS + 1 + i]); } *************** *** 279,282 **** --- 299,303 ---- // precache and static commands can be issued during // map initialization + sv.state = ss_loading; Globals.server_state= sv.state; *************** *** 312,326 **** ============== */ ! public static void SV_InitGame() { int i; ! edict_t ent; //char idmaster[32]; String idmaster; ! if (svs.initialized) { // cause any connected clients to reconnect SV_MAIN.SV_Shutdown("Server restarted\n", true); } ! else { // make sure the client is down CL.Drop(); --- 333,350 ---- ============== */ ! public static void SV_InitGame() ! { int i; ! edict_t ent; //char idmaster[32]; String idmaster; ! if (svs.initialized) ! { // cause any connected clients to reconnect SV_MAIN.SV_Shutdown("Server restarted\n", true); } ! else ! { // make sure the client is down CL.Drop(); *************** *** 331,337 **** Cvar.GetLatchedVars(); ! svs.initialized = true; ! if (Cvar.VariableValue("coop")!=0 && Cvar.VariableValue("deathmatch")!=0) { Com.Printf("Deathmatch and Coop both set, disabling Coop\n"); Cvar.FullSet("coop", "0", CVAR_SERVERINFO | CVAR_LATCH); --- 355,362 ---- Cvar.GetLatchedVars(); ! svs.initialized= true; ! if (Cvar.VariableValue("coop") != 0 && Cvar.VariableValue("deathmatch") != 0) ! { Com.Printf("Deathmatch and Coop both set, disabling Coop\n"); Cvar.FullSet("coop", "0", CVAR_SERVERINFO | CVAR_LATCH); *************** *** 340,356 **** // dedicated servers are can't be single player and are usually DM // so unless they explicity set coop, force it to deathmatch ! if (dedicated.value!=0) { ! if (0==Cvar.VariableValue("coop")) Cvar.FullSet("deathmatch", "1", CVAR_SERVERINFO | CVAR_LATCH); } // init clients ! if (Cvar.VariableValue("deathmatch")!=0) { if (SV_MAIN.maxclients.value <= 1) Cvar.FullSet("maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); else if (SV_MAIN.maxclients.value > MAX_CLIENTS) ! Cvar.FullSet("maxclients", "" + MAX_CLIENTS, CVAR_SERVERINFO | CVAR_LATCH); } ! else if (Cvar.VariableValue("coop")!=0) { if (SV_MAIN.maxclients.value <= 1 || SV_MAIN.maxclients.value > 4) Cvar.FullSet("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH); --- 365,384 ---- // dedicated servers are can't be single player and are usually DM // so unless they explicity set coop, force it to deathmatch ! if (dedicated.value != 0) ! { ! if (0 == Cvar.VariableValue("coop")) Cvar.FullSet("deathmatch", "1", CVAR_SERVERINFO | CVAR_LATCH); } // init clients ! if (Cvar.VariableValue("deathmatch") != 0) ! { if (SV_MAIN.maxclients.value <= 1) Cvar.FullSet("maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); else if (SV_MAIN.maxclients.value > MAX_CLIENTS) ! Cvar.FullSet("maxclients", "" + MAX_CLIENTS, CVAR_SERVERINFO | CVAR_LATCH); } ! else if (Cvar.VariableValue("coop") != 0) ! { if (SV_MAIN.maxclients.value <= 1 || SV_MAIN.maxclients.value > 4) Cvar.FullSet("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH); *************** *** 362,377 **** } ! svs.spawncount = rand(); //svs.clients = Z_Malloc(sizeof(client_t) * maxclients.value); ! svs.clients = new client_t[(int) SV_MAIN.maxclients.value]; ! for (int n=0; n < svs.clients.length; n++) svs.clients[n]= new client_t(); ! ! svs.num_client_entities = ((int) SV_MAIN.maxclients.value) * UPDATE_BACKUP * 64; //ok. ! //svs.client_entities = Z_Malloc(sizeof(entity_state_t) * svs.num_client_entities); ! svs.client_entities = new entity_state_t[svs.num_client_entities]; ! for (int n=0; n < svs.client_entities.length; n++) ! svs.client_entities[n] = new entity_state_t(null); // init network stuff --- 390,405 ---- } ! svs.spawncount= rand(); //svs.clients = Z_Malloc(sizeof(client_t) * maxclients.value); ! svs.clients= new client_t[(int) SV_MAIN.maxclients.value]; ! for (int n= 0; n < svs.clients.length; n++) svs.clients[n]= new client_t(); ! ! svs.num_client_entities= ((int) SV_MAIN.maxclients.value) * UPDATE_BACKUP * 64; //ok. ! //svs.client_entities = Z_Malloc(sizeof(entity_state_t) * svs.num_client_entities); ! svs.client_entities= new entity_state_t[svs.num_client_entities]; ! for (int n= 0; n < svs.client_entities.length; n++) ! svs.client_entities[n]= new entity_state_t(null); // init network stuff *************** *** 379,396 **** // heartbeats will always be sent to the id master ! svs.last_heartbeat = -99999; // send immediately ! idmaster = "192.246.40.37:" + PORT_MASTER; NET.StringToAdr(idmaster, SV_MAIN.master_adr[0]); // init game SV_GAME.SV_InitGameProgs(); // bis hier alles ok! ! ! for (i = 0; i < SV_MAIN.maxclients.value; i++) { ! ent = SV_GAME.ge.edicts[i + 1]; ! //ent.s.number = i + 1; //dont need this, ent.s.number already set. ! svs.clients[i].edict = ent; //memset(& svs.clients[i].lastcmd, 0, sizeof(svs.clients[i].lastcmd)); ! svs.clients[i].lastcmd = new usercmd_t(); } } --- 407,425 ---- // heartbeats will always be sent to the id master ! svs.last_heartbeat= -99999; // send immediately ! idmaster= "192.246.40.37:" + PORT_MASTER; NET.StringToAdr(idmaster, SV_MAIN.master_adr[0]); // init game SV_GAME.SV_InitGameProgs(); // bis hier alles ok! ! ! for (i= 0; i < SV_MAIN.maxclients.value; i++) ! { ! ent= SV_GAME.ge.edicts[i + 1]; ! //ent.s.number = i + 1; //dont need this, ent.s.number already set. ! svs.clients[i].edict= ent; //memset(& svs.clients[i].lastcmd, 0, sizeof(svs.clients[i].lastcmd)); ! svs.clients[i].lastcmd= new usercmd_t(); } } *************** *** 412,416 **** ====================== */ ! public static void SV_Map(boolean attractloop, String levelstring, boolean loadgame) { //char level[MAX_QPATH]; //char *ch; --- 441,446 ---- ====================== */ ! public static void SV_Map(boolean attractloop, String levelstring, boolean loadgame) ! { //char level[MAX_QPATH]; //char *ch; *************** *** 420,430 **** String level, ch, spawnpoint; ! sv.loadgame = loadgame; ! sv.attractloop = attractloop; if (sv.state == ss_dead && !sv.loadgame) SV_InitGame(); // the game is just starting ! level = levelstring; // bis hier her ok. // if there is a + in the map, set nextserver to the remainder --- 450,460 ---- String level, ch, spawnpoint; ! sv.loadgame= loadgame; ! sv.attractloop= attractloop; if (sv.state == ss_dead && !sv.loadgame) SV_InitGame(); // the game is just starting ! level= levelstring; // bis hier her ok. // if there is a + in the map, set nextserver to the remainder *************** *** 440,489 **** // Cvar_Set ("nextserver", ""); ! int c = level.indexOf('+'); ! if (c != -1) { ! Cvar.Set("nextserver","gamemap \"" + level.substring(c+1) + "\""); ! level = level.substring(0, c); } ! else { Cvar.Set("nextserver", ""); } //ZOID special hack for end game screen in coop mode ! if (Cvar.VariableValue("coop")!=0 && !level.equals( "victory.pcx")) Cvar.Set("nextserver", "gamemap \"*base1\""); // if there is a $, use the remainder as a spawnpoint ! int pos = level.indexOf('$'); ! if (pos!=-1) { //* ch = 0; ! spawnpoint = level.substring(pos + 1); ! level = level.substring(0,pos); ! } else //spawnpoint[0] = 0; ! spawnpoint = ""; // skip the end-of-unit flag if necessary if (level.charAt(0) == '*') ! level = level.substring(1); ! l = level.length(); ! if (l > 4 && level.endsWith(".cin")) { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_cinematic, attractloop, loadgame); } ! else if (l > 4 && level.endsWith(".dm2")) { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_demo, attractloop, loadgame); } ! else if (l > 4 && level.endsWith(".pcx")) { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_pic, attractloop, loadgame); } ! else { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); --- 470,526 ---- // Cvar_Set ("nextserver", ""); ! int c= level.indexOf('+'); ! if (c != -1) ! { ! Cvar.Set("nextserver", "gamemap \"" + level.substring(c + 1) + "\""); ! level= level.substring(0, c); } ! else ! { Cvar.Set("nextserver", ""); } //ZOID special hack for end game screen in coop mode ! if (Cvar.VariableValue("coop") != 0 && !level.equals("victory.pcx")) Cvar.Set("nextserver", "gamemap \"*base1\""); // if there is a $, use the remainder as a spawnpoint ! int pos= level.indexOf('$'); ! if (pos != -1) ! { //* ch = 0; ! spawnpoint= level.substring(pos + 1); ! level= level.substring(0, pos); ! } else //spawnpoint[0] = 0; ! spawnpoint= ""; // skip the end-of-unit flag if necessary if (level.charAt(0) == '*') ! level= level.substring(1); ! l= level.length(); ! if (l > 4 && level.endsWith(".cin")) ! { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_cinematic, attractloop, loadgame); } ! else if (l > 4 && level.endsWith(".dm2")) ! { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_demo, attractloop, loadgame); } ! else if (l > 4 && level.endsWith(".pcx")) ! { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); SV_SpawnServer(level, spawnpoint, ss_pic, attractloop, loadgame); } ! else ! { SCR.BeginLoadingPlaque(); // for local system SV_SEND.SV_BroadcastCommand("changing\n"); Index: SV_CCMDS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_CCMDS.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SV_CCMDS.java 23 Jul 2004 10:09:01 -0000 1.5 --- SV_CCMDS.java 20 Aug 2004 21:29:57 -0000 1.6 *************** *** 30,33 **** --- 30,34 ---- import jake2.sys.Sys; import jake2.util.Lib; + import jake2.util.QuakeFile; import jake2.util.Vargs; *************** *** 35,39 **** import java.util.Calendar; [...1909 lines suppressed...] ! public void execute() ! { SV_Loadgame_f(); } }); ! Cmd.AddCommand("killserver", new xcommand_t() ! { ! public void execute() ! { SV_KillServer_f(); } }); ! Cmd.AddCommand("sv", new xcommand_t() ! { ! public void execute() ! { SV_ServerCommand_f(); } |