summaryrefslogtreecommitdiffstats
path: root/src/jake2/game/GameTarget.java
diff options
context:
space:
mode:
authorRene Stoeckel <[email protected]>2005-11-20 22:18:34 +0000
committerRene Stoeckel <[email protected]>2005-11-20 22:18:34 +0000
commit57f4ee905c2805bdb07076c04a41ab54111e8a71 (patch)
tree1e745d77d6f0b7b4e86c1978917525c43961b3ac /src/jake2/game/GameTarget.java
parent07964a7dee884f99eb25e069406ef349c6af43ac (diff)
savegames are now independend from different jake2 builds and releases
Diffstat (limited to 'src/jake2/game/GameTarget.java')
-rw-r--r--src/jake2/game/GameTarget.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/jake2/game/GameTarget.java b/src/jake2/game/GameTarget.java
index 39d51cc..b25b72f 100644
--- a/src/jake2/game/GameTarget.java
+++ b/src/jake2/game/GameTarget.java
@@ -19,7 +19,7 @@
*/
// Created on 28.12.2003 by RST.
-// $Id: GameTarget.java,v 1.6 2005-11-16 22:24:52 salomo Exp $
+// $Id: GameTarget.java,v 1.7 2005-11-20 22:18:33 salomo Exp $
package jake2.game;
import jake2.Defines;
@@ -267,6 +267,7 @@ public class GameTarget {
* temp entity event to the clients. "style" type byte
*/
public static EntUseAdapter Use_Target_Tent = new EntUseAdapter() {
+ public String getID() { return "Use_Target_Tent"; }
public void use(edict_t ent, edict_t other, edict_t activator) {
GameBase.gi.WriteByte(Defines.svc_temp_entity);
GameBase.gi.WriteByte(ent.style);
@@ -291,6 +292,7 @@ public class GameTarget {
* without any speed cost.
*/
public static EntUseAdapter Use_Target_Speaker = new EntUseAdapter() {
+ public String getID() { return "Use_Target_Speaker"; }
public void use(edict_t ent, edict_t other, edict_t activator) {
int chan;
@@ -315,6 +317,7 @@ public class GameTarget {
//==========================================================
public static EntUseAdapter Use_Target_Help = new EntUseAdapter() {
+ public String getID() { return "Use_Target_Help"; }
public void use(edict_t ent, edict_t other, edict_t activator) {
if ((ent.spawnflags & 1) != 0)
@@ -333,6 +336,7 @@ public class GameTarget {
* These are single use targets.
*/
static EntUseAdapter use_target_secret = new EntUseAdapter() {
+ public String getID() { return "use_target_secret"; }
public void use(edict_t ent, edict_t other, edict_t activator) {
GameBase.gi.sound(ent, Defines.CHAN_VOICE, ent.noise_index, 1,
Defines.ATTN_NORM, 0);
@@ -351,6 +355,7 @@ public class GameTarget {
* These are single use targets.
*/
static EntUseAdapter use_target_goal = new EntUseAdapter() {
+ public String getID() { return "use_target_goal"; }
public void use(edict_t ent, edict_t other, edict_t activator) {
GameBase.gi.sound(ent, Defines.CHAN_VOICE, ent.noise_index, 1,
Defines.ATTN_NORM, 0);
@@ -375,6 +380,7 @@ public class GameTarget {
* should be done, defaults to 0
*/
static EntThinkAdapter target_explosion_explode = new EntThinkAdapter() {
+ public String getID() { return "target_explosion_explode"; }
public boolean think(edict_t self) {
float save;
@@ -396,6 +402,7 @@ public class GameTarget {
};
static EntUseAdapter use_target_explosion = new EntUseAdapter() {
+ public String getID() { return "use_target_explosion"; }
public void use(edict_t self, edict_t other, edict_t activator) {
self.activator = activator;
@@ -416,6 +423,7 @@ public class GameTarget {
* "map" when fired
*/
static EntUseAdapter use_target_changelevel = new EntUseAdapter() {
+ public String getID() { return "use_target_changelevel"; }
public void use(edict_t self, edict_t other, edict_t activator) {
if (GameBase.level.intermissiontime != 0)
return; // already activated
@@ -465,6 +473,7 @@ public class GameTarget {
* at this location when it splashes useful for lava/sparks
*/
static EntUseAdapter use_target_splash = new EntUseAdapter() {
+ public String getID() { return "use_target_splash"; }
public void use(edict_t self, edict_t other, edict_t activator) {
GameBase.gi.WriteByte(Defines.svc_temp_entity);
GameBase.gi.WriteByte(Defines.TE_SPLASH);
@@ -494,6 +503,7 @@ public class GameTarget {
*/
static EntUseAdapter use_target_spawner = new EntUseAdapter() {
+ public String getID() { return "use_target_spawner"; }
public void use(edict_t self, edict_t other, edict_t activator) {
edict_t ent;
@@ -519,6 +529,7 @@ public class GameTarget {
* dmg default is 15 speed default is 1000
*/
public static EntUseAdapter use_target_blaster = new EntUseAdapter() {
+ public String getID() { return "use_target_blaster"; }
public void use(edict_t self, edict_t other, edict_t activator) {
int effect;
@@ -550,6 +561,7 @@ public class GameTarget {
* and killtarget also work.
*/
public static EntUseAdapter trigger_crosslevel_trigger_use = new EntUseAdapter() {
+ public String getID() { return "trigger_crosslevel_trigger_use"; }
public void use(edict_t self, edict_t other, edict_t activator) {
GameBase.game.serverflags |= self.spawnflags;
GameUtil.G_FreeEdict(self);
@@ -566,6 +578,7 @@ public class GameTarget {
* (default 1)
*/
static EntThinkAdapter target_crosslevel_target_think = new EntThinkAdapter() {
+ public String getID() { return "target_crosslevel_target_think"; }
public boolean think(edict_t self) {
if (self.spawnflags == (GameBase.game.serverflags
& Defines.SFL_CROSS_TRIGGER_MASK & self.spawnflags)) {
@@ -584,6 +597,7 @@ public class GameTarget {
* target or a direction.
*/
public static EntThinkAdapter target_laser_think = new EntThinkAdapter() {
+ public String getID() { return "target_laser_think"; }
public boolean think(edict_t self) {
edict_t ignore;
@@ -658,6 +672,7 @@ public class GameTarget {
};
public static EntUseAdapter target_laser_use = new EntUseAdapter() {
+ public String getID() { return "target_laser_use"; }
public void use(edict_t self, edict_t other, edict_t activator) {
self.activator = activator;
@@ -669,6 +684,7 @@ public class GameTarget {
};
static EntThinkAdapter target_laser_start = new EntThinkAdapter() {
+ public String getID() { return "target_laser_start"; }
public boolean think(edict_t self) {
edict_t ent;
@@ -736,6 +752,7 @@ public class GameTarget {
*/
static EntThinkAdapter target_lightramp_think = new EntThinkAdapter() {
+ public String getID() { return "target_lightramp_think"; }
public boolean think(edict_t self) {
char tmp[] = {(char) ('a' + (int) (self.movedir[0] + (GameBase.level.time - self.timestamp)
@@ -760,6 +777,7 @@ public class GameTarget {
};
static EntUseAdapter target_lightramp_use = new EntUseAdapter() {
+ public String getID() { return "target_lightramp_use"; }
public void use(edict_t self, edict_t other, edict_t activator) {
if (self.enemy == null) {
edict_t e;
@@ -812,6 +830,7 @@ public class GameTarget {
*/
static EntThinkAdapter target_earthquake_think = new EntThinkAdapter() {
+ public String getID() { return "target_earthquake_think"; }
public boolean think(edict_t self) {
int i;
@@ -848,6 +867,7 @@ public class GameTarget {
};
static EntUseAdapter target_earthquake_use = new EntUseAdapter() {
+ public String getID() { return "target_earthquake_use"; }
public void use(edict_t self, edict_t other, edict_t activator) {
self.timestamp = GameBase.level.time + self.count;
self.nextthink = GameBase.level.time + Defines.FRAMETIME;