aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/server')
-rw-r--r--src/jake2/server/SV_GAME.java12
-rw-r--r--src/jake2/server/SV_INIT.java4
-rw-r--r--src/jake2/server/SV_SEND.java8
-rw-r--r--src/jake2/server/SV_USER.java13
-rw-r--r--src/jake2/server/SV_WORLD.java4
5 files changed, 16 insertions, 25 deletions
diff --git a/src/jake2/server/SV_GAME.java b/src/jake2/server/SV_GAME.java
index 8f6eec4..c6d433b 100644
--- a/src/jake2/server/SV_GAME.java
+++ b/src/jake2/server/SV_GAME.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 14.01.2004 by RST.
-// $Id: SV_GAME.java,v 1.4 2004-07-08 20:56:54 hzi Exp $
+// $Id: SV_GAME.java,v 1.2 2004-07-08 15:58:45 hzi Exp $
package jake2.server;
@@ -262,9 +262,6 @@ public class SV_GAME extends SV_INIT {
cluster = CM.CM_LeafCluster(leafnum);
area2 = CM.CM_LeafArea(leafnum);
- // quake2 bugfix
- if (cluster == -1)
- return false;
if (mask != null && (0 == (mask[cluster >>> 3] & (1 << (cluster & 7)))))
return false;
@@ -296,10 +293,7 @@ public class SV_GAME extends SV_INIT {
cluster = CM.CM_LeafCluster(leafnum);
area2 = CM.CM_LeafArea(leafnum);
- // quake2 bugfix
- if (cluster == -1)
- return false;
- if (mask != null && (0 == (mask[cluster >> 3] & (1 << (cluster & 7)))))
+ if (mask != null && (0 == (mask[cluster >>> 3] & (1 << (cluster & 7)))))
return false; // more than one bounce away
if (!CM.CM_AreasConnected(area1, area2))
return false; // a door blocks hearing
@@ -312,7 +306,7 @@ public class SV_GAME extends SV_INIT {
return;
//TODO: impl SV_StartSound
- SV_SEND.SV_StartSound (null, entity, channel, sound_num, volume, attenuation, timeofs);
+ //SV_SEND.SV_StartSound (null, entity, channel, sound_num, volume, attenuation, timeofs);
}
//==============================================
diff --git a/src/jake2/server/SV_INIT.java b/src/jake2/server/SV_INIT.java
index b4b4ee6..8fcfa37 100644
--- a/src/jake2/server/SV_INIT.java
+++ b/src/jake2/server/SV_INIT.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 14.01.2004 by RST.
-// $Id: SV_INIT.java,v 1.3 2004-07-08 20:24:30 hzi Exp $
+// $Id: SV_INIT.java,v 1.2 2004-07-08 15:58:45 hzi Exp $
package jake2.server;
@@ -115,7 +115,7 @@ public class SV_INIT extends Globals {
//
VectorCopy(svent.s.origin, svent.s.old_origin);
// rst: bugfix
- sv.baselines[entnum].set(svent.s);// = svent.s.getClone();
+ sv.baselines[entnum] = svent.s.getClone();
}
}
diff --git a/src/jake2/server/SV_SEND.java b/src/jake2/server/SV_SEND.java
index 0764ce6..ca6b07e 100644
--- a/src/jake2/server/SV_SEND.java
+++ b/src/jake2/server/SV_SEND.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 17.01.2004 by RST.
-// $Id: SV_SEND.java,v 1.3 2004-07-08 20:56:54 hzi Exp $
+// $Id: SV_SEND.java,v 1.1 2004-07-07 19:59:49 hzi Exp $
package jake2.server;
@@ -232,10 +232,6 @@ public class SV_SEND extends SV_MAIN {
area2 = CM.CM_LeafArea(leafnum);
if (!CM.CM_AreasConnected(area1, area2))
continue;
-
- // quake2 bugfix
- if (cluster == -1)
- continue;
if (mask != null && (0 == (mask[cluster >> 3] & (1 << (cluster & 7)))))
continue;
}
@@ -287,7 +283,7 @@ public class SV_SEND extends SV_MAIN {
int flags;
int i;
int ent;
- float[] origin_v = {0,0,0};
+ float[] origin_v = null;
boolean use_phs;
if (volume < 0 || volume > 1.0)
diff --git a/src/jake2/server/SV_USER.java b/src/jake2/server/SV_USER.java
index c6e355e..1136d20 100644
--- a/src/jake2/server/SV_USER.java
+++ b/src/jake2/server/SV_USER.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 17.01.2004 by RST.
-// $Id: SV_USER.java,v 1.3 2004-07-08 20:24:30 hzi Exp $
+// $Id: SV_USER.java,v 1.2 2004-07-08 15:58:45 hzi Exp $
package jake2.server;
@@ -308,10 +308,11 @@ public class SV_USER extends SV_SEND {
|| allow_download.value == 0 // leading dot is no good
|| name.charAt(0) == '.' // leading slash bad as well, must be in subdir
|| name.charAt(0) == '/' // next up, skin check
- || (name.startsWith("players/") && 0 == allow_download_players.value) // now models
- || (name.startsWith("models/") && 0 == allow_download_models.value) // now sounds
- || (name.startsWith("sound/") && 0 == allow_download_sounds.value) // now maps (note special case for maps, must not be in pak)
- || (name.startsWith("maps/") && 0 == allow_download_maps.value) // MUST be in a subdirectory
+ || (strncmp(name, "players/", 6) == 0 && 0 == allow_download_players.value) // now models
+ || (strncmp(name, "models/", 6) == 0 && 0 == allow_download_models.value) // now sounds
+ || (strncmp(name, "sound/", 6) == 0
+ && 0 == allow_download_sounds.value) // now maps (note special case for maps, must not be in pak)
+ || (strncmp(name, "maps/", 6) == 0 && 0 == allow_download_maps.value) // MUST be in a subdirectory
|| name.indexOf('/') == -1) { // don't allow anything with .. path
MSG.WriteByte(sv_client.netchan.message, svc_download);
MSG.WriteShort(sv_client.netchan.message, -1);
@@ -331,7 +332,7 @@ public class SV_USER extends SV_SEND {
if (sv_client.download == null // special check for maps, if it came from a pak file, don't allow
// download ZOID
- || (name.startsWith("maps/") && FS.file_from_pak != 0)) {
+ || (strncmp(name, "maps/", 5) == 0 && FS.file_from_pak != 0)) {
Com.DPrintf("Couldn't download " + name + " to " + sv_client.name + "\n");
if (sv_client.download != null) {
FS.FreeFile(sv_client.download);
diff --git a/src/jake2/server/SV_WORLD.java b/src/jake2/server/SV_WORLD.java
index 4e78084..a400959 100644
--- a/src/jake2/server/SV_WORLD.java
+++ b/src/jake2/server/SV_WORLD.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 07.01.2000 by RST.
-// $Id: SV_WORLD.java,v 1.3 2004-07-08 20:24:30 hzi Exp $
+// $Id: SV_WORLD.java,v 1.2 2004-07-08 15:58:45 hzi Exp $
package jake2.server;
@@ -607,7 +607,7 @@ public class SV_WORLD extends SV_CCMDS
clip.trace.startsolid = true;
}
else
- clip.trace.set(trace);
+ clip.trace = trace.getClone();
}
else if (trace.startsolid)
clip.trace.startsolid = true;