aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/game
diff options
context:
space:
mode:
authorRene Stoeckel <[email protected]>2005-02-19 21:17:44 +0000
committerRene Stoeckel <[email protected]>2005-02-19 21:17:44 +0000
commitd40335b85e9781944e2fc6a740acb3e6be940c89 (patch)
tree0c6b07863d7da0ba779d2472f1d994c778e2acf1 /src/jake2/game
parent4248a6386fd21c0016a2aa9f80e38af1508874c9 (diff)
fixed bug in ent.setFields() when spawning an edict_t
Diffstat (limited to 'src/jake2/game')
-rw-r--r--src/jake2/game/GameSpawn.java11
-rw-r--r--src/jake2/game/edict_t.java6
2 files changed, 12 insertions, 5 deletions
diff --git a/src/jake2/game/GameSpawn.java b/src/jake2/game/GameSpawn.java
index 8d65595..780747f 100644
--- a/src/jake2/game/GameSpawn.java
+++ b/src/jake2/game/GameSpawn.java
@@ -19,7 +19,7 @@
*/
// Created on 18.11.2003 by RST.
-// $Id: GameSpawn.java,v 1.11 2005-02-06 19:02:34 salomo Exp $
+// $Id: GameSpawn.java,v 1.12 2005-02-19 21:17:44 salomo Exp $
package jake2.game;
import jake2.Defines;
@@ -353,7 +353,7 @@ public class GameSpawn {
if (key.equals("nextmap"))
Com.Println("nextmap: " + value);
if (!GameBase.st.set(key, value))
- if (!ent.set(key, value))
+ if (!ent.setField(key, value))
GameBase.gi.dprintf("??? The key [" + key
+ "] is not a field\n");
@@ -401,7 +401,7 @@ public class GameSpawn {
if (keyname.charAt(0) == '_')
continue;
- ED_ParseField(keyname, com_token, ent);
+ ED_ParseField(keyname.toLowerCase(), com_token, ent);
}
@@ -471,6 +471,8 @@ public class GameSpawn {
public static void SpawnEntities(String mapname, String entities,
String spawnpoint) {
+
+ Com.dprintln("SpawnEntities(), mapname=" + mapname);
edict_t ent;
int inhibit;
String com_token;
@@ -552,8 +554,11 @@ public class GameSpawn {
((GameBase.skill.value == 0) && (ent.spawnflags & Defines.SPAWNFLAG_NOT_EASY) != 0)
|| ((GameBase.skill.value == 1) && (ent.spawnflags & Defines.SPAWNFLAG_NOT_MEDIUM) != 0)
|| (((GameBase.skill.value == 2) || (GameBase.skill.value == 3)) && (ent.spawnflags & Defines.SPAWNFLAG_NOT_HARD) != 0)) {
+
+ Com.DPrintf("->inhibited.\n");
GameUtil.G_FreeEdict(ent);
inhibit++;
+
continue;
}
}
diff --git a/src/jake2/game/edict_t.java b/src/jake2/game/edict_t.java
index 274db25..771e1dc 100644
--- a/src/jake2/game/edict_t.java
+++ b/src/jake2/game/edict_t.java
@@ -19,13 +19,14 @@
*/
// Created on 04.11.2003 by RST.
-// $Id: edict_t.java,v 1.6 2004-09-22 19:22:01 salomo Exp $
+// $Id: edict_t.java,v 1.7 2005-02-19 21:17:44 salomo Exp $
package jake2.game;
import java.io.IOException;
import java.io.RandomAccessFile;
import jake2.*;
+import jake2.qcommon.Com;
import jake2.util.*;
public class edict_t {
@@ -280,7 +281,7 @@ public class edict_t {
/////////////////////////////////////////////////
- public boolean set(String key, String value) {
+ public boolean setField(String key, String value) {
if (key.equals("classname")) {
classname = GameSpawn.ED_NewString(value);
@@ -348,6 +349,7 @@ public class edict_t {
if (key.equals("team")) {
team = GameSpawn.ED_NewString(value);
+ Com.dprintln("Monster Team:" + team);
return true;
} // F_LSTRING),