diff options
author | Rene Stoeckel <[email protected]> | 2005-12-04 23:35:20 +0000 |
---|---|---|
committer | Rene Stoeckel <[email protected]> | 2005-12-04 23:35:20 +0000 |
commit | cb8a1184a7ca4c970a934965a9ebc26a0590eb7b (patch) | |
tree | 525f8a0d4568c400995fda5551adf9dd6c665116 /src/jake2 | |
parent | 1d21d403a36250cbe01e041ddc31063e8d9b5bb8 (diff) |
fixed bug with ending server in coop mode (always tried to load base1)
Diffstat (limited to 'src/jake2')
-rw-r--r-- | src/jake2/server/SV_INIT.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jake2/server/SV_INIT.java b/src/jake2/server/SV_INIT.java index e3d695c..63dbbd9 100644 --- a/src/jake2/server/SV_INIT.java +++ b/src/jake2/server/SV_INIT.java @@ -19,7 +19,7 @@ */ // Created on 14.01.2004 by RST. -// $Id: SV_INIT.java,v 1.14 2005-12-03 19:46:41 salomo Exp $ +// $Id: SV_INIT.java,v 1.15 2005-12-04 23:35:20 salomo Exp $ package jake2.server; import jake2.Defines; @@ -437,10 +437,20 @@ public class SV_INIT { } else { Cvar.Set("nextserver", ""); } + + // rst: base1 works for full, damo1 works for demo, so we need to check the + // dedicated_start variable + String nextlevel = "base1"; + String dedicated_start = Cvar.VariableString("dedicated_start"); + + String tmp[] = dedicated_start.split(" "); + + if (tmp.length == 2) + nextlevel = tmp[1]; //ZOID special hack for end game screen in coop mode if (Cvar.VariableValue("coop") != 0 && level.equals("victory.pcx")) - Cvar.Set("nextserver", "gamemap \"*base1\""); + Cvar.Set("nextserver", "gamemap \"*" + nextlevel + "\""); // if there is a $, use the remainder as a spawnpoint int pos = level.indexOf('$'); |