diff options
author | Rene Stoeckel <[email protected]> | 2005-11-20 22:18:34 +0000 |
---|---|---|
committer | Rene Stoeckel <[email protected]> | 2005-11-20 22:18:34 +0000 |
commit | 57f4ee905c2805bdb07076c04a41ab54111e8a71 (patch) | |
tree | 1e745d77d6f0b7b4e86c1978917525c43961b3ac | |
parent | 07964a7dee884f99eb25e069406ef349c6af43ac (diff) |
savegames are now independend from different jake2 builds and releases
44 files changed, 1643 insertions, 851 deletions
diff --git a/src/jake2/client/M.java b/src/jake2/client/M.java index 27ccf27..ef33bff 100644 --- a/src/jake2/client/M.java +++ b/src/jake2/client/M.java @@ -2,7 +2,7 @@ * M.java * Copyright (C) 2003 * - * $Id: M.java,v 1.7 2005-11-16 22:24:53 salomo Exp $ + * $Id: M.java,v 1.8 2005-11-20 22:18:34 salomo Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -356,6 +356,7 @@ public final class M { } public static EntThinkAdapter M_droptofloor = new EntThinkAdapter() { + public String getID() { return "m_drop_to_floor";} public boolean think(edict_t ent) { float[] end = { 0, 0, 0 }; trace_t trace; @@ -454,6 +455,7 @@ public final class M { /** Stops the Flies. */ public static EntThinkAdapter M_FliesOff = new EntThinkAdapter() { + public String getID() { return "m_fliesoff";} public boolean think(edict_t self) { self.s.effects &= ~Defines.EF_FLIES; self.s.sound = 0; @@ -463,6 +465,7 @@ public final class M { /** Starts the Flies as setting the animation flag in the entity. */ public static EntThinkAdapter M_FliesOn = new EntThinkAdapter() { + public String getID() { return "m_flies_on";} public boolean think(edict_t self) { if (self.waterlevel != 0) return true; @@ -477,6 +480,7 @@ public final class M { /** Adds some flies after a random time */ public static EntThinkAdapter M_FlyCheck = new EntThinkAdapter() { + public String getID() { return "m_fly_check";} public boolean think(edict_t self) { if (self.waterlevel != 0) diff --git a/src/jake2/game/Cmd.java b/src/jake2/game/Cmd.java index d080958..7df0a96 100644 --- a/src/jake2/game/Cmd.java +++ b/src/jake2/game/Cmd.java @@ -2,7 +2,7 @@ * Cmd.java * Copyright (C) 2003 * - * $Id: Cmd.java,v 1.15 2005-11-16 22:24:52 salomo Exp $ + * $Id: Cmd.java,v 1.16 2005-11-20 22:18:33 salomo Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -503,7 +503,7 @@ public final class Cmd { if (give_all || 0 == Lib.Q_stricmp(name, "weapons")) { for (i = 1; i < GameBase.game.num_items; i++) { - it = GameItems.itemlist[i]; + it = GameItemList.itemlist[i]; if (null == it.pickup) continue; if (0 == (it.flags & Defines.IT_WEAPON)) @@ -516,7 +516,7 @@ public final class Cmd { if (give_all || 0 == Lib.Q_stricmp(name, "ammo")) { for (i = 1; i < GameBase.game.num_items; i++) { - it = GameItems.itemlist[i]; + it = GameItemList.itemlist[i]; if (null == it.pickup) continue; if (0 == (it.flags & Defines.IT_AMMO)) @@ -559,7 +559,7 @@ public final class Cmd { if (give_all) { for (i = 1; i < GameBase.game.num_items; i++) { - it = GameItems.itemlist[i]; + it = GameItemList.itemlist[i]; if (it.pickup != null) continue; if ((it.flags & (Defines.IT_ARMOR | Defines.IT_WEAPON | Defines.IT_AMMO)) != 0) @@ -798,7 +798,7 @@ public final class Cmd { return; } - it = GameItems.itemlist[ent.client.pers.selected_item]; + it = GameItemList.itemlist[ent.client.pers.selected_item]; if (it.use == null) { SV_GAME .PF_cprintf(ent, Defines.PRINT_HIGH, @@ -834,7 +834,7 @@ public final class Cmd { if (0 == cl.pers.inventory[index]) continue; - it = GameItems.itemlist[index]; + it = GameItemList.itemlist[index]; if (it.use == null) continue; @@ -875,7 +875,7 @@ public final class Cmd { index++; if (0 == cl.pers.inventory[index]) continue; - it = GameItems.itemlist[index]; + it = GameItemList.itemlist[index]; if (null == it.use) continue; if (0 == (it.flags & Defines.IT_WEAPON)) @@ -906,7 +906,7 @@ public final class Cmd { index = GameItems.ITEM_INDEX(cl.pers.lastweapon); if (0 == cl.pers.inventory[index]) return; - it = GameItems.itemlist[index]; + it = GameItemList.itemlist[index]; if (null == it.use) return; if (0 == (it.flags & Defines.IT_WEAPON)) @@ -931,7 +931,7 @@ public final class Cmd { return; } - it = GameItems.itemlist[ent.client.pers.selected_item]; + it = GameItemList.itemlist[ent.client.pers.selected_item]; if (it.drop == null) { SV_GAME.PF_cprintf(ent, Defines.PRINT_HIGH, "Item is not dropable.\n"); diff --git a/src/jake2/game/GameAI.java b/src/jake2/game/GameAI.java index 88577b2..97e9868 100644 --- a/src/jake2/game/GameAI.java +++ b/src/jake2/game/GameAI.java @@ -20,7 +20,7 @@ // Created on 02.11.2003 by RST. -// $Id: GameAI.java,v 1.8 2005-11-16 22:24:53 salomo Exp $ +// $Id: GameAI.java,v 1.9 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -357,6 +357,7 @@ public class GameAI { } public static EntThinkAdapter walkmonster_start_go = new EntThinkAdapter() { + public String getID() { return "walkmonster_start_go"; } public boolean think(edict_t self) { if (0 == (self.spawnflags & 2) && GameBase.level.time < 1) { @@ -381,6 +382,8 @@ public class GameAI { }; public static EntThinkAdapter walkmonster_start = new EntThinkAdapter() { + public String getID() { return "walkmonster_start";} + public boolean think(edict_t self) { self.think = walkmonster_start_go; @@ -390,6 +393,7 @@ public class GameAI { }; public static EntThinkAdapter flymonster_start_go = new EntThinkAdapter() { + public String getID() { return "flymonster_start_go";} public boolean think(edict_t self) { if (!M.M_walkmove(self, 0, 0)) GameBase.gi.dprintf(self.classname + " in solid at " @@ -408,6 +412,7 @@ public class GameAI { }; public static EntThinkAdapter flymonster_start = new EntThinkAdapter() { + public String getID() { return "flymonster_start";} public boolean think(edict_t self) { self.flags |= Defines.FL_FLY; self.think = flymonster_start_go; @@ -417,6 +422,7 @@ public class GameAI { }; public static EntThinkAdapter swimmonster_start_go = new EntThinkAdapter() { + public String getID() { return "swimmonster_start_go";} public boolean think(edict_t self) { if (0 == self.yaw_speed) self.yaw_speed = 20; @@ -431,6 +437,7 @@ public class GameAI { }; public static EntThinkAdapter swimmonster_start = new EntThinkAdapter() { + public String getID() { return "swimmonster_start";} public boolean think(edict_t self) { self.flags |= Defines.FL_SWIM; self.think = swimmonster_start_go; @@ -443,9 +450,11 @@ public class GameAI { * ============= ai_turn * * don't move, but turn towards ideal_yaw Distance is for slight position - * adjustments needed by the animations ============= + * adjustments needed by the animations + * ============= */ public static AIAdapter ai_turn = new AIAdapter() { + public String getID() { return "ai_turn";} public void ai(edict_t self, float dist) { if (dist != 0) @@ -467,6 +476,7 @@ public class GameAI { * ============== */ public static AIAdapter ai_move = new AIAdapter() { + public String getID() { return "ai_move";} public void ai(edict_t self, float dist) { M.M_walkmove(self, self.s.angles[Defines.YAW], dist); } @@ -480,6 +490,7 @@ public class GameAI { * ============= */ public static AIAdapter ai_walk = new AIAdapter() { + public String getID() { return "ai_walk";} public void ai(edict_t self, float dist) { if (self.index == 312) self.index = 312; @@ -514,6 +525,7 @@ public class GameAI { */ public static AIAdapter ai_stand = new AIAdapter() { + public String getID() { return "ai_stand";} public void ai(edict_t self, float dist) { float[] v = { 0, 0, 0 }; @@ -569,7 +581,7 @@ public class GameAI { * ============== */ public static AIAdapter ai_charge = new AIAdapter() { - + public String getID() { return "ai_charge";} public void ai(edict_t self, float dist) { float[] v = { 0, 0, 0 }; @@ -590,6 +602,7 @@ public class GameAI { * ============= */ public static AIAdapter ai_run = new AIAdapter() { + public String getID() { return "ai_run";} public void ai(edict_t self, float dist) { float[] v = { 0, 0, 0 }; diff --git a/src/jake2/game/GameFunc.java b/src/jake2/game/GameFunc.java index 0c0199a..7abf9b3 100644 --- a/src/jake2/game/GameFunc.java +++ b/src/jake2/game/GameFunc.java @@ -19,7 +19,7 @@ */ // Created on 18.11.2003 by RST. -// $Id: GameFunc.java,v 1.7 2005-11-16 22:24:52 salomo Exp $ +// $Id: GameFunc.java,v 1.8 2005-11-20 22:18:33 salomo Exp $ package jake2.game; import jake2.Defines; @@ -598,6 +598,7 @@ public class GameFunc { // static EntThinkAdapter Move_Done = new EntThinkAdapter() { + public String getID() { return "move_done";} public boolean think(edict_t ent) { Math3D.VectorClear(ent.velocity); ent.moveinfo.endfunc.think(ent); @@ -606,6 +607,7 @@ public class GameFunc { }; static EntThinkAdapter Move_Final = new EntThinkAdapter() { + public String getID() { return "move_final";} public boolean think(edict_t ent) { if (ent.moveinfo.remaining_distance == 0) { @@ -624,6 +626,7 @@ public class GameFunc { }; static EntThinkAdapter Move_Begin = new EntThinkAdapter() { + public String getID() { return "move_begin";} public boolean think(edict_t ent) { float frames; @@ -650,6 +653,7 @@ public class GameFunc { // static EntThinkAdapter AngleMove_Done = new EntThinkAdapter() { + public String getID() { return "agnle_move_done";} public boolean think(edict_t ent) { Math3D.VectorClear(ent.avelocity); ent.moveinfo.endfunc.think(ent); @@ -658,6 +662,7 @@ public class GameFunc { }; static EntThinkAdapter AngleMove_Final = new EntThinkAdapter() { + public String getID() { return "angle_move_final";} public boolean think(edict_t ent) { float[] move = { 0, 0, 0 }; @@ -682,6 +687,7 @@ public class GameFunc { }; static EntThinkAdapter AngleMove_Begin = new EntThinkAdapter() { + public String getID() { return "angle_move_begin";} public boolean think(edict_t ent) { float[] destdelta = { 0, 0, 0 }; float len; @@ -721,6 +727,7 @@ public class GameFunc { }; static EntThinkAdapter Think_AccelMove = new EntThinkAdapter() { + public String getID() { return "thinc_accelmove";} public boolean think(edict_t ent) { ent.moveinfo.remaining_distance -= ent.moveinfo.current_speed; @@ -744,6 +751,7 @@ public class GameFunc { }; static EntThinkAdapter plat_hit_top = new EntThinkAdapter() { + public String getID() { return "plat_hit_top";} public boolean think(edict_t ent) { if (0 == (ent.flags & Defines.FL_TEAMSLAVE)) { if (ent.moveinfo.sound_end != 0) @@ -761,6 +769,7 @@ public class GameFunc { }; static EntThinkAdapter plat_hit_bottom = new EntThinkAdapter() { + public String getID() { return "plat_hit_bottom";} public boolean think(edict_t ent) { if (0 == (ent.flags & Defines.FL_TEAMSLAVE)) { @@ -776,6 +785,7 @@ public class GameFunc { }; static EntThinkAdapter plat_go_down = new EntThinkAdapter() { + public String getID() { return "plat_go_down";} public boolean think(edict_t ent) { if (0 == (ent.flags & Defines.FL_TEAMSLAVE)) { if (ent.moveinfo.sound_start != 0) @@ -791,6 +801,7 @@ public class GameFunc { }; static EntBlockedAdapter plat_blocked = new EntBlockedAdapter() { + public String getID() { return "plat_blocked";} public void blocked(edict_t self, edict_t other) { if (0 == (other.svflags & Defines.SVF_MONSTER) && (null == other.client)) { @@ -817,6 +828,7 @@ public class GameFunc { }; static EntUseAdapter Use_Plat = new EntUseAdapter() { + public String getID() { return "use_plat";} public void use(edict_t ent, edict_t other, edict_t activator) { if (ent.think != null) return; // already down @@ -825,6 +837,7 @@ public class GameFunc { }; static EntTouchAdapter Touch_Plat_Center = new EntTouchAdapter() { + public String getID() { return "touch_plat_center";} public void touch(edict_t ent, edict_t other, cplane_t plane, csurface_t surf) { if (other.client == null) @@ -861,6 +874,7 @@ public class GameFunc { */ static EntBlockedAdapter rotating_blocked = new EntBlockedAdapter() { + public String getID() { return "rotating_blocked";} public void blocked(edict_t self, edict_t other) { GameCombat.T_Damage(other, self, self, Globals.vec3_origin, other.s.origin, Globals.vec3_origin, self.dmg, 1, 0, @@ -869,6 +883,7 @@ public class GameFunc { }; static EntTouchAdapter rotating_touch = new EntTouchAdapter() { + public String getID() { return "rotating_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (self.avelocity[0] != 0 || self.avelocity[1] != 0 @@ -880,6 +895,7 @@ public class GameFunc { }; static EntUseAdapter rotating_use = new EntUseAdapter() { + public String getID() { return "rotating_use";} public void use(edict_t self, edict_t other, edict_t activator) { if (!Math3D.VectorEquals(self.avelocity, Globals.vec3_origin)) { self.s.sound = 0; @@ -895,6 +911,7 @@ public class GameFunc { }; static EntThinkAdapter SP_func_rotating = new EntThinkAdapter() { + public String getID() { return "sp_func_rotating";} public boolean think(edict_t ent) { ent.solid = Defines.SOLID_BSP; if ((ent.spawnflags & 32) != 0) @@ -964,6 +981,7 @@ public class GameFunc { */ static EntThinkAdapter button_done = new EntThinkAdapter() { + public String getID() { return "button_done";} public boolean think(edict_t self) { self.moveinfo.state = STATE_BOTTOM; @@ -974,6 +992,7 @@ public class GameFunc { }; static EntThinkAdapter button_return = new EntThinkAdapter() { + public String getID() { return "button_return";} public boolean think(edict_t self) { self.moveinfo.state = STATE_DOWN; @@ -988,6 +1007,7 @@ public class GameFunc { }; static EntThinkAdapter button_wait = new EntThinkAdapter() { + public String getID() { return "button_wait";} public boolean think(edict_t self) { self.moveinfo.state = STATE_TOP; self.s.effects &= ~Defines.EF_ANIM01; @@ -1004,6 +1024,7 @@ public class GameFunc { }; static EntThinkAdapter button_fire = new EntThinkAdapter() { + public String getID() { return "button_fire";} public boolean think(edict_t self) { if (self.moveinfo.state == STATE_UP || self.moveinfo.state == STATE_TOP) @@ -1021,6 +1042,7 @@ public class GameFunc { }; static EntUseAdapter button_use = new EntUseAdapter() { + public String getID() { return "button_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.activator = activator; button_fire.think(self); @@ -1029,6 +1051,7 @@ public class GameFunc { }; static EntTouchAdapter button_touch = new EntTouchAdapter() { + public String getID() { return "button_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (null == other.client) @@ -1044,6 +1067,7 @@ public class GameFunc { }; static EntDieAdapter button_killed = new EntDieAdapter() { + public String getID() { return "button_killed";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { self.activator = attacker; @@ -1055,6 +1079,7 @@ public class GameFunc { }; static EntThinkAdapter SP_func_button = new EntThinkAdapter() { + public String getID() { return "sp_func_button";} public boolean think(edict_t ent) { float[] abs_movedir = { 0, 0, 0 }; float dist; @@ -1115,6 +1140,7 @@ public class GameFunc { }; static EntThinkAdapter door_hit_top = new EntThinkAdapter() { + public String getID() { return "door_hit_top";} public boolean think(edict_t self) { if (0 == (self.flags & Defines.FL_TEAMSLAVE)) { if (self.moveinfo.sound_end != 0) @@ -1135,6 +1161,7 @@ public class GameFunc { }; static EntThinkAdapter door_hit_bottom = new EntThinkAdapter() { + public String getID() { return "door_hit_bottom";} public boolean think(edict_t self) { if (0 == (self.flags & Defines.FL_TEAMSLAVE)) { if (self.moveinfo.sound_end != 0) @@ -1150,6 +1177,7 @@ public class GameFunc { }; static EntThinkAdapter door_go_down = new EntThinkAdapter() { + public String getID() { return "door_go_down";} public boolean think(edict_t self) { if (0 == (self.flags & Defines.FL_TEAMSLAVE)) { if (self.moveinfo.sound_start != 0) @@ -1174,6 +1202,7 @@ public class GameFunc { }; static EntUseAdapter door_use = new EntUseAdapter() { + public String getID() { return "door_use";} public void use(edict_t self, edict_t other, edict_t activator) { edict_t ent; @@ -1203,6 +1232,7 @@ public class GameFunc { }; static EntTouchAdapter Touch_DoorTrigger = new EntTouchAdapter() { + public String getID() { return "touch_door_trigger";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (other.health <= 0) @@ -1225,6 +1255,7 @@ public class GameFunc { }; static EntThinkAdapter Think_CalcMoveSpeed = new EntThinkAdapter() { + public String getID() { return "think_calc_movespeed";} public boolean think(edict_t self) { edict_t ent; float min; @@ -1265,6 +1296,7 @@ public class GameFunc { }; static EntThinkAdapter Think_SpawnDoorTrigger = new EntThinkAdapter() { + public String getID() { return "think_spawn_door_trigger";} public boolean think(edict_t ent) { edict_t other; float[] mins = { 0, 0, 0 }, maxs = { 0, 0, 0 }; @@ -1304,6 +1336,7 @@ public class GameFunc { }; static EntBlockedAdapter door_blocked = new EntBlockedAdapter() { + public String getID() { return "door_blocked";} public void blocked(edict_t self, edict_t other) { edict_t ent; @@ -1342,6 +1375,7 @@ public class GameFunc { }; static EntDieAdapter door_killed = new EntDieAdapter() { + public String getID() { return "door_killed";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { edict_t ent; @@ -1355,6 +1389,7 @@ public class GameFunc { }; static EntTouchAdapter door_touch = new EntTouchAdapter() { + public String getID() { return "door_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (null == other.client) @@ -1371,6 +1406,7 @@ public class GameFunc { }; static EntThinkAdapter SP_func_door = new EntThinkAdapter() { + public String getID() { return "sp_func_door";} public boolean think(edict_t ent) { float[] abs_movedir = { 0, 0, 0 }; @@ -1498,6 +1534,7 @@ public class GameFunc { */ static EntThinkAdapter SP_func_door_rotating = new EntThinkAdapter() { + public String getID() { return "sp_func_door_rotating";} public boolean think(edict_t ent) { Math3D.VectorClear(ent.s.angles); @@ -1619,7 +1656,7 @@ public class GameFunc { */ static EntBlockedAdapter train_blocked = new EntBlockedAdapter() { - + public String getID() { return "train_blocked";} public void blocked(edict_t self, edict_t other) { if (0 == (other.svflags & Defines.SVF_MONSTER) && (null == other.client)) { @@ -1646,6 +1683,7 @@ public class GameFunc { }; static EntThinkAdapter train_wait = new EntThinkAdapter() { + public String getID() { return "train_wait";} public boolean think(edict_t self) { if (self.target_ent.pathtarget != null) { String savetarget; @@ -1689,6 +1727,7 @@ public class GameFunc { }; static EntThinkAdapter train_next = new EntThinkAdapter() { + public String getID() { return "train_next";} public boolean think(edict_t self) { edict_t ent = null; float[] dest = { 0, 0, 0 }; @@ -1753,6 +1792,7 @@ public class GameFunc { }; public static EntThinkAdapter func_train_find = new EntThinkAdapter() { + public String getID() { return "func_train_find";} public boolean think(edict_t self) { edict_t ent; @@ -1785,6 +1825,7 @@ public class GameFunc { }; public static EntUseAdapter train_use = new EntUseAdapter() { + public String getID() { return "train_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.activator = activator; @@ -1807,6 +1848,7 @@ public class GameFunc { * QUAKED trigger_elevator (0.3 0.1 0.6) (-8 -8 -8) (8 8 8) */ static EntUseAdapter trigger_elevator_use = new EntUseAdapter() { + public String getID() { return "trigger_elevator_use";} public void use(edict_t self, edict_t other, edict_t activator) { edict_t target; @@ -1834,6 +1876,7 @@ public class GameFunc { }; static EntThinkAdapter trigger_elevator_init = new EntThinkAdapter() { + public String getID() { return "trigger_elevator_init";} public boolean think(edict_t self) { if (null == self.target) { GameBase.gi.dprintf("trigger_elevator has no target\n"); @@ -1858,6 +1901,7 @@ public class GameFunc { }; static EntThinkAdapter SP_trigger_elevator = new EntThinkAdapter() { + public String getID() { return "sp_trigger_elevator";} public boolean think(edict_t self) { self.think = trigger_elevator_init; self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1882,6 +1926,7 @@ public class GameFunc { */ static EntThinkAdapter func_timer_think = new EntThinkAdapter() { + public String getID() { return "func_timer_think";} public boolean think(edict_t self) { GameUtil.G_UseTargets(self, self.activator); self.nextthink = GameBase.level.time + self.wait + Lib.crandom() @@ -1891,6 +1936,7 @@ public class GameFunc { }; static EntUseAdapter func_timer_use = new EntUseAdapter() { + public String getID() { return "func_timer_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.activator = activator; @@ -1915,6 +1961,7 @@ public class GameFunc { */ static EntUseAdapter func_conveyor_use = new EntUseAdapter() { + public String getID() { return "func_conveyor_use";} public void use(edict_t self, edict_t other, edict_t activator) { if ((self.spawnflags & 1) != 0) { self.speed = 0; @@ -1930,6 +1977,7 @@ public class GameFunc { }; static EntThinkAdapter SP_func_conveyor = new EntThinkAdapter() { + public String getID() { return "sp_func_conveyor";} public boolean think(edict_t self) { if (0 == self.speed) @@ -1969,7 +2017,7 @@ public class GameFunc { public final static int SECRET_1ST_DOWN = 4; static EntUseAdapter door_secret_use = new EntUseAdapter() { - + public String getID() { return "door_secret_use";} public void use(edict_t self, edict_t other, edict_t activator) { // make sure we're not already moving if (!Math3D.VectorEquals(self.s.origin, Globals.vec3_origin)) @@ -1981,6 +2029,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move1 = new EntThinkAdapter() { + public String getID() { return "door_secret_move1";} public boolean think(edict_t self) { self.nextthink = GameBase.level.time + 1.0f; self.think = door_secret_move2; @@ -1989,6 +2038,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move2 = new EntThinkAdapter() { + public String getID() { return "door_secret_move2";} public boolean think(edict_t self) { Move_Calc(self, self.pos2, door_secret_move3); return true; @@ -1996,6 +2046,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move3 = new EntThinkAdapter() { + public String getID() { return "door_secret_move3";} public boolean think(edict_t self) { if (self.wait == -1) return true; @@ -2006,6 +2057,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move4 = new EntThinkAdapter() { + public String getID() { return "door_secret_move4";} public boolean think(edict_t self) { Move_Calc(self, self.pos1, door_secret_move5); return true; @@ -2013,6 +2065,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move5 = new EntThinkAdapter() { + public String getID() { return "door_secret_move5";} public boolean think(edict_t self) { self.nextthink = GameBase.level.time + 1.0f; self.think = door_secret_move6; @@ -2021,6 +2074,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_move6 = new EntThinkAdapter() { + public String getID() { return "door_secret_move6";} public boolean think(edict_t self) { Move_Calc(self, Globals.vec3_origin, door_secret_done); @@ -2029,6 +2083,7 @@ public class GameFunc { }; static EntThinkAdapter door_secret_done = new EntThinkAdapter() { + public String getID() { return "door_secret_move7";} public boolean think(edict_t self) { if (null == (self.targetname) || 0 != (self.spawnflags & SECRET_ALWAYS_SHOOT)) { @@ -2041,7 +2096,7 @@ public class GameFunc { }; static EntBlockedAdapter door_secret_blocked = new EntBlockedAdapter() { - + public String getID() { return "door_secret_blocked";} public void blocked(edict_t self, edict_t other) { if (0 == (other.svflags & Defines.SVF_MONSTER) && (null == other.client)) { @@ -2066,6 +2121,7 @@ public class GameFunc { }; static EntDieAdapter door_secret_die = new EntDieAdapter() { + public String getID() { return "door_secret_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { self.takedamage = Defines.DAMAGE_NO; @@ -2074,6 +2130,7 @@ public class GameFunc { }; static EntThinkAdapter SP_func_door_secret = new EntThinkAdapter() { + public String getID() { return "sp_func_door_secret";} public boolean think(edict_t ent) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }, up = { 0, 0, 0 }; float side; @@ -2145,12 +2202,14 @@ public class GameFunc { * irrespective of protection. */ static EntUseAdapter use_killbox = new EntUseAdapter() { + public String getID() { return "use_killbox";} public void use(edict_t self, edict_t other, edict_t activator) { GameUtil.KillBox(self); } }; static EntThinkAdapter SP_func_killbox = new EntThinkAdapter() { + public String getID() { return "sp_func_killbox";} public boolean think(edict_t ent) { GameBase.gi.setmodel(ent, ent.model); ent.use = use_killbox; diff --git a/src/jake2/game/GameItemList.java b/src/jake2/game/GameItemList.java new file mode 100644 index 0000000..2aa6676 --- /dev/null +++ b/src/jake2/game/GameItemList.java @@ -0,0 +1,762 @@ +/* +Copyright (C) 1997-2001 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +// Created on 20.11.2005 by RST. +// $Id: GameItemList.java,v 1.1 2005-11-20 22:18:34 salomo Exp $ + +package jake2.game; + + +import jake2.Defines; + + +public class GameItemList { + + // RST: this was separated in the java conversion from the g_item.c + // because all adapters have to be created in the other + // classes before this class can be loaded. + + public static gitem_t itemlist[] = { + //leave index 0 alone + new gitem_t(null, null, null, null, null, null, null, 0, null, + null, null, 0, 0, null, 0, 0, null, 0, null), + + // + // ARMOR + // + new gitem_t( + /* + * QUAKED item_armor_body (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + + "item_armor_body", GameItems.Pickup_Armor, null, null, null, + "misc/ar1_pkup.wav", "models/items/armor/body/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_bodyarmor", + /* pickup */ + "Body Armor", + /* width */ + 3, 0, null, Defines.IT_ARMOR, 0, GameItems.bodyarmor_info, + Defines.ARMOR_BODY, + /* precache */ + ""), + + /* + * QUAKED item_armor_combat (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_armor_combat", GameItems.Pickup_Armor, null, null, null, + "misc/ar1_pkup.wav", "models/items/armor/combat/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_combatarmor", + /* pickup */ + "Combat Armor", + /* width */ + 3, 0, null, Defines.IT_ARMOR, 0, GameItems.combatarmor_info, + Defines.ARMOR_COMBAT, + /* precache */ + ""), + + /* + * QUAKED item_armor_jacket (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_armor_jacket", GameItems.Pickup_Armor, null, null, null, + "misc/ar1_pkup.wav", "models/items/armor/jacket/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_jacketarmor", + /* pickup */ + "Jacket Armor", + /* width */ + 3, 0, null, Defines.IT_ARMOR, 0, GameItems.jacketarmor_info, + Defines.ARMOR_JACKET, + /* precache */ + ""), + + /* + * QUAKED item_armor_shard (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_armor_shard", GameItems.Pickup_Armor, null, null, null, + "misc/ar2_pkup.wav", "models/items/armor/shard/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_jacketarmor", + /* pickup */ + "Armor Shard", + /* width */ + 3, 0, null, Defines.IT_ARMOR, 0, null, Defines.ARMOR_SHARD, + /* precache */ + ""), + + /* + * QUAKED item_power_screen (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_power_screen", GameItems.Pickup_PowerArmor, GameItems.Use_PowerArmor, + GameItems.Drop_PowerArmor, null, "misc/ar3_pkup.wav", + "models/items/armor/screen/tris.md2", Defines.EF_ROTATE, + null, + /* icon */ + "i_powerscreen", + /* pickup */ + "Power Screen", + /* width */ + 0, 60, null, Defines.IT_ARMOR, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED item_power_shield (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_power_shield", GameItems.Pickup_PowerArmor, GameItems.Use_PowerArmor, + GameItems.Drop_PowerArmor, null, "misc/ar3_pkup.wav", + "models/items/armor/shield/tris.md2", Defines.EF_ROTATE, + null, + /* icon */ + "i_powershield", + /* pickup */ + "Power Shield", + /* width */ + 0, 60, null, Defines.IT_ARMOR, 0, null, 0, + /* precache */ + "misc/power2.wav misc/power1.wav"), + + // + // WEAPONS + // + + /* + * weapon_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) always owned, + * never in the world + */ + new gitem_t("weapon_blaster", null, PlayerWeapon.Use_Weapon, null, + PlayerWeapon.Weapon_Blaster, "misc/w_pkup.wav", null, 0, + "models/weapons/v_blast/tris.md2", + /* icon */ + "w_blaster", + /* pickup */ + "Blaster", 0, 0, null, Defines.IT_WEAPON + | Defines.IT_STAY_COOP, Defines.WEAP_BLASTER, null, + 0, + /* precache */ + "weapons/blastf1a.wav misc/lasfly.wav"), + + /* + * QUAKED weapon_shotgun (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("weapon_shotgun", PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_Shotgun, "misc/w_pkup.wav", + "models/weapons/g_shotg/tris.md2", Defines.EF_ROTATE, + "models/weapons/v_shotg/tris.md2", + /* icon */ + "w_shotgun", + /* pickup */ + "Shotgun", 0, 1, "Shells", Defines.IT_WEAPON + | Defines.IT_STAY_COOP, Defines.WEAP_SHOTGUN, null, + 0, + /* precache */ + "weapons/shotgf1b.wav weapons/shotgr1b.wav"), + + /* + * QUAKED weapon_supershotgun (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("weapon_supershotgun", PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_SuperShotgun, "misc/w_pkup.wav", + "models/weapons/g_shotg2/tris.md2", Defines.EF_ROTATE, + "models/weapons/v_shotg2/tris.md2", + /* icon */ + "w_sshotgun", + /* pickup */ + "Super Shotgun", 0, 2, "Shells", Defines.IT_WEAPON + | Defines.IT_STAY_COOP, Defines.WEAP_SUPERSHOTGUN, + null, 0, + /* precache */ + "weapons/sshotf1b.wav"), + + /* + * QUAKED weapon_machinegun (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_machinegun", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_Machinegun, + "misc/w_pkup.wav", + "models/weapons/g_machn/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_machn/tris.md2", + /* icon */ + "w_machinegun", + /* pickup */ + "Machinegun", + 0, + 1, + "Bullets", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_MACHINEGUN, + null, + 0, + /* precache */ + "weapons/machgf1b.wav weapons/machgf2b.wav weapons/machgf3b.wav weapons/machgf4b.wav weapons/machgf5b.wav"), + + /* + * QUAKED weapon_chaingun (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_chaingun", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_Chaingun, + "misc/w_pkup.wav", + "models/weapons/g_chain/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_chain/tris.md2", + /* icon */ + "w_chaingun", + /* pickup */ + "Chaingun", + 0, + 1, + "Bullets", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_CHAINGUN, + null, + 0, + /* precache */ + "weapons/chngnu1a.wav weapons/chngnl1a.wav weapons/machgf3b.wav` weapons/chngnd1a.wav"), + + /* + * QUAKED ammo_grenades (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "ammo_grenades", + GameItems.Pickup_Ammo, + PlayerWeapon.Use_Weapon, + GameItems.Drop_Ammo, + PlayerWeapon.Weapon_Grenade, + "misc/am_pkup.wav", + "models/items/ammo/grenades/medium/tris.md2", + 0, + "models/weapons/v_handgr/tris.md2", + /* icon */ + "a_grenades", + /* pickup */ + "Grenades", + /* width */ + 3, + 5, + "grenades", + Defines.IT_AMMO | Defines.IT_WEAPON, + Defines.WEAP_GRENADES, + null, + Defines.AMMO_GRENADES, + /* precache */ + "weapons/hgrent1a.wav weapons/hgrena1b.wav weapons/hgrenc1b.wav weapons/hgrenb1a.wav weapons/hgrenb2a.wav "), + + /* + * QUAKED weapon_grenadelauncher (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_grenadelauncher", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_GrenadeLauncher, + "misc/w_pkup.wav", + "models/weapons/g_launch/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_launch/tris.md2", + /* icon */ + "w_glauncher", + /* pickup */ + "Grenade Launcher", + 0, + 1, + "Grenades", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_GRENADELAUNCHER, + null, + 0, + /* precache */ + "models/objects/grenade/tris.md2 weapons/grenlf1a.wav weapons/grenlr1b.wav weapons/grenlb1b.wav"), + + /* + * QUAKED weapon_rocketlauncher (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_rocketlauncher", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_RocketLauncher, + "misc/w_pkup.wav", + "models/weapons/g_rocket/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_rocket/tris.md2", + /* icon */ + "w_rlauncher", + /* pickup */ + "Rocket Launcher", + 0, + 1, + "Rockets", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_ROCKETLAUNCHER, + null, + 0, + /* precache */ + "models/objects/rocket/tris.md2 weapons/rockfly.wav weapons/rocklf1a.wav weapons/rocklr1b.wav models/objects/debris2/tris.md2"), + + /* + * QUAKED weapon_hyperblaster (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_hyperblaster", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_HyperBlaster, + "misc/w_pkup.wav", + "models/weapons/g_hyperb/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_hyperb/tris.md2", + /* icon */ + "w_hyperblaster", + /* pickup */ + "HyperBlaster", + 0, + 1, + "Cells", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_HYPERBLASTER, + null, + 0, + /* precache */ + "weapons/hyprbu1a.wav weapons/hyprbl1a.wav weapons/hyprbf1a.wav weapons/hyprbd1a.wav misc/lasfly.wav"), + + /* + * QUAKED weapon_railgun (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("weapon_railgun", PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_Railgun, "misc/w_pkup.wav", + "models/weapons/g_rail/tris.md2", Defines.EF_ROTATE, + "models/weapons/v_rail/tris.md2", + /* icon */ + "w_railgun", + /* pickup */ + "Railgun", 0, 1, "Slugs", Defines.IT_WEAPON + | Defines.IT_STAY_COOP, Defines.WEAP_RAILGUN, null, + 0, + /* precache */ + "weapons/rg_hum.wav"), + + /* + * QUAKED weapon_bfg (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t( + "weapon_bfg", + PlayerWeapon.Pickup_Weapon, + PlayerWeapon.Use_Weapon, + PlayerWeapon.Drop_Weapon, + PlayerWeapon.Weapon_BFG, + "misc/w_pkup.wav", + "models/weapons/g_bfg/tris.md2", + Defines.EF_ROTATE, + "models/weapons/v_bfg/tris.md2", + /* icon */ + "w_bfg", + /* pickup */ + "BFG10K", + 0, + 50, + "Cells", + Defines.IT_WEAPON | Defines.IT_STAY_COOP, + Defines.WEAP_BFG, + null, + 0, + /* precache */ + "sprites/s_bfg1.sp2 sprites/s_bfg2.sp2 sprites/s_bfg3.sp2 weapons/bfg__f1y.wav weapons/bfg__l1a.wav weapons/bfg__x1b.wav weapons/bfg_hum.wav"), + + // + // AMMO ITEMS + // + + /* + * QUAKED ammo_shells (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("ammo_shells", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, + "misc/am_pkup.wav", + "models/items/ammo/shells/medium/tris.md2", 0, null, + /* icon */ + "a_shells", + /* pickup */ + "Shells", + /* width */ + 3, 10, null, Defines.IT_AMMO, 0, null, Defines.AMMO_SHELLS, + /* precache */ + ""), + + /* + * QUAKED ammo_bullets (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("ammo_bullets", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, + "misc/am_pkup.wav", + "models/items/ammo/bullets/medium/tris.md2", 0, null, + /* icon */ + "a_bullets", + /* pickup */ + "Bullets", + /* width */ + 3, 50, null, Defines.IT_AMMO, 0, null, + Defines.AMMO_BULLETS, + /* precache */ + ""), + + /* + * QUAKED ammo_cells (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("ammo_cells", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, + "misc/am_pkup.wav", + "models/items/ammo/cells/medium/tris.md2", 0, null, + /* icon */ + "a_cells", + /* pickup */ + "Cells", + /* width */ + 3, 50, null, Defines.IT_AMMO, 0, null, Defines.AMMO_CELLS, + /* precache */ + ""), + + /* + * QUAKED ammo_rockets (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("ammo_rockets", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, + "misc/am_pkup.wav", + "models/items/ammo/rockets/medium/tris.md2", 0, null, + /* icon */ + "a_rockets", + /* pickup */ + "Rockets", + /* width */ + 3, 5, null, Defines.IT_AMMO, 0, null, Defines.AMMO_ROCKETS, + /* precache */ + ""), + + /* + * QUAKED ammo_slugs (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("ammo_slugs", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, + "misc/am_pkup.wav", + "models/items/ammo/slugs/medium/tris.md2", 0, null, + /* icon */ + "a_slugs", + /* pickup */ + "Slugs", + /* width */ + 3, 10, null, Defines.IT_AMMO, 0, null, Defines.AMMO_SLUGS, + /* precache */ + ""), + + // + // POWERUP ITEMS + // + /* + * QUAKED item_quad (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_quad", GameItems.Pickup_Powerup, GameItems.Use_Quad, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/quaddama/tris.md2", Defines.EF_ROTATE, null, + /* icon */ + "p_quad", + /* pickup */ + "Quad Damage", + /* width */ + 2, 60, null, Defines.IT_POWERUP, 0, null, 0, + /* precache */ + "items/damage.wav items/damage2.wav items/damage3.wav"), + + /* + * QUAKED item_invulnerability (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_invulnerability", GameItems.Pickup_Powerup, + GameItems.Use_Invulnerability, GameItems.Drop_General, null, + "items/pkup.wav", "models/items/invulner/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "p_invulnerability", + /* pickup */ + "Invulnerability", + /* width */ + 2, 300, null, Defines.IT_POWERUP, 0, null, 0, + /* precache */ + "items/protect.wav items/protect2.wav items/protect4.wav"), + + /* + * QUAKED item_silencer (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_silencer", GameItems.Pickup_Powerup, GameItems.Use_Silencer, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/silencer/tris.md2", Defines.EF_ROTATE, null, + /* icon */ + "p_silencer", + /* pickup */ + "Silencer", + /* width */ + 2, 60, null, Defines.IT_POWERUP, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED item_breather (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_breather", GameItems.Pickup_Powerup, GameItems.Use_Breather, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/breather/tris.md2", Defines.EF_ROTATE, null, + /* icon */ + "p_rebreather", + /* pickup */ + "Rebreather", + /* width */ + 2, 60, null, Defines.IT_STAY_COOP | Defines.IT_POWERUP, 0, + null, 0, + /* precache */ + "items/airout.wav"), + + /* + * QUAKED item_enviro (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_enviro", GameItems.Pickup_Powerup, GameItems.Use_Envirosuit, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/enviro/tris.md2", Defines.EF_ROTATE, null, + /* icon */ + "p_envirosuit", + /* pickup */ + "Environment Suit", + /* width */ + 2, 60, null, Defines.IT_STAY_COOP | Defines.IT_POWERUP, 0, + null, 0, + /* precache */ + "items/airout.wav"), + + /* + * QUAKED item_ancient_head (.3 .3 1) (-16 -16 -16) (16 16 16) + * Special item that gives +2 to maximum health + */ + new gitem_t("item_ancient_head", GameItems.Pickup_AncientHead, null, null, + null, "items/pkup.wav", "models/items/c_head/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_fixme", + /* pickup */ + "Ancient Head", + /* width */ + 2, 60, null, 0, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED item_adrenaline (.3 .3 1) (-16 -16 -16) (16 16 16) gives + * +1 to maximum health + */ + new gitem_t("item_adrenaline", GameItems.Pickup_Adrenaline, null, null, null, + "items/pkup.wav", "models/items/adrenal/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "p_adrenaline", + /* pickup */ + "Adrenaline", + /* width */ + 2, 60, null, 0, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED item_bandolier (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_bandolier", GameItems.Pickup_Bandolier, null, null, null, + "items/pkup.wav", "models/items/band/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "p_bandolier", + /* pickup */ + "Bandolier", + /* width */ + 2, 60, null, 0, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED item_pack (.3 .3 1) (-16 -16 -16) (16 16 16) + */ + new gitem_t("item_pack", GameItems.Pickup_Pack, null, null, null, + "items/pkup.wav", "models/items/pack/tris.md2", + Defines.EF_ROTATE, null, + /* icon */ + "i_pack", + /* pickup */ + "Ammo Pack", + /* width */ + 2, 180, null, 0, 0, null, 0, + /* precache */ + ""), + + // + // KEYS + // + /* + * QUAKED key_data_cd (0 .5 .8) (-16 -16 -16) (16 16 16) key for + * computer centers + */ + new gitem_t("key_data_cd", GameItems.Pickup_Key, null, GameItems.Drop_General, + null, "items/pkup.wav", + "models/items/keys/data_cd/tris.md2", Defines.EF_ROTATE, + null, "k_datacd", "Data CD", 2, 0, null, + Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_power_cube (0 .5 .8) (-16 -16 -16) (16 16 16) + * TRIGGER_SPAWN NO_TOUCH warehouse circuits + */ + new gitem_t("key_power_cube", GameItems.Pickup_Key, null, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/keys/power/tris.md2", Defines.EF_ROTATE, + null, "k_powercube", "Power Cube", 2, 0, null, + Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_pyramid (0 .5 .8) (-16 -16 -16) (16 16 16) key for the + * entrance of jail3 + */ + new gitem_t("key_pyramid", GameItems.Pickup_Key, null, GameItems.Drop_General, + null, "items/pkup.wav", + "models/items/keys/pyramid/tris.md2", Defines.EF_ROTATE, + null, "k_pyramid", "Pyramid Key", 2, 0, null, + Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_data_spinner (0 .5 .8) (-16 -16 -16) (16 16 16) key + * for the city computer + */ + new gitem_t("key_data_spinner", GameItems.Pickup_Key, null, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/keys/spinner/tris.md2", Defines.EF_ROTATE, + null, "k_dataspin", "Data Spinner", 2, 0, null, + Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_pass (0 .5 .8) (-16 -16 -16) (16 16 16) security pass + * for the security level + */ + new gitem_t("key_pass", GameItems.Pickup_Key, null, GameItems.Drop_General, + null, "items/pkup.wav", "models/items/keys/pass/tris.md2", + Defines.EF_ROTATE, null, "k_security", "Security Pass", 2, + 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_blue_key (0 .5 .8) (-16 -16 -16) (16 16 16) normal + * door key - blue + */ + new gitem_t("key_blue_key", GameItems.Pickup_Key, null, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/keys/key/tris.md2", Defines.EF_ROTATE, null, + "k_bluekey", "Blue Key", 2, 0, null, Defines.IT_STAY_COOP + | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_red_key (0 .5 .8) (-16 -16 -16) (16 16 16) normal door + * key - red + */ + new gitem_t("key_red_key", GameItems.Pickup_Key, null, GameItems.Drop_General, + null, "items/pkup.wav", + "models/items/keys/red_key/tris.md2", Defines.EF_ROTATE, + null, "k_redkey", "Red Key", 2, 0, null, + Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, + /* precache */ + ""), + + /* + * QUAKED key_commander_head (0 .5 .8) (-16 -16 -16) (16 16 16) tank + * commander's head + */ + new gitem_t("key_commander_head", GameItems.Pickup_Key, null, + GameItems.Drop_General, null, "items/pkup.wav", + "models/monsters/commandr/head/tris.md2", Defines.EF_GIB, + null, + /* icon */ + "k_comhead", + /* pickup */ + "Commander's Head", + /* width */ + 2, 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, + 0, + /* precache */ + ""), + + /* + * QUAKED key_airstrike_target (0 .5 .8) (-16 -16 -16) (16 16 16) + * tank commander's head + */ + new gitem_t("key_airstrike_target", GameItems.Pickup_Key, null, + GameItems.Drop_General, null, "items/pkup.wav", + "models/items/keys/target/tris.md2", Defines.EF_ROTATE, + null, + /* icon */ + "i_airstrike", + /* pickup */ + "Airstrike Marker", + /* width */ + 2, 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, + 0, + /* precache */ + ""), + new gitem_t(null, GameItems.Pickup_Health, null, null, null, + "items/pkup.wav", null, 0, null, + /* icon */ + "i_health", + /* pickup */ + "Health", + /* width */ + 3, 0, null, 0, 0, null, 0, + /* precache */ + "items/s_health.wav items/n_health.wav items/l_health.wav items/m_health.wav"), + + // end of list marker + null }; + + public static void main(String[] args) { + } +} diff --git a/src/jake2/game/GameItems.java b/src/jake2/game/GameItems.java index c72a9f5..5f0206a 100644 --- a/src/jake2/game/GameItems.java +++ b/src/jake2/game/GameItems.java @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 16.11.2005 by RST. -// $Id: GameItems.java,v 1.1 2005-11-16 22:24:53 salomo Exp $ +// $Id: GameItems.java,v 1.2 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -38,729 +38,6 @@ import jake2.util.Math3D; public class GameItems { - public static gitem_t itemlist[] = { - //leave index 0 alone - new gitem_t(null, null, null, null, null, null, null, 0, null, - null, null, 0, 0, null, 0, 0, null, 0, null), - - // - // ARMOR - // - new gitem_t( - /* - * QUAKED item_armor_body (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - - "item_armor_body", GameItems.Pickup_Armor, null, null, null, - "misc/ar1_pkup.wav", "models/items/armor/body/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_bodyarmor", - /* pickup */ - "Body Armor", - /* width */ - 3, 0, null, Defines.IT_ARMOR, 0, GameItems.bodyarmor_info, - Defines.ARMOR_BODY, - /* precache */ - ""), - - /* - * QUAKED item_armor_combat (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_armor_combat", GameItems.Pickup_Armor, null, null, null, - "misc/ar1_pkup.wav", "models/items/armor/combat/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_combatarmor", - /* pickup */ - "Combat Armor", - /* width */ - 3, 0, null, Defines.IT_ARMOR, 0, GameItems.combatarmor_info, - Defines.ARMOR_COMBAT, - /* precache */ - ""), - - /* - * QUAKED item_armor_jacket (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_armor_jacket", GameItems.Pickup_Armor, null, null, null, - "misc/ar1_pkup.wav", "models/items/armor/jacket/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_jacketarmor", - /* pickup */ - "Jacket Armor", - /* width */ - 3, 0, null, Defines.IT_ARMOR, 0, GameItems.jacketarmor_info, - Defines.ARMOR_JACKET, - /* precache */ - ""), - - /* - * QUAKED item_armor_shard (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_armor_shard", GameItems.Pickup_Armor, null, null, null, - "misc/ar2_pkup.wav", "models/items/armor/shard/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_jacketarmor", - /* pickup */ - "Armor Shard", - /* width */ - 3, 0, null, Defines.IT_ARMOR, 0, null, Defines.ARMOR_SHARD, - /* precache */ - ""), - - /* - * QUAKED item_power_screen (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_power_screen", GameItems.Pickup_PowerArmor, GameItems.Use_PowerArmor, - GameItems.Drop_PowerArmor, null, "misc/ar3_pkup.wav", - "models/items/armor/screen/tris.md2", Defines.EF_ROTATE, - null, - /* icon */ - "i_powerscreen", - /* pickup */ - "Power Screen", - /* width */ - 0, 60, null, Defines.IT_ARMOR, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED item_power_shield (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_power_shield", GameItems.Pickup_PowerArmor, GameItems.Use_PowerArmor, - GameItems.Drop_PowerArmor, null, "misc/ar3_pkup.wav", - "models/items/armor/shield/tris.md2", Defines.EF_ROTATE, - null, - /* icon */ - "i_powershield", - /* pickup */ - "Power Shield", - /* width */ - 0, 60, null, Defines.IT_ARMOR, 0, null, 0, - /* precache */ - "misc/power2.wav misc/power1.wav"), - - // - // WEAPONS - // - - /* - * weapon_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) always owned, - * never in the world - */ - new gitem_t("weapon_blaster", null, PlayerWeapon.Use_Weapon, null, - PlayerWeapon.Weapon_Blaster, "misc/w_pkup.wav", null, 0, - "models/weapons/v_blast/tris.md2", - /* icon */ - "w_blaster", - /* pickup */ - "Blaster", 0, 0, null, Defines.IT_WEAPON - | Defines.IT_STAY_COOP, Defines.WEAP_BLASTER, null, - 0, - /* precache */ - "weapons/blastf1a.wav misc/lasfly.wav"), - - /* - * QUAKED weapon_shotgun (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("weapon_shotgun", PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_Shotgun, "misc/w_pkup.wav", - "models/weapons/g_shotg/tris.md2", Defines.EF_ROTATE, - "models/weapons/v_shotg/tris.md2", - /* icon */ - "w_shotgun", - /* pickup */ - "Shotgun", 0, 1, "Shells", Defines.IT_WEAPON - | Defines.IT_STAY_COOP, Defines.WEAP_SHOTGUN, null, - 0, - /* precache */ - "weapons/shotgf1b.wav weapons/shotgr1b.wav"), - - /* - * QUAKED weapon_supershotgun (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("weapon_supershotgun", PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_SuperShotgun, "misc/w_pkup.wav", - "models/weapons/g_shotg2/tris.md2", Defines.EF_ROTATE, - "models/weapons/v_shotg2/tris.md2", - /* icon */ - "w_sshotgun", - /* pickup */ - "Super Shotgun", 0, 2, "Shells", Defines.IT_WEAPON - | Defines.IT_STAY_COOP, Defines.WEAP_SUPERSHOTGUN, - null, 0, - /* precache */ - "weapons/sshotf1b.wav"), - - /* - * QUAKED weapon_machinegun (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_machinegun", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_Machinegun, - "misc/w_pkup.wav", - "models/weapons/g_machn/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_machn/tris.md2", - /* icon */ - "w_machinegun", - /* pickup */ - "Machinegun", - 0, - 1, - "Bullets", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_MACHINEGUN, - null, - 0, - /* precache */ - "weapons/machgf1b.wav weapons/machgf2b.wav weapons/machgf3b.wav weapons/machgf4b.wav weapons/machgf5b.wav"), - - /* - * QUAKED weapon_chaingun (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_chaingun", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_Chaingun, - "misc/w_pkup.wav", - "models/weapons/g_chain/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_chain/tris.md2", - /* icon */ - "w_chaingun", - /* pickup */ - "Chaingun", - 0, - 1, - "Bullets", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_CHAINGUN, - null, - 0, - /* precache */ - "weapons/chngnu1a.wav weapons/chngnl1a.wav weapons/machgf3b.wav` weapons/chngnd1a.wav"), - - /* - * QUAKED ammo_grenades (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "ammo_grenades", - GameItems.Pickup_Ammo, - PlayerWeapon.Use_Weapon, - GameItems.Drop_Ammo, - PlayerWeapon.Weapon_Grenade, - "misc/am_pkup.wav", - "models/items/ammo/grenades/medium/tris.md2", - 0, - "models/weapons/v_handgr/tris.md2", - /* icon */ - "a_grenades", - /* pickup */ - "Grenades", - /* width */ - 3, - 5, - "grenades", - Defines.IT_AMMO | Defines.IT_WEAPON, - Defines.WEAP_GRENADES, - null, - Defines.AMMO_GRENADES, - /* precache */ - "weapons/hgrent1a.wav weapons/hgrena1b.wav weapons/hgrenc1b.wav weapons/hgrenb1a.wav weapons/hgrenb2a.wav "), - - /* - * QUAKED weapon_grenadelauncher (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_grenadelauncher", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_GrenadeLauncher, - "misc/w_pkup.wav", - "models/weapons/g_launch/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_launch/tris.md2", - /* icon */ - "w_glauncher", - /* pickup */ - "Grenade Launcher", - 0, - 1, - "Grenades", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_GRENADELAUNCHER, - null, - 0, - /* precache */ - "models/objects/grenade/tris.md2 weapons/grenlf1a.wav weapons/grenlr1b.wav weapons/grenlb1b.wav"), - - /* - * QUAKED weapon_rocketlauncher (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_rocketlauncher", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_RocketLauncher, - "misc/w_pkup.wav", - "models/weapons/g_rocket/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_rocket/tris.md2", - /* icon */ - "w_rlauncher", - /* pickup */ - "Rocket Launcher", - 0, - 1, - "Rockets", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_ROCKETLAUNCHER, - null, - 0, - /* precache */ - "models/objects/rocket/tris.md2 weapons/rockfly.wav weapons/rocklf1a.wav weapons/rocklr1b.wav models/objects/debris2/tris.md2"), - - /* - * QUAKED weapon_hyperblaster (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_hyperblaster", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_HyperBlaster, - "misc/w_pkup.wav", - "models/weapons/g_hyperb/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_hyperb/tris.md2", - /* icon */ - "w_hyperblaster", - /* pickup */ - "HyperBlaster", - 0, - 1, - "Cells", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_HYPERBLASTER, - null, - 0, - /* precache */ - "weapons/hyprbu1a.wav weapons/hyprbl1a.wav weapons/hyprbf1a.wav weapons/hyprbd1a.wav misc/lasfly.wav"), - - /* - * QUAKED weapon_railgun (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("weapon_railgun", PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_Railgun, "misc/w_pkup.wav", - "models/weapons/g_rail/tris.md2", Defines.EF_ROTATE, - "models/weapons/v_rail/tris.md2", - /* icon */ - "w_railgun", - /* pickup */ - "Railgun", 0, 1, "Slugs", Defines.IT_WEAPON - | Defines.IT_STAY_COOP, Defines.WEAP_RAILGUN, null, - 0, - /* precache */ - "weapons/rg_hum.wav"), - - /* - * QUAKED weapon_bfg (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t( - "weapon_bfg", - PlayerWeapon.Pickup_Weapon, - PlayerWeapon.Use_Weapon, - PlayerWeapon.Drop_Weapon, - PlayerWeapon.Weapon_BFG, - "misc/w_pkup.wav", - "models/weapons/g_bfg/tris.md2", - Defines.EF_ROTATE, - "models/weapons/v_bfg/tris.md2", - /* icon */ - "w_bfg", - /* pickup */ - "BFG10K", - 0, - 50, - "Cells", - Defines.IT_WEAPON | Defines.IT_STAY_COOP, - Defines.WEAP_BFG, - null, - 0, - /* precache */ - "sprites/s_bfg1.sp2 sprites/s_bfg2.sp2 sprites/s_bfg3.sp2 weapons/bfg__f1y.wav weapons/bfg__l1a.wav weapons/bfg__x1b.wav weapons/bfg_hum.wav"), - - // - // AMMO ITEMS - // - - /* - * QUAKED ammo_shells (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("ammo_shells", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, - "misc/am_pkup.wav", - "models/items/ammo/shells/medium/tris.md2", 0, null, - /* icon */ - "a_shells", - /* pickup */ - "Shells", - /* width */ - 3, 10, null, Defines.IT_AMMO, 0, null, Defines.AMMO_SHELLS, - /* precache */ - ""), - - /* - * QUAKED ammo_bullets (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("ammo_bullets", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, - "misc/am_pkup.wav", - "models/items/ammo/bullets/medium/tris.md2", 0, null, - /* icon */ - "a_bullets", - /* pickup */ - "Bullets", - /* width */ - 3, 50, null, Defines.IT_AMMO, 0, null, - Defines.AMMO_BULLETS, - /* precache */ - ""), - - /* - * QUAKED ammo_cells (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("ammo_cells", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, - "misc/am_pkup.wav", - "models/items/ammo/cells/medium/tris.md2", 0, null, - /* icon */ - "a_cells", - /* pickup */ - "Cells", - /* width */ - 3, 50, null, Defines.IT_AMMO, 0, null, Defines.AMMO_CELLS, - /* precache */ - ""), - - /* - * QUAKED ammo_rockets (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("ammo_rockets", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, - "misc/am_pkup.wav", - "models/items/ammo/rockets/medium/tris.md2", 0, null, - /* icon */ - "a_rockets", - /* pickup */ - "Rockets", - /* width */ - 3, 5, null, Defines.IT_AMMO, 0, null, Defines.AMMO_ROCKETS, - /* precache */ - ""), - - /* - * QUAKED ammo_slugs (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("ammo_slugs", GameItems.Pickup_Ammo, null, GameItems.Drop_Ammo, null, - "misc/am_pkup.wav", - "models/items/ammo/slugs/medium/tris.md2", 0, null, - /* icon */ - "a_slugs", - /* pickup */ - "Slugs", - /* width */ - 3, 10, null, Defines.IT_AMMO, 0, null, Defines.AMMO_SLUGS, - /* precache */ - ""), - - // - // POWERUP ITEMS - // - /* - * QUAKED item_quad (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_quad", GameItems.Pickup_Powerup, GameItems.Use_Quad, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/quaddama/tris.md2", Defines.EF_ROTATE, null, - /* icon */ - "p_quad", - /* pickup */ - "Quad Damage", - /* width */ - 2, 60, null, Defines.IT_POWERUP, 0, null, 0, - /* precache */ - "items/damage.wav items/damage2.wav items/damage3.wav"), - - /* - * QUAKED item_invulnerability (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_invulnerability", GameItems.Pickup_Powerup, - GameItems.Use_Invulnerability, GameItems.Drop_General, null, - "items/pkup.wav", "models/items/invulner/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "p_invulnerability", - /* pickup */ - "Invulnerability", - /* width */ - 2, 300, null, Defines.IT_POWERUP, 0, null, 0, - /* precache */ - "items/protect.wav items/protect2.wav items/protect4.wav"), - - /* - * QUAKED item_silencer (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_silencer", GameItems.Pickup_Powerup, GameItems.Use_Silencer, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/silencer/tris.md2", Defines.EF_ROTATE, null, - /* icon */ - "p_silencer", - /* pickup */ - "Silencer", - /* width */ - 2, 60, null, Defines.IT_POWERUP, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED item_breather (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_breather", GameItems.Pickup_Powerup, GameItems.Use_Breather, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/breather/tris.md2", Defines.EF_ROTATE, null, - /* icon */ - "p_rebreather", - /* pickup */ - "Rebreather", - /* width */ - 2, 60, null, Defines.IT_STAY_COOP | Defines.IT_POWERUP, 0, - null, 0, - /* precache */ - "items/airout.wav"), - - /* - * QUAKED item_enviro (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_enviro", GameItems.Pickup_Powerup, GameItems.Use_Envirosuit, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/enviro/tris.md2", Defines.EF_ROTATE, null, - /* icon */ - "p_envirosuit", - /* pickup */ - "Environment Suit", - /* width */ - 2, 60, null, Defines.IT_STAY_COOP | Defines.IT_POWERUP, 0, - null, 0, - /* precache */ - "items/airout.wav"), - - /* - * QUAKED item_ancient_head (.3 .3 1) (-16 -16 -16) (16 16 16) - * Special item that gives +2 to maximum health - */ - new gitem_t("item_ancient_head", GameItems.Pickup_AncientHead, null, null, - null, "items/pkup.wav", "models/items/c_head/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_fixme", - /* pickup */ - "Ancient Head", - /* width */ - 2, 60, null, 0, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED item_adrenaline (.3 .3 1) (-16 -16 -16) (16 16 16) gives - * +1 to maximum health - */ - new gitem_t("item_adrenaline", GameItems.Pickup_Adrenaline, null, null, null, - "items/pkup.wav", "models/items/adrenal/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "p_adrenaline", - /* pickup */ - "Adrenaline", - /* width */ - 2, 60, null, 0, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED item_bandolier (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_bandolier", GameItems.Pickup_Bandolier, null, null, null, - "items/pkup.wav", "models/items/band/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "p_bandolier", - /* pickup */ - "Bandolier", - /* width */ - 2, 60, null, 0, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED item_pack (.3 .3 1) (-16 -16 -16) (16 16 16) - */ - new gitem_t("item_pack", GameItems.Pickup_Pack, null, null, null, - "items/pkup.wav", "models/items/pack/tris.md2", - Defines.EF_ROTATE, null, - /* icon */ - "i_pack", - /* pickup */ - "Ammo Pack", - /* width */ - 2, 180, null, 0, 0, null, 0, - /* precache */ - ""), - - // - // KEYS - // - /* - * QUAKED key_data_cd (0 .5 .8) (-16 -16 -16) (16 16 16) key for - * computer centers - */ - new gitem_t("key_data_cd", GameItems.Pickup_Key, null, GameItems.Drop_General, - null, "items/pkup.wav", - "models/items/keys/data_cd/tris.md2", Defines.EF_ROTATE, - null, "k_datacd", "Data CD", 2, 0, null, - Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_power_cube (0 .5 .8) (-16 -16 -16) (16 16 16) - * TRIGGER_SPAWN NO_TOUCH warehouse circuits - */ - new gitem_t("key_power_cube", GameItems.Pickup_Key, null, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/keys/power/tris.md2", Defines.EF_ROTATE, - null, "k_powercube", "Power Cube", 2, 0, null, - Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_pyramid (0 .5 .8) (-16 -16 -16) (16 16 16) key for the - * entrance of jail3 - */ - new gitem_t("key_pyramid", GameItems.Pickup_Key, null, GameItems.Drop_General, - null, "items/pkup.wav", - "models/items/keys/pyramid/tris.md2", Defines.EF_ROTATE, - null, "k_pyramid", "Pyramid Key", 2, 0, null, - Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_data_spinner (0 .5 .8) (-16 -16 -16) (16 16 16) key - * for the city computer - */ - new gitem_t("key_data_spinner", GameItems.Pickup_Key, null, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/keys/spinner/tris.md2", Defines.EF_ROTATE, - null, "k_dataspin", "Data Spinner", 2, 0, null, - Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_pass (0 .5 .8) (-16 -16 -16) (16 16 16) security pass - * for the security level - */ - new gitem_t("key_pass", GameItems.Pickup_Key, null, GameItems.Drop_General, - null, "items/pkup.wav", "models/items/keys/pass/tris.md2", - Defines.EF_ROTATE, null, "k_security", "Security Pass", 2, - 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_blue_key (0 .5 .8) (-16 -16 -16) (16 16 16) normal - * door key - blue - */ - new gitem_t("key_blue_key", GameItems.Pickup_Key, null, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/keys/key/tris.md2", Defines.EF_ROTATE, null, - "k_bluekey", "Blue Key", 2, 0, null, Defines.IT_STAY_COOP - | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_red_key (0 .5 .8) (-16 -16 -16) (16 16 16) normal door - * key - red - */ - new gitem_t("key_red_key", GameItems.Pickup_Key, null, GameItems.Drop_General, - null, "items/pkup.wav", - "models/items/keys/red_key/tris.md2", Defines.EF_ROTATE, - null, "k_redkey", "Red Key", 2, 0, null, - Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, 0, - /* precache */ - ""), - - /* - * QUAKED key_commander_head (0 .5 .8) (-16 -16 -16) (16 16 16) tank - * commander's head - */ - new gitem_t("key_commander_head", GameItems.Pickup_Key, null, - GameItems.Drop_General, null, "items/pkup.wav", - "models/monsters/commandr/head/tris.md2", Defines.EF_GIB, - null, - /* icon */ - "k_comhead", - /* pickup */ - "Commander's Head", - /* width */ - 2, 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, - 0, - /* precache */ - ""), - - /* - * QUAKED key_airstrike_target (0 .5 .8) (-16 -16 -16) (16 16 16) - * tank commander's head - */ - new gitem_t("key_airstrike_target", GameItems.Pickup_Key, null, - GameItems.Drop_General, null, "items/pkup.wav", - "models/items/keys/target/tris.md2", Defines.EF_ROTATE, - null, - /* icon */ - "i_airstrike", - /* pickup */ - "Airstrike Marker", - /* width */ - 2, 0, null, Defines.IT_STAY_COOP | Defines.IT_KEY, 0, null, - 0, - /* precache */ - ""), - new gitem_t(null, GameItems.Pickup_Health, null, null, null, - "items/pkup.wav", null, 0, null, - /* icon */ - "i_health", - /* pickup */ - "Health", - /* width */ - 3, 0, null, 0, 0, null, 0, - /* precache */ - "items/s_health.wav items/n_health.wav items/l_health.wav items/m_health.wav"), - - // end of list marker - null }; public static gitem_armor_t jacketarmor_info = new gitem_armor_t(25, 50, .30f, .00f, Defines.ARMOR_JACKET); public static gitem_armor_t combatarmor_info = new gitem_armor_t(50, 100, @@ -773,7 +50,9 @@ public class GameItems { static int body_armor_index; static int power_screen_index; static int power_shield_index; + static EntThinkAdapter DoRespawn = new EntThinkAdapter() { + public String getID() { return "do_respawn";} public boolean think(edict_t ent) { if (ent.team != null) { edict_t master; @@ -803,6 +82,7 @@ public class GameItems { } }; static EntInteractAdapter Pickup_Pack = new EntInteractAdapter() { + public String getID() { return "pickup_pack";} public boolean interact(edict_t ent, edict_t other) { gitem_t item; @@ -877,6 +157,7 @@ public class GameItems { } }; final static EntInteractAdapter Pickup_Health = new EntInteractAdapter() { + public String getID() { return "pickup_health";} public boolean interact(edict_t ent, edict_t other) { if (0 == (ent.style & Defines.HEALTH_IGNORE_MAX)) @@ -908,6 +189,7 @@ public class GameItems { }; static EntTouchAdapter Touch_Item = new EntTouchAdapter() { + public String getID() { return "touch_item";} public void touch(edict_t ent, edict_t other, cplane_t plane, csurface_t surf) { boolean taken; @@ -983,6 +265,7 @@ public class GameItems { } }; static EntTouchAdapter drop_temp_touch = new EntTouchAdapter() { + public String getID() { return "drop_temp_touch";} public void touch(edict_t ent, edict_t other, cplane_t plane, csurface_t surf) { if (other == ent.owner) @@ -992,6 +275,7 @@ public class GameItems { } }; static EntThinkAdapter drop_make_touchable = new EntThinkAdapter() { + public String getID() { return "drop_make_touchable";} public boolean think(edict_t ent) { ent.touch = Touch_Item; if (GameBase.deathmatch.value != 0) { @@ -1002,7 +286,7 @@ public class GameItems { } }; static ItemUseAdapter Use_Quad = new ItemUseAdapter() { - + public String getID() { return "use_quad";} public void use(edict_t ent, gitem_t item) { int timeout; @@ -1025,7 +309,9 @@ public class GameItems { .soundindex("items/damage.wav"), 1, Defines.ATTN_NORM, 0); } }; + static ItemUseAdapter Use_Invulnerability = new ItemUseAdapter() { + public String getID() { return "use_invulnerability";} public void use(edict_t ent, gitem_t item) { ent.client.pers.inventory[ITEM_INDEX(item)]--; GameUtil.ValidateSelectedItem(ent); @@ -1040,6 +326,7 @@ public class GameItems { } }; static ItemUseAdapter Use_Breather = new ItemUseAdapter() { + public String getID() { return "use_breather";} public void use(edict_t ent, gitem_t item) { ent.client.pers.inventory[ITEM_INDEX(item)]--; @@ -1055,6 +342,7 @@ public class GameItems { } }; static ItemUseAdapter Use_Envirosuit = new ItemUseAdapter() { + public String getID() { return "use_envirosuit";} public void use(edict_t ent, gitem_t item) { ent.client.pers.inventory[ITEM_INDEX(item)]--; GameUtil.ValidateSelectedItem(ent); @@ -1069,6 +357,7 @@ public class GameItems { } }; static ItemUseAdapter Use_Silencer = new ItemUseAdapter() { + public String getID() { return "use_silencer";} public void use(edict_t ent, gitem_t item) { ent.client.pers.inventory[ITEM_INDEX(item)]--; @@ -1080,6 +369,7 @@ public class GameItems { } }; static EntInteractAdapter Pickup_Key = new EntInteractAdapter() { + public String getID() { return "pickup_key";} public boolean interact(edict_t ent, edict_t other) { if (GameBase.coop.value != 0) { if (Lib.strcmp(ent.classname, "key_power_cube") == 0) { @@ -1099,6 +389,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_Ammo = new EntInteractAdapter() { + public String getID() { return "pickup_ammo";} public boolean interact(edict_t ent, edict_t other) { int oldcount; int count; @@ -1131,6 +422,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_Armor = new EntInteractAdapter() { + public String getID() { return "pickup_armor";} public boolean interact(edict_t ent, edict_t other) { int old_armor_index; gitem_armor_t oldinfo; @@ -1213,6 +505,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_PowerArmor = new EntInteractAdapter() { + public String getID() { return "pickup_powerarmor";} public boolean interact(edict_t ent, edict_t other) { int quantity; @@ -1232,7 +525,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_Powerup = new EntInteractAdapter() { - + public String getID() { return "pickup_powerup";} public boolean interact(edict_t ent, edict_t other) { int quantity; @@ -1265,6 +558,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_Adrenaline = new EntInteractAdapter() { + public String getID() { return "pickup_adrenaline";} public boolean interact(edict_t ent, edict_t other) { if (GameBase.deathmatch.value == 0) other.max_health += 1; @@ -1281,6 +575,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_AncientHead = new EntInteractAdapter() { + public String getID() { return "pickup_ancienthead";} public boolean interact(edict_t ent, edict_t other) { other.max_health += 2; @@ -1292,6 +587,7 @@ public class GameItems { } }; public static EntInteractAdapter Pickup_Bandolier = new EntInteractAdapter() { + public String getID() { return "pickup_bandolier";} public boolean interact(edict_t ent, edict_t other) { gitem_t item; int index; @@ -1330,6 +626,7 @@ public class GameItems { } }; public static ItemDropAdapter Drop_Ammo = new ItemDropAdapter() { + public String getID() { return "drop_ammo";} public void drop(edict_t ent, gitem_t item) { edict_t dropped; int index; @@ -1356,13 +653,16 @@ public class GameItems { } }; public static ItemDropAdapter Drop_General = new ItemDropAdapter() { + public String getID() { return "drop_general";} public void drop(edict_t ent, gitem_t item) { Drop_Item(ent, item); ent.client.pers.inventory[ITEM_INDEX(item)]--; Cmd.ValidateSelectedItem(ent); } }; + public static ItemDropAdapter Drop_PowerArmor = new ItemDropAdapter() { + public String getID() { return "drop_powerarmor";} public void drop(edict_t ent, gitem_t item) { if (0 != (ent.flags & Defines.FL_POWER_ARMOR) && (ent.client.pers.inventory[ITEM_INDEX(item)] == 1)) @@ -1370,7 +670,9 @@ public class GameItems { Drop_General.drop(ent, item); } }; + public static EntThinkAdapter droptofloor = new EntThinkAdapter() { + public String getID() { return "drop_to_floor";} public boolean think(edict_t ent) { trace_t tr; float[] dest = { 0, 0, 0 }; @@ -1437,6 +739,7 @@ public class GameItems { } }; public static ItemUseAdapter Use_PowerArmor = new ItemUseAdapter() { + public String getID() { return "use_powerarmor";} public void use(edict_t ent, gitem_t item) { int index; @@ -1462,6 +765,7 @@ public class GameItems { } }; public static EntUseAdapter Use_Item = new EntUseAdapter() { + public String getID() { return "use_item";} public void use(edict_t ent, edict_t other, edict_t activator) { ent.svflags &= ~Defines.SVF_NOCLIENT; ent.use = null; @@ -1485,7 +789,7 @@ public class GameItems { if (index == 0 || index >= GameBase.game.num_items) return null; - return itemlist[index]; + return GameItemList.itemlist[index]; } /* @@ -1496,7 +800,7 @@ public class GameItems { static gitem_t FindItemByClassname(String classname) { for (int i = 1; i < GameBase.game.num_items; i++) { - gitem_t it = itemlist[i]; + gitem_t it = GameItemList.itemlist[i]; if (it.classname == null) continue; @@ -1513,7 +817,7 @@ public class GameItems { //geht. static gitem_t FindItem(String pickup_name) { for (int i = 1; i < GameBase.game.num_items; i++) { - gitem_t it = itemlist[i]; + gitem_t it = GameItemList.itemlist[i]; if (it.pickup_name == null) continue; @@ -1687,7 +991,7 @@ public class GameItems { } public static void InitItems() { - GameBase.game.num_items = itemlist.length - 1; + GameBase.game.num_items = GameItemList.itemlist.length - 1; } /* @@ -1700,7 +1004,7 @@ public class GameItems { gitem_t it; for (i = 1; i < GameBase.game.num_items; i++) { - it = itemlist[i]; + it = GameItemList.itemlist[i]; GameBase.gi.configstring(Defines.CS_ITEMS + i, it.pickup_name); } @@ -1728,7 +1032,7 @@ public class GameItems { index = (cl.pers.selected_item + i) % Defines.MAX_ITEMS; if (0 == cl.pers.inventory[index]) continue; - it = itemlist[index]; + it = GameItemList.itemlist[index]; if (it.use == null) continue; if (0 == (it.flags & itflags)) @@ -1759,7 +1063,7 @@ public class GameItems { % Defines.MAX_ITEMS; if (0 == cl.pers.inventory[index]) continue; - it = itemlist[index]; + it = GameItemList.itemlist[index]; if (null == it.use) continue; if (0 == (it.flags & itflags)) diff --git a/src/jake2/game/GameMisc.java b/src/jake2/game/GameMisc.java index acb996a..4ec43f1 100644 --- a/src/jake2/game/GameMisc.java +++ b/src/jake2/game/GameMisc.java @@ -19,7 +19,7 @@ */ // Created on 27.12.2003 by RST. -// $Id: GameMisc.java,v 1.5 2005-11-16 22:24:53 salomo Exp $ +// $Id: GameMisc.java,v 1.6 2005-11-20 22:18:33 salomo Exp $ package jake2.game; import java.util.Calendar; @@ -904,6 +904,7 @@ public class GameMisc { //===================================================== public static EntUseAdapter Use_Areaportal = new EntUseAdapter() { + public String getID() { return "use_areaportal";} public void use(edict_t ent, edict_t other, edict_t activator) { ent.count ^= 1; // toggle state // gi.dprintf ("portalstate: %i = %i\n", ent.style, ent.count); @@ -920,6 +921,7 @@ public class GameMisc { */ static EntThinkAdapter SP_func_areaportal = new EntThinkAdapter() { + public String getID() { return "sp_func_areaportal";} public boolean think(edict_t ent) { ent.use = Use_Areaportal; ent.count = 0; // always start closed; @@ -933,6 +935,7 @@ public class GameMisc { * path_corner targeted touches it */ public static EntTouchAdapter path_corner_touch = new EntTouchAdapter() { + public String getID() { return "path_corner_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { float[] v = { 0, 0, 0 }; @@ -992,6 +995,7 @@ public class GameMisc { * going after the activator. If hold is selected, it will stay here. */ public static EntTouchAdapter point_combat_touch = new EntTouchAdapter() { + public String getID() { return "point_combat_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { edict_t activator; @@ -1050,6 +1054,7 @@ public class GameMisc { * level. Don't use */ public static EntThinkAdapter TH_viewthing = new EntThinkAdapter() { + public String getID() { return "th_viewthing";} public boolean think(edict_t ent) { ent.s.frame = (ent.s.frame + 1) % 7; ent.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1067,7 +1072,7 @@ public class GameMisc { public static final int START_OFF = 1; public static EntUseAdapter light_use = new EntUseAdapter() { - + public String getID() { return "light_use";} public void use(edict_t self, edict_t other, edict_t activator) { if ((self.spawnflags & START_OFF) != 0) { GameBase.gi.configstring(Defines.CS_LIGHTS + self.style, "m"); @@ -1094,6 +1099,7 @@ public class GameMisc { */ static EntUseAdapter func_wall_use = new EntUseAdapter() { + public String getID() { return "func_wall_use";} public void use(edict_t self, edict_t other, edict_t activator) { if (self.solid == Defines.SOLID_NOT) { self.solid = Defines.SOLID_BSP; @@ -1115,6 +1121,7 @@ public class GameMisc { * is solid bmodel that will fall if it's support it removed. */ static EntTouchAdapter func_object_touch = new EntTouchAdapter() { + public String getID() { return "func_object_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { // only squash thing we fall on top of @@ -1131,6 +1138,7 @@ public class GameMisc { }; static EntThinkAdapter func_object_release = new EntThinkAdapter() { + public String getID() { return "func_object_release";} public boolean think(edict_t self) { self.movetype = Defines.MOVETYPE_TOSS; self.touch = func_object_touch; @@ -1139,6 +1147,7 @@ public class GameMisc { }; static EntUseAdapter func_object_use = new EntUseAdapter() { + public String getID() { return "func_object_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.solid = Defines.SOLID_BSP; self.svflags &= ~Defines.SVF_NOCLIENT; @@ -1163,7 +1172,7 @@ public class GameMisc { * chunk per 25 of mass (up to 16). So 800 gives the most. */ public static EntDieAdapter func_explosive_explode = new EntDieAdapter() { - + public String getID() { return "func_explosive_explode";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { float[] origin = { 0, 0, 0 }; @@ -1231,6 +1240,7 @@ public class GameMisc { }; public static EntUseAdapter func_explosive_use = new EntUseAdapter() { + public String getID() { return "func_explosive_use";} public void use(edict_t self, edict_t other, edict_t activator) { func_explosive_explode.die(self, self, other, self.health, Globals.vec3_origin); @@ -1238,7 +1248,7 @@ public class GameMisc { }; public static EntUseAdapter func_explosive_spawn = new EntUseAdapter() { - + public String getID() { return "func_explosive_spawn";} public void use(edict_t self, edict_t other, edict_t activator) { self.solid = Defines.SOLID_BSP; self.svflags &= ~Defines.SVF_NOCLIENT; @@ -1254,7 +1264,7 @@ public class GameMisc { */ public static EntTouchAdapter barrel_touch = new EntTouchAdapter() { - + public String getID() { return "barrel_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { float ratio; @@ -1271,6 +1281,7 @@ public class GameMisc { }; public static EntThinkAdapter barrel_explode = new EntThinkAdapter() { + public String getID() { return "barrel_explode";} public boolean think(edict_t self) { float[] org = { 0, 0, 0 }; @@ -1369,6 +1380,7 @@ public class GameMisc { }; public static EntDieAdapter barrel_delay = new EntDieAdapter() { + public String getID() { return "barrel_delay";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { @@ -1388,6 +1400,7 @@ public class GameMisc { */ static EntUseAdapter misc_blackhole_use = new EntUseAdapter() { + public String getID() { return "misc_blavkhole_use";} public void use(edict_t ent, edict_t other, edict_t activator) { /* * gi.WriteByte (svc_temp_entity); gi.WriteByte (TE_BOSSTPORT); @@ -1399,6 +1412,7 @@ public class GameMisc { }; static EntThinkAdapter misc_blackhole_think = new EntThinkAdapter() { + public String getID() { return "misc_blackhole_think";} public boolean think(edict_t self) { if (++self.s.frame < 19) @@ -1416,6 +1430,7 @@ public class GameMisc { */ static EntThinkAdapter misc_eastertank_think = new EntThinkAdapter() { + public String getID() { return "misc_eastertank_think";} public boolean think(edict_t self) { if (++self.s.frame < 293) self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1432,6 +1447,7 @@ public class GameMisc { */ static EntThinkAdapter misc_easterchick_think = new EntThinkAdapter() { + public String getID() { return "misc_easterchick_think";} public boolean think(edict_t self) { if (++self.s.frame < 247) self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1447,6 +1463,7 @@ public class GameMisc { * QUAKED misc_easterchick2 (1 .5 0) (-32 -32 0) (32 32 32) */ static EntThinkAdapter misc_easterchick2_think = new EntThinkAdapter() { + public String getID() { return "misc_easterchick2_think";} public boolean think(edict_t self) { if (++self.s.frame < 287) self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1465,6 +1482,7 @@ public class GameMisc { */ public static EntThinkAdapter commander_body_think = new EntThinkAdapter() { + public String getID() { return "commander_body_think";} public boolean think(edict_t self) { if (++self.s.frame < 24) self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1479,7 +1497,7 @@ public class GameMisc { }; public static EntUseAdapter commander_body_use = new EntUseAdapter() { - + public String getID() { return "commander_body_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.think = commander_body_think; self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1489,6 +1507,7 @@ public class GameMisc { }; public static EntThinkAdapter commander_body_drop = new EntThinkAdapter() { + public String getID() { return "commander_body_group";} public boolean think(edict_t self) { self.movetype = Defines.MOVETYPE_TOSS; self.s.origin[2] += 2; @@ -1501,6 +1520,7 @@ public class GameMisc { * of the banner. The banner is 128 tall. */ static EntThinkAdapter misc_banner_think = new EntThinkAdapter() { + public String getID() { return "misc_banner_think";} public boolean think(edict_t ent) { ent.s.frame = (ent.s.frame + 1) % 16; ent.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1514,7 +1534,7 @@ public class GameMisc { * model. Comes in 6 exciting different poses! */ static EntDieAdapter misc_deadsoldier_die = new EntDieAdapter() { - + public String getID() { return "misc_deadsoldier_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -1542,6 +1562,7 @@ public class GameMisc { */ static EntUseAdapter misc_viper_use = new EntUseAdapter() { + public String getID() { return "misc_viper_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.svflags &= ~Defines.SVF_NOCLIENT; self.use = GameFunc.train_use; @@ -1554,7 +1575,7 @@ public class GameMisc { * should the bomb make? */ static EntTouchAdapter misc_viper_bomb_touch = new EntTouchAdapter() { - + public String getID() { return "misc_viper_bomb_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { GameUtil.G_UseTargets(self, self.activator); @@ -1567,6 +1588,7 @@ public class GameMisc { }; static EntThinkAdapter misc_viper_bomb_prethink = new EntThinkAdapter() { + public String getID() { return "misc_viper_bomb_prethink";} public boolean think(edict_t self) { float[] v = { 0, 0, 0 }; @@ -1590,6 +1612,7 @@ public class GameMisc { }; static EntUseAdapter misc_viper_bomb_use = new EntUseAdapter() { + public String getID() { return "misc_viper_bomb_use";} public void use(edict_t self, edict_t other, edict_t activator) { edict_t viper = null; @@ -1626,6 +1649,7 @@ public class GameMisc { */ static EntUseAdapter misc_strogg_ship_use = new EntUseAdapter() { + public String getID() { return "misc_strogg_ship_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.svflags &= ~Defines.SVF_NOCLIENT; self.use = GameFunc.train_use; @@ -1637,6 +1661,7 @@ public class GameMisc { * QUAKED misc_satellite_dish (1 .5 0) (-64 -64 0) (64 64 128) */ static EntThinkAdapter misc_satellite_dish_think = new EntThinkAdapter() { + public String getID() { return "misc_satellite_dish_think";} public boolean think(edict_t self) { self.s.frame++; if (self.s.frame < 38) @@ -1646,6 +1671,7 @@ public class GameMisc { }; static EntUseAdapter misc_satellite_dish_use = new EntUseAdapter() { + public String getID() { return "misc_satellite_dish_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.s.frame = 0; self.think = misc_satellite_dish_think; @@ -1658,6 +1684,7 @@ public class GameMisc { */ static EntUseAdapter target_string_use = new EntUseAdapter() { + public String getID() { return "target_string_use";} public void use(edict_t self, edict_t other, edict_t activator) { edict_t e; int n, l; @@ -1701,7 +1728,7 @@ public class GameMisc { public static final int CLOCK_MESSAGE_SIZE = 16; public static EntThinkAdapter func_clock_think = new EntThinkAdapter() { - + public String getID() { return "func_clock_think";} public boolean think(edict_t self) { if (null == self.enemy) { @@ -1770,7 +1797,7 @@ public class GameMisc { }; public static EntUseAdapter func_clock_use = new EntUseAdapter() { - + public String getID() { return "func_clock_use";} public void use(edict_t self, edict_t other, edict_t activator) { if (0 == (self.spawnflags & 8)) self.use = null; @@ -1784,6 +1811,7 @@ public class GameMisc { //================================================================================= static EntTouchAdapter teleporter_touch = new EntTouchAdapter() { + public String getID() { return "teleporter_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { edict_t dest; @@ -1840,6 +1868,7 @@ public class GameMisc { */ public static EntThinkAdapter SP_misc_teleporter_dest = new EntThinkAdapter() { + public String getID() { return "SP_misc_teleporter_dest";} public boolean think(edict_t ent) { GameBase.gi.setmodel(ent, "models/objects/dmspot/tris.md2"); ent.s.skinnum = 0; @@ -1853,6 +1882,7 @@ public class GameMisc { }; public static EntThinkAdapter gib_think = new EntThinkAdapter() { + public String getID() { return "gib_think";} public boolean think(edict_t self) { self.s.frame++; self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1867,6 +1897,7 @@ public class GameMisc { }; public static EntTouchAdapter gib_touch = new EntTouchAdapter() { + public String getID() { return "gib_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { float[] normal_angles = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -1894,6 +1925,7 @@ public class GameMisc { }; public static EntDieAdapter gib_die = new EntDieAdapter() { + public String getID() { return "gib_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameUtil.G_FreeEdict(self); @@ -1904,7 +1936,7 @@ public class GameMisc { * ================= debris ================= */ public static EntDieAdapter debris_die = new EntDieAdapter() { - + public String getID() { return "debris_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameUtil.G_FreeEdict(self); diff --git a/src/jake2/game/GameSave.java b/src/jake2/game/GameSave.java index 7bc7634..a1415e2 100644 --- a/src/jake2/game/GameSave.java +++ b/src/jake2/game/GameSave.java @@ -19,11 +19,12 @@ */ // Created on 29.12.2003 by RST. -// $Id: GameSave.java,v 1.9 2005-11-16 22:24:52 salomo Exp $ +// $Id: GameSave.java,v 1.10 2005-11-20 22:18:33 salomo Exp $ package jake2.game; import jake2.Defines; import jake2.Globals; +import jake2.qcommon.Com; import jake2.util.Lib; import jake2.util.QuakeFile; @@ -43,20 +44,104 @@ public class GameSave { } + private static String preloadclasslist [] = + { + "jake2.game.PlayerWeapon", + "jake2.game.AIAdapter", + "jake2.game.Cmd", + "jake2.game.EdictFindFilter", + "jake2.game.EdictIterator", + "jake2.game.EndianHandler", + "jake2.game.EntBlockedAdapter", + "jake2.game.EntDieAdapter", + "jake2.game.EntDodgeAdapter", + "jake2.game.EntInteractAdapter", + "jake2.game.EntPainAdapter", + "jake2.game.EntThinkAdapter", + "jake2.game.EntTouchAdapter", + "jake2.game.EntUseAdapter", + "jake2.game.GameAI", + "jake2.game.GameBase", + "jake2.game.GameChase", + "jake2.game.GameCombat", + "jake2.game.GameFunc", + "jake2.game.GameMisc", + "jake2.game.GameSVCmds", + "jake2.game.GameSave", + "jake2.game.GameSpawn", + "jake2.game.GameTarget", + "jake2.game.GameTrigger", + "jake2.game.GameTurret", + "jake2.game.GameUtil", + "jake2.game.GameWeapon", + "jake2.game.Info", + "jake2.game.ItemDropAdapter", + "jake2.game.ItemUseAdapter", + "jake2.game.Monster", + "jake2.game.PlayerClient", + "jake2.game.PlayerHud", + "jake2.game.PlayerTrail", + "jake2.game.PlayerView", + "jake2.game.SuperAdapter", + "jake2.game.monsters.M_Actor", + "jake2.game.monsters.M_Berserk", + "jake2.game.monsters.M_Boss2", + "jake2.game.monsters.M_Boss3", + "jake2.game.monsters.M_Boss31", + "jake2.game.monsters.M_Boss32", + "jake2.game.monsters.M_Brain", + "jake2.game.monsters.M_Chick", + "jake2.game.monsters.M_Flash", + "jake2.game.monsters.M_Flipper", + "jake2.game.monsters.M_Float", + "jake2.game.monsters.M_Flyer", + "jake2.game.monsters.M_Gladiator", + "jake2.game.monsters.M_Gunner", + "jake2.game.monsters.M_Hover", + "jake2.game.monsters.M_Infantry", + "jake2.game.monsters.M_Insane", + "jake2.game.monsters.M_Medic", + "jake2.game.monsters.M_Mutant", + "jake2.game.monsters.M_Parasite", + "jake2.game.monsters.M_Player", + "jake2.game.monsters.M_Soldier", + "jake2.game.monsters.M_Supertank", + "jake2.game.monsters.M_Tank", + "jake2.game.GameItems", + // DANGER! init as last, when all adatpers are != null + "jake2.game.GameItemList" + }; + /* - * ============ InitGame + * ============ + * InitGame * * This will be called when the dll is first loaded, which only happens when - * a new game is started or a save game is loaded. ============ + * a new game is started or a save game is loaded. + * ============ */ public static void InitGame() { GameBase.gi.dprintf("==== InitGame ====\n"); + // preload all classes to register the adapters + for ( int n=0; n < preloadclasslist.length; n++) + { + try + { + Class.forName(preloadclasslist[n]); + } + catch(Exception e) + { + Com.DPrintf("error loading class: " + e.getMessage()); + } + } + + GameBase.gun_x = GameBase.gi.cvar("gun_x", "0", 0); GameBase.gun_y = GameBase.gi.cvar("gun_y", "0", 0); GameBase.gun_z = GameBase.gi.cvar("gun_z", "0", 0); - //FIXME: sv_ prefix is wrong for these + //FIXME: sv_ prefix are wrong names for these variables GameBase.sv_rollspeed = GameBase.gi.cvar("sv_rollspeed", "200", 0); GameBase.sv_rollangle = GameBase.gi.cvar("sv_rollangle", "2", 0); GameBase.sv_maxvelocity = GameBase.gi.cvar("sv_maxvelocity", "2000", 0); @@ -244,7 +329,8 @@ public class GameSave { * The server will have cleared all of the world links before calling * ReadLevel. * - * No clients are connected yet. ================= + * No clients are connected yet. + * ================= */ public static void ReadLevel(String filename) { try { diff --git a/src/jake2/game/GameSpawn.java b/src/jake2/game/GameSpawn.java index d88f710..1f24c99 100644 --- a/src/jake2/game/GameSpawn.java +++ b/src/jake2/game/GameSpawn.java @@ -20,7 +20,7 @@ // Created on 18.11.2003 by RST. -// $Id: GameSpawn.java,v 1.13 2005-11-16 22:24:53 salomo Exp $ +// $Id: GameSpawn.java,v 1.14 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -33,6 +33,7 @@ import jake2.util.Lib; public class GameSpawn { static EntThinkAdapter SP_item_health = new EntThinkAdapter() { + public String getID(){ return "SP_item_health"; } public boolean think(edict_t ent) { GameItems.SP_item_health(ent); return true; @@ -40,6 +41,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_item_health_small = new EntThinkAdapter() { + public String getID(){ return "SP_item_health_small"; } public boolean think(edict_t ent) { GameItems.SP_item_health_small(ent); return true; @@ -47,6 +49,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_item_health_large = new EntThinkAdapter() { + public String getID(){ return "SP_item_health_large"; } public boolean think(edict_t ent) { GameItems.SP_item_health_large(ent); return true; @@ -54,6 +57,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_item_health_mega = new EntThinkAdapter() { + public String getID(){ return "SP_item_health_mega"; } public boolean think(edict_t ent) { GameItems.SP_item_health_mega(ent); return true; @@ -61,6 +65,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_info_player_start = new EntThinkAdapter() { + public String getID(){ return "SP_info_player_start"; } public boolean think(edict_t ent) { PlayerClient.SP_info_player_start(ent); return true; @@ -68,6 +73,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_info_player_deathmatch = new EntThinkAdapter() { + public String getID(){ return "SP_info_player_deathmatch"; } public boolean think(edict_t ent) { PlayerClient.SP_info_player_deathmatch(ent); return true; @@ -75,6 +81,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_info_player_coop = new EntThinkAdapter() { + public String getID(){ return "SP_info_player_coop"; } public boolean think(edict_t ent) { PlayerClient.SP_info_player_coop(ent); return true; @@ -82,6 +89,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_info_player_intermission = new EntThinkAdapter() { + public String getID(){ return "SP_info_player_intermission"; } public boolean think(edict_t ent) { PlayerClient.SP_info_player_intermission(); return true; @@ -89,6 +97,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_func_plat = new EntThinkAdapter() { + public String getID(){ return "SP_func_plat"; } public boolean think(edict_t ent) { GameFunc.SP_func_plat(ent); return true; @@ -106,6 +115,7 @@ public class GameSpawn { // static EntThinkAdapter SP_func_door_rotating = new EntThinkAdapter() // {public boolean think(edict_t ent){ return true;}}; static EntThinkAdapter SP_func_water = new EntThinkAdapter() { + public String getID(){ return "SP_func_water"; } public boolean think(edict_t ent) { GameFunc.SP_func_water(ent); return true; @@ -113,6 +123,7 @@ public class GameSpawn { }; static EntThinkAdapter SP_func_train = new EntThinkAdapter() { + public String getID(){ return "SP_func_train"; } public boolean think(edict_t ent) { GameFunc.SP_func_train(ent); return true; @@ -132,6 +143,7 @@ public class GameSpawn { // static EntThinkAdapter SP_func_areaportal = new EntThinkAdapter() {public // boolean think(edict_t ent){ return true;}}; static EntThinkAdapter SP_func_clock = new EntThinkAdapter() { + public String getID(){ return "SP_func_clock"; } public boolean think(edict_t ent) { GameMisc.SP_func_clock(ent); return true; @@ -148,6 +160,7 @@ public class GameSpawn { */ static EntThinkAdapter SP_worldspawn = new EntThinkAdapter() { + public String getID(){ return "SP_worldspawn"; } public boolean think(edict_t ent) { ent.movetype = Defines.MOVETYPE_PUSH; @@ -648,24 +661,28 @@ public class GameSpawn { new spawn_t("func_areaportal", GameMisc.SP_func_areaportal), new spawn_t("func_clock", SP_func_clock), new spawn_t("func_wall", new EntThinkAdapter() { + public String getID(){ return "func_wall"; } public boolean think(edict_t ent) { GameMisc.SP_func_wall(ent); return true; } }), new spawn_t("func_object", new EntThinkAdapter() { + public String getID(){ return "SP_func_object"; } public boolean think(edict_t ent) { GameMisc.SP_func_object(ent); return true; } }), new spawn_t("func_timer", new EntThinkAdapter() { + public String getID(){ return "SP_func_timer"; } public boolean think(edict_t ent) { GameFunc.SP_func_timer(ent); return true; } }), new spawn_t("func_explosive", new EntThinkAdapter() { + public String getID(){ return "SP_func_explosive"; } public boolean think(edict_t ent) { GameMisc.SP_func_explosive(ent); return true; @@ -673,48 +690,57 @@ public class GameSpawn { }), new spawn_t("func_killbox", GameFunc.SP_func_killbox), new spawn_t("trigger_always", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_always"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_always(ent); return true; } }), new spawn_t("trigger_once", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_once"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_once(ent); return true; } }), new spawn_t("trigger_multiple", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_multiple"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_multiple(ent); return true; } }), new spawn_t("trigger_relay", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_relay"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_relay(ent); return true; } }), new spawn_t("trigger_push", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_push"; } + public boolean think(edict_t ent) { GameTrigger.SP_trigger_push(ent); return true; } }), new spawn_t("trigger_hurt", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_hurt"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_hurt(ent); return true; } }), new spawn_t("trigger_key", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_key"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_key(ent); return true; } }), new spawn_t("trigger_counter", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_counter"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_counter(ent); return true; @@ -722,120 +748,140 @@ public class GameSpawn { }), new spawn_t("trigger_elevator", GameFunc.SP_trigger_elevator), new spawn_t("trigger_gravity", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_gravity"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_gravity(ent); return true; } }), new spawn_t("trigger_monsterjump", new EntThinkAdapter() { + public String getID(){ return "SP_trigger_monsterjump"; } public boolean think(edict_t ent) { GameTrigger.SP_trigger_monsterjump(ent); return true; } }), new spawn_t("target_temp_entity", new EntThinkAdapter() { + public String getID(){ return "SP_target_temp_entity"; } public boolean think(edict_t ent) { GameTarget.SP_target_temp_entity(ent); return true; } }), new spawn_t("target_speaker", new EntThinkAdapter() { + public String getID(){ return "SP_target_speaker"; } public boolean think(edict_t ent) { GameTarget.SP_target_speaker(ent); return true; } }), new spawn_t("target_explosion", new EntThinkAdapter() { + public String getID(){ return "SP_target_explosion"; } public boolean think(edict_t ent) { GameTarget.SP_target_explosion(ent); return true; } }), new spawn_t("target_changelevel", new EntThinkAdapter() { + public String getID(){ return "SP_target_changelevel"; } public boolean think(edict_t ent) { GameTarget.SP_target_changelevel(ent); return true; } }), new spawn_t("target_secret", new EntThinkAdapter() { + public String getID(){ return "SP_target_secret"; } public boolean think(edict_t ent) { GameTarget.SP_target_secret(ent); return true; } }), new spawn_t("target_goal", new EntThinkAdapter() { + public String getID(){ return "SP_target_goal"; } public boolean think(edict_t ent) { GameTarget.SP_target_goal(ent); return true; } }), new spawn_t("target_splash", new EntThinkAdapter() { + public String getID(){ return "SP_target_splash"; } public boolean think(edict_t ent) { GameTarget.SP_target_splash(ent); return true; } }), new spawn_t("target_spawner", new EntThinkAdapter() { + public String getID(){ return "SP_target_spawner"; } public boolean think(edict_t ent) { GameTarget.SP_target_spawner(ent); return true; } }), new spawn_t("target_blaster", new EntThinkAdapter() { + public String getID(){ return "SP_target_blaster"; } public boolean think(edict_t ent) { GameTarget.SP_target_blaster(ent); return true; } }), new spawn_t("target_crosslevel_trigger", new EntThinkAdapter() { + public String getID(){ return "SP_target_crosslevel_trigger"; } public boolean think(edict_t ent) { GameTarget.SP_target_crosslevel_trigger(ent); return true; } }), new spawn_t("target_crosslevel_target", new EntThinkAdapter() { + public String getID(){ return "SP_target_crosslevel_target"; } public boolean think(edict_t ent) { GameTarget.SP_target_crosslevel_target(ent); return true; } }), new spawn_t("target_laser", new EntThinkAdapter() { + public String getID(){ return "SP_target_laser"; } public boolean think(edict_t ent) { GameTarget.SP_target_laser(ent); return true; } }), new spawn_t("target_help", new EntThinkAdapter() { + public String getID(){ return "SP_target_help"; } public boolean think(edict_t ent) { GameTarget.SP_target_help(ent); return true; } }), new spawn_t("target_actor", new EntThinkAdapter() { + public String getID(){ return "SP_target_actor"; } public boolean think(edict_t ent) { M_Actor.SP_target_actor(ent); return true; } }), new spawn_t("target_lightramp", new EntThinkAdapter() { + public String getID(){ return "SP_target_lightramp"; } public boolean think(edict_t ent) { GameTarget.SP_target_lightramp(ent); return true; } }), new spawn_t("target_earthquake", new EntThinkAdapter() { + public String getID(){ return "SP_target_earthquake"; } public boolean think(edict_t ent) { GameTarget.SP_target_earthquake(ent); return true; } }), new spawn_t("target_character", new EntThinkAdapter() { + public String getID(){ return "SP_target_character"; } public boolean think(edict_t ent) { GameMisc.SP_target_character(ent); return true; } }), new spawn_t("target_string", new EntThinkAdapter() { + public String getID(){ return "SP_target_string"; } public boolean think(edict_t ent) { GameMisc.SP_target_string(ent); return true; @@ -843,138 +889,161 @@ public class GameSpawn { }), new spawn_t("worldspawn", SP_worldspawn), new spawn_t("viewthing", new EntThinkAdapter() { + public String getID(){ return "SP_viewthing"; } public boolean think(edict_t ent) { GameMisc.SP_viewthing(ent); return true; } }), new spawn_t("light", new EntThinkAdapter() { + public String getID(){ return "SP_light"; } public boolean think(edict_t ent) { GameMisc.SP_light(ent); return true; } }), new spawn_t("light_mine1", new EntThinkAdapter() { + public String getID(){ return "SP_light_mine1"; } public boolean think(edict_t ent) { GameMisc.SP_light_mine1(ent); return true; } }), new spawn_t("light_mine2", new EntThinkAdapter() { + public String getID(){ return "SP_light_mine2"; } public boolean think(edict_t ent) { GameMisc.SP_light_mine2(ent); return true; } }), new spawn_t("info_null", new EntThinkAdapter() { + public String getID(){ return "SP_info_null"; } public boolean think(edict_t ent) { GameMisc.SP_info_null(ent); return true; } }), new spawn_t("func_group", new EntThinkAdapter() { + public String getID(){ return "SP_info_null"; } public boolean think(edict_t ent) { GameMisc.SP_info_null(ent); return true; } }), new spawn_t("info_notnull", new EntThinkAdapter() { + public String getID(){ return "info_notnull"; } public boolean think(edict_t ent) { GameMisc.SP_info_notnull(ent); return true; } }), new spawn_t("path_corner", new EntThinkAdapter() { + public String getID(){ return "SP_path_corner"; } public boolean think(edict_t ent) { GameMisc.SP_path_corner(ent); return true; } }), new spawn_t("point_combat", new EntThinkAdapter() { + public String getID(){ return "SP_point_combat"; } public boolean think(edict_t ent) { GameMisc.SP_point_combat(ent); return true; } }), new spawn_t("misc_explobox", new EntThinkAdapter() { + public String getID(){ return "SP_misc_explobox"; } public boolean think(edict_t ent) { GameMisc.SP_misc_explobox(ent); return true; } }), new spawn_t("misc_banner", new EntThinkAdapter() { + public String getID(){ return "SP_misc_banner"; } public boolean think(edict_t ent) { GameMisc.SP_misc_banner(ent); return true; } }), new spawn_t("misc_satellite_dish", new EntThinkAdapter() { + public String getID(){ return "SP_misc_satellite_dish"; } public boolean think(edict_t ent) { GameMisc.SP_misc_satellite_dish(ent); return true; } }), new spawn_t("misc_actor", new EntThinkAdapter() { + public String getID(){ return "SP_misc_actor"; } public boolean think(edict_t ent) { M_Actor.SP_misc_actor(ent); return false; } }), new spawn_t("misc_gib_arm", new EntThinkAdapter() { + public String getID(){ return "SP_misc_gib_arm"; } public boolean think(edict_t ent) { GameMisc.SP_misc_gib_arm(ent); return true; } }), new spawn_t("misc_gib_leg", new EntThinkAdapter() { + public String getID(){ return "SP_misc_gib_leg"; } public boolean think(edict_t ent) { GameMisc.SP_misc_gib_leg(ent); return true; } }), new spawn_t("misc_gib_head", new EntThinkAdapter() { + public String getID(){ return "SP_misc_gib_head"; } public boolean think(edict_t ent) { GameMisc.SP_misc_gib_head(ent); return true; } }), new spawn_t("misc_insane", new EntThinkAdapter() { + public String getID(){ return "SP_misc_insane"; } public boolean think(edict_t ent) { M_Insane.SP_misc_insane(ent); return true; } }), new spawn_t("misc_deadsoldier", new EntThinkAdapter() { + public String getID(){ return "SP_misc_deadsoldier"; } public boolean think(edict_t ent) { GameMisc.SP_misc_deadsoldier(ent); return true; } }), new spawn_t("misc_viper", new EntThinkAdapter() { + public String getID(){ return "SP_misc_viper"; } public boolean think(edict_t ent) { GameMisc.SP_misc_viper(ent); return true; } }), new spawn_t("misc_viper_bomb", new EntThinkAdapter() { + public String getID(){ return "SP_misc_viper_bomb"; } public boolean think(edict_t ent) { GameMisc.SP_misc_viper_bomb(ent); return true; } }), new spawn_t("misc_bigviper", new EntThinkAdapter() { + public String getID(){ return "SP_misc_bigviper"; } public boolean think(edict_t ent) { GameMisc.SP_misc_bigviper(ent); return true; } }), new spawn_t("misc_strogg_ship", new EntThinkAdapter() { + public String getID(){ return "SP_misc_strogg_ship"; } public boolean think(edict_t ent) { GameMisc.SP_misc_strogg_ship(ent); return true; } }), new spawn_t("misc_teleporter", new EntThinkAdapter() { + public String getID(){ return "SP_misc_teleporter"; } public boolean think(edict_t ent) { GameMisc.SP_misc_teleporter(ent); return true; @@ -983,48 +1052,56 @@ public class GameSpawn { new spawn_t("misc_teleporter_dest", GameMisc.SP_misc_teleporter_dest), new spawn_t("misc_blackhole", new EntThinkAdapter() { + public String getID(){ return "SP_misc_blackhole"; } public boolean think(edict_t ent) { GameMisc.SP_misc_blackhole(ent); return true; } }), new spawn_t("misc_eastertank", new EntThinkAdapter() { + public String getID(){ return "SP_misc_eastertank"; } public boolean think(edict_t ent) { GameMisc.SP_misc_eastertank(ent); return true; } }), new spawn_t("misc_easterchick", new EntThinkAdapter() { + public String getID(){ return "SP_misc_easterchick"; } public boolean think(edict_t ent) { GameMisc.SP_misc_easterchick(ent); return true; } }), new spawn_t("misc_easterchick2", new EntThinkAdapter() { + public String getID(){ return "SP_misc_easterchick2"; } public boolean think(edict_t ent) { GameMisc.SP_misc_easterchick2(ent); return true; } }), new spawn_t("monster_berserk", new EntThinkAdapter() { + public String getID(){ return "SP_monster_berserk"; } public boolean think(edict_t ent) { M_Berserk.SP_monster_berserk(ent); return true; } }), new spawn_t("monster_gladiator", new EntThinkAdapter() { + public String getID(){ return "SP_monster_gladiator"; } public boolean think(edict_t ent) { M_Gladiator.SP_monster_gladiator(ent); return true; } }), new spawn_t("monster_gunner", new EntThinkAdapter() { + public String getID(){ return "SP_monster_gunner"; } public boolean think(edict_t ent) { M_Gunner.SP_monster_gunner(ent); return true; } }), new spawn_t("monster_infantry", new EntThinkAdapter() { + public String getID(){ return "SP_monster_infantry"; } public boolean think(edict_t ent) { M_Infantry.SP_monster_infantry(ent); return true; @@ -1037,16 +1114,19 @@ public class GameSpawn { new spawn_t("monster_tank", M_Tank.SP_monster_tank), new spawn_t("monster_tank_commander", M_Tank.SP_monster_tank), new spawn_t("monster_medic", new EntThinkAdapter() { + public String getID(){ return "SP_monster_medic"; } public boolean think(edict_t ent) { M_Medic.SP_monster_medic(ent); return true; } }), new spawn_t("monster_flipper", new EntThinkAdapter() { + public String getID(){ return "SP_monster_flipper"; } public boolean think(edict_t ent) { M_Flipper.SP_monster_flipper(ent); return true; } }), new spawn_t("monster_chick", new EntThinkAdapter() { + public String getID(){ return "SP_monster_chick"; } public boolean think(edict_t ent) { M_Chick.SP_monster_chick(ent); return true; @@ -1054,21 +1134,25 @@ public class GameSpawn { }), new spawn_t("monster_parasite", M_Parasite.SP_monster_parasite), new spawn_t("monster_flyer", new EntThinkAdapter() { + public String getID(){ return "SP_monster_flyer"; } public boolean think(edict_t ent) { M_Flyer.SP_monster_flyer(ent); return true; } }), new spawn_t("monster_brain", new EntThinkAdapter() { + public String getID(){ return "SP_monster_brain"; } public boolean think(edict_t ent) { M_Brain.SP_monster_brain(ent); return true; } }), new spawn_t("monster_floater", new EntThinkAdapter() { + public String getID(){ return "SP_monster_floater"; } public boolean think(edict_t ent) { M_Float.SP_monster_floater(ent); return true; } }), new spawn_t("monster_hover", new EntThinkAdapter() { + public String getID(){ return "SP_monster_hover"; } public boolean think(edict_t ent) { M_Hover.SP_monster_hover(ent); return true; @@ -1076,36 +1160,43 @@ public class GameSpawn { }), new spawn_t("monster_mutant", M_Mutant.SP_monster_mutant), new spawn_t("monster_supertank", M_Supertank.SP_monster_supertank), new spawn_t("monster_boss2", new EntThinkAdapter() { + public String getID(){ return "SP_monster_boss2"; } public boolean think(edict_t ent) { M_Boss2.SP_monster_boss2(ent); return true; } }), new spawn_t("monster_boss3_stand", new EntThinkAdapter() { + public String getID(){ return "SP_monster_boss3_stand"; } public boolean think(edict_t ent) { M_Boss3.SP_monster_boss3_stand(ent); return true; } }), new spawn_t("monster_jorg", new EntThinkAdapter() { + public String getID(){ return "SP_monster_jorg"; } public boolean think(edict_t ent) { M_Boss31.SP_monster_jorg(ent); return true; } }), new spawn_t("monster_commander_body", new EntThinkAdapter() { + public String getID(){ return "SP_monster_commander_body"; } public boolean think(edict_t ent) { GameMisc.SP_monster_commander_body(ent); return true; } }), new spawn_t("turret_breach", new EntThinkAdapter() { + public String getID(){ return "SP_turret_breach"; } public boolean think(edict_t ent) { GameTurret.SP_turret_breach(ent); return true; } }), new spawn_t("turret_base", new EntThinkAdapter() { + public String getID(){ return "SP_turret_base"; } public boolean think(edict_t ent) { GameTurret.SP_turret_base(ent); return true; } }), new spawn_t("turret_driver", new EntThinkAdapter() { + public String getID(){ return "SP_turret_driver"; } public boolean think(edict_t ent) { GameTurret.SP_turret_driver(ent); return true; @@ -1130,7 +1221,7 @@ public class GameSpawn { } // check item spawn functions for (i = 1; i < GameBase.game.num_items; i++) { - item = GameItems.itemlist[i]; + item = GameItemList.itemlist[i]; if (item == null) GameBase.gi.error("ED_CallSpawn: null item in pos " + i); 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; diff --git a/src/jake2/game/GameTrigger.java b/src/jake2/game/GameTrigger.java index 288cd25..03fb553 100644 --- a/src/jake2/game/GameTrigger.java +++ b/src/jake2/game/GameTrigger.java @@ -20,7 +20,7 @@ // Created on 27.12.2003 by RST. -// $Id: GameTrigger.java,v 1.5 2005-11-16 22:24:52 salomo Exp $ +// $Id: GameTrigger.java,v 1.6 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -243,6 +243,7 @@ public class GameTrigger { // the wait time has passed, so set back up for another activation public static EntThinkAdapter multi_wait = new EntThinkAdapter() { + public String getID(){ return "multi_wait"; } public boolean think(edict_t ent) { ent.nextthink = 0; @@ -251,6 +252,7 @@ public class GameTrigger { }; static EntUseAdapter Use_Multi = new EntUseAdapter() { + public String getID(){ return "Use_Multi"; } public void use(edict_t ent, edict_t other, edict_t activator) { ent.activator = activator; multi_trigger(ent); @@ -258,6 +260,7 @@ public class GameTrigger { }; static EntTouchAdapter Touch_Multi = new EntTouchAdapter() { + public String getID(){ return "Touch_Multi"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (other.client != null) { @@ -290,6 +293,7 @@ public class GameTrigger { * 1) secret 2) beep beep 3) large switch 4) set "message" to text string */ static EntUseAdapter trigger_enable = new EntUseAdapter() { + public String getID(){ return "trigger_enable"; } public void use(edict_t self, edict_t other, edict_t activator) { self.solid = Defines.SOLID_TRIGGER; self.use = Use_Multi; @@ -302,6 +306,7 @@ public class GameTrigger { * trigger cannot be touched, it can only be fired by other events. */ public static EntUseAdapter trigger_relay_use = new EntUseAdapter() { + public String getID(){ return "trigger_relay_use"; } public void use(edict_t self, edict_t other, edict_t activator) { GameUtil.G_UseTargets(self, activator); } @@ -322,6 +327,7 @@ public class GameTrigger { */ static EntUseAdapter trigger_key_use = new EntUseAdapter() { + public String getID(){ return "trigger_key_use"; } public void use(edict_t self, edict_t other, edict_t activator) { int index; @@ -406,6 +412,7 @@ public class GameTrigger { * fire all of it's targets and remove itself. */ static EntUseAdapter trigger_counter_use = new EntUseAdapter() { + public String getID(){ return "trigger_counter_use"; } public void use(edict_t self, edict_t other, edict_t activator) { if (self.count == 0) @@ -447,6 +454,7 @@ public class GameTrigger { public static int windsound; static EntTouchAdapter trigger_push_touch = new EntTouchAdapter() { + public String getID(){ return "trigger_push_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (Lib.strcmp(other.classname, "grenade") == 0) { @@ -492,6 +500,7 @@ public class GameTrigger { * */ static EntUseAdapter hurt_use = new EntUseAdapter() { + public String getID(){ return "hurt_use"; } public void use(edict_t self, edict_t other, edict_t activator) { if (self.solid == Defines.SOLID_NOT) @@ -506,6 +515,7 @@ public class GameTrigger { }; static EntTouchAdapter hurt_touch = new EntTouchAdapter() { + public String getID(){ return "hurt_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { int dflags; @@ -551,6 +561,7 @@ public class GameTrigger { */ static EntTouchAdapter trigger_gravity_touch = new EntTouchAdapter() { + public String getID(){ return "trigger_gravity_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { @@ -574,6 +585,7 @@ public class GameTrigger { */ static EntTouchAdapter trigger_monsterjump_touch = new EntTouchAdapter() { + public String getID(){ return "trigger_monsterjump_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if ((other.flags & (Defines.FL_FLY | Defines.FL_SWIM)) != 0) diff --git a/src/jake2/game/GameTurret.java b/src/jake2/game/GameTurret.java index 1c95050..a72a48e 100644 --- a/src/jake2/game/GameTurret.java +++ b/src/jake2/game/GameTurret.java @@ -19,7 +19,7 @@ */ // Created on 28.12.2003 by RST. -// $Id: GameTurret.java,v 1.5 2005-11-16 22:24:53 salomo Exp $ +// $Id: GameTurret.java,v 1.6 2005-11-20 22:18:34 salomo Exp $ package jake2.game; import jake2.*; @@ -179,7 +179,7 @@ public class GameTurret { } static EntBlockedAdapter turret_blocked = new EntBlockedAdapter() { - + public String getID() { return "turret_blocked"; } public void blocked(edict_t self, edict_t other) { edict_t attacker; @@ -196,6 +196,7 @@ public class GameTurret { }; static EntThinkAdapter turret_breach_think = new EntThinkAdapter() { + public String getID() { return "turret_breach_think"; } public boolean think(edict_t self) { edict_t ent; @@ -313,6 +314,7 @@ public class GameTurret { }; static EntThinkAdapter turret_breach_finish_init = new EntThinkAdapter() { + public String getID() { return "turret_breach_finish_init"; } public boolean think(edict_t self) { // get and save info for muzzle location @@ -339,6 +341,7 @@ public class GameTurret { * turret_breach. */ static EntDieAdapter turret_driver_die = new EntDieAdapter() { + public String getID() { return "turret_driver_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { @@ -364,6 +367,7 @@ public class GameTurret { }; static EntThinkAdapter turret_driver_think = new EntThinkAdapter() { + public String getID() { return "turret_driver_think"; } public boolean think(edict_t self) { float[] target = { 0, 0, 0 }; @@ -416,6 +420,7 @@ public class GameTurret { }; public static EntThinkAdapter turret_driver_link = new EntThinkAdapter() { + public String getID() { return "turret_driver_link"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; diff --git a/src/jake2/game/GameUtil.java b/src/jake2/game/GameUtil.java index a978818..535f1ff 100644 --- a/src/jake2/game/GameUtil.java +++ b/src/jake2/game/GameUtil.java @@ -20,7 +20,7 @@ // Created on 01.11.2003 by RST. -// $Id: GameUtil.java,v 1.13 2005-11-16 22:24:52 salomo Exp $ +// $Id: GameUtil.java,v 1.14 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -579,6 +579,7 @@ public class GameUtil { } public static EntThinkAdapter Think_Delay = new EntThinkAdapter() { + public String getID() { return "Think_Delay"; } public boolean think(edict_t ent) { G_UseTargets(ent, ent.activator); G_FreeEdict(ent); @@ -587,6 +588,7 @@ public class GameUtil { }; public static EntThinkAdapter G_FreeEdictA = new EntThinkAdapter() { + public String getID() { return "G_FreeEdictA"; } public boolean think(edict_t ent) { G_FreeEdict(ent); return false; @@ -594,6 +596,7 @@ public class GameUtil { }; static EntThinkAdapter MegaHealth_think = new EntThinkAdapter() { + public String getID() { return "MegaHealth_think"; } public boolean think(edict_t self) { if (self.owner.health > self.owner.max_health) { self.nextthink = GameBase.level.time + 1; @@ -638,6 +641,7 @@ public class GameUtil { // } // ============================================================================ public static EntThinkAdapter M_CheckAttack = new EntThinkAdapter() { + public String getID() { return "M_CheckAttack"; } public boolean think(edict_t self) { float[] spot1 = { 0, 0, 0 }; @@ -723,6 +727,7 @@ public class GameUtil { }; static EntUseAdapter monster_use = new EntUseAdapter() { + public String getID() { return "monster_use"; } public void use(edict_t self, edict_t other, edict_t activator) { if (self.enemy != null) return; diff --git a/src/jake2/game/GameWeapon.java b/src/jake2/game/GameWeapon.java index f0c1446..d908b2b 100644 --- a/src/jake2/game/GameWeapon.java +++ b/src/jake2/game/GameWeapon.java @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on on 12.11.2003 by RST. -// $Id: GameWeapon.java,v 1.5 2005-11-16 22:24:52 salomo Exp $ +// $Id: GameWeapon.java,v 1.6 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -37,6 +37,7 @@ import jake2.util.Math3D; public class GameWeapon { static EntTouchAdapter blaster_touch = new EntTouchAdapter() { + public String getID() { return "blaster_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { @@ -87,6 +88,7 @@ public class GameWeapon { }; static EntThinkAdapter Grenade_Explode = new EntThinkAdapter() { + public String getID() { return "Grenade_Explode"; } public boolean think(edict_t ent) { float[] origin = { 0, 0, 0 }; int mod; @@ -146,6 +148,7 @@ public class GameWeapon { } }; static EntTouchAdapter Grenade_Touch = new EntTouchAdapter() { + public String getID() { return "Grenade_Touch"; } public void touch(edict_t ent, edict_t other, cplane_t plane, csurface_t surf) { if (other == ent.owner) @@ -185,6 +188,7 @@ public class GameWeapon { * ================= */ static EntTouchAdapter rocket_touch = new EntTouchAdapter() { + public String getID() { return "rocket_touch"; } public void touch(edict_t ent, edict_t other, cplane_t plane, csurface_t surf) { float[] origin = { 0, 0, 0 }; @@ -245,6 +249,7 @@ public class GameWeapon { * ================= */ static EntThinkAdapter bfg_explode = new EntThinkAdapter() { + public String getID() { return "bfg_explode"; } public boolean think(edict_t self) { edict_t ent; float points; @@ -297,6 +302,7 @@ public class GameWeapon { }; static EntTouchAdapter bfg_touch = new EntTouchAdapter() { + public String getID() { return "bfg_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { if (other == self.owner) @@ -343,6 +349,7 @@ public class GameWeapon { }; static EntThinkAdapter bfg_think = new EntThinkAdapter() { + public String getID() { return "bfg_think"; } public boolean think(edict_t self) { edict_t ent; edict_t ignore; diff --git a/src/jake2/game/ItemDropAdapter.java b/src/jake2/game/ItemDropAdapter.java index 4078fcd..aafcb44 100644 --- a/src/jake2/game/ItemDropAdapter.java +++ b/src/jake2/game/ItemDropAdapter.java @@ -19,11 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 08.11.2003 by RST. -// $Id: ItemDropAdapter.java,v 1.1 2004-07-07 19:59:07 hzi Exp $ +// $Id: ItemDropAdapter.java,v 1.2 2005-11-20 22:18:33 salomo Exp $ package jake2.game; -public class ItemDropAdapter extends SuperAdapter { - void drop(edict_t ent, gitem_t item) { +public abstract class ItemDropAdapter extends SuperAdapter { + public void drop(edict_t ent, gitem_t item) { } } diff --git a/src/jake2/game/ItemUseAdapter.java b/src/jake2/game/ItemUseAdapter.java index 71c0ebf..dfe6a9d 100644 --- a/src/jake2/game/ItemUseAdapter.java +++ b/src/jake2/game/ItemUseAdapter.java @@ -19,11 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 08.11.2003 by RST. -// $Id: ItemUseAdapter.java,v 1.1 2004-07-07 19:59:07 hzi Exp $ +// $Id: ItemUseAdapter.java,v 1.2 2005-11-20 22:18:33 salomo Exp $ package jake2.game; -class ItemUseAdapter extends SuperAdapter { +public abstract class ItemUseAdapter extends SuperAdapter { public void use(edict_t ent, gitem_t item) { } }
\ No newline at end of file diff --git a/src/jake2/game/Monster.java b/src/jake2/game/Monster.java index fe97728..491caff 100644 --- a/src/jake2/game/Monster.java +++ b/src/jake2/game/Monster.java @@ -19,7 +19,7 @@ */ // Created on 17.12.2003 by RST. -// $Id: Monster.java,v 1.6 2005-11-16 22:24:53 salomo Exp $ +// $Id: Monster.java,v 1.7 2005-11-20 22:18:33 salomo Exp $ package jake2.game; import jake2.Defines; @@ -294,6 +294,7 @@ public class Monster { } public static EntThinkAdapter monster_think = new EntThinkAdapter() { + public String getID() { return "monster_think";} public boolean think(edict_t self) { M.M_MoveFrame(self); @@ -309,6 +310,7 @@ public class Monster { }; public static EntThinkAdapter monster_triggered_spawn = new EntThinkAdapter() { + public String getID() { return "monster_trigger_spawn";} public boolean think(edict_t self) { self.s.origin[2] += 1; @@ -335,7 +337,7 @@ public class Monster { // we have a one frame delay here so we don't telefrag the guy who activated // us public static EntUseAdapter monster_triggered_spawn_use = new EntUseAdapter() { - + public String getID() { return "monster_trigger_spawn_use";} public void use(edict_t self, edict_t other, edict_t activator) { self.think = monster_triggered_spawn; self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -346,6 +348,7 @@ public class Monster { }; public static EntThinkAdapter monster_triggered_start = new EntThinkAdapter() { + public String getID() { return "monster_triggered_start";} public boolean think(edict_t self) { if (self.index == 312) Com.Printf("monster_triggered_start\n"); diff --git a/src/jake2/game/PlayerClient.java b/src/jake2/game/PlayerClient.java index fd17829..b14f691 100644 --- a/src/jake2/game/PlayerClient.java +++ b/src/jake2/game/PlayerClient.java @@ -20,7 +20,7 @@ // Created on 28.12.2003 by RST. -// $Id: PlayerClient.java,v 1.10 2005-11-16 22:24:52 salomo Exp $ +// $Id: PlayerClient.java,v 1.11 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -39,6 +39,7 @@ public class PlayerClient { * ================== */ static EntDieAdapter player_die = new EntDieAdapter() { + public String getID() { return "player_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -75,7 +76,7 @@ public class PlayerClient { // coop for (n = 0; n < GameBase.game.num_items; n++) { if (GameBase.coop.value != 0 - && (GameItems.itemlist[n].flags & Defines.IT_KEY) != 0) + && (GameItemList.itemlist[n].flags & Defines.IT_KEY) != 0) self.client.resp.coop_respawn.inventory[n] = self.client.pers.inventory[n]; self.client.pers.inventory[n] = 0; } @@ -136,6 +137,7 @@ public class PlayerClient { } }; static EntThinkAdapter SP_FixCoopSpots = new EntThinkAdapter() { + public String getID() { return "SP_FixCoopSpots"; } public boolean think(edict_t self) { edict_t spot; @@ -171,6 +173,7 @@ public class PlayerClient { } }; static EntThinkAdapter SP_CreateCoopSpots = new EntThinkAdapter() { + public String getID() { return "SP_CreateCoopSpots"; } public boolean think(edict_t self) { edict_t spot; @@ -205,10 +208,12 @@ public class PlayerClient { }; // player pain is handled at the end of the frame in P_DamageFeedback static EntPainAdapter player_pain = new EntPainAdapter() { + public String getID() { return "player_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { } }; static EntDieAdapter body_die = new EntDieAdapter() { + public String getID() { return "body_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { diff --git a/src/jake2/game/PlayerHud.java b/src/jake2/game/PlayerHud.java index ff42d1a..0766b23 100644 --- a/src/jake2/game/PlayerHud.java +++ b/src/jake2/game/PlayerHud.java @@ -19,7 +19,7 @@ */ // Created on 28.12.2003 by RST. -// $Id: PlayerHud.java,v 1.8 2005-11-16 22:24:52 salomo Exp $ +// $Id: PlayerHud.java,v 1.9 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -110,10 +110,10 @@ public class PlayerHud { if (!client.inuse) continue; // strip players of all keys between units - for (n = 1; n < GameItems.itemlist.length; n++) { + for (n = 1; n < GameItemList.itemlist.length; n++) { // null pointer exception fixed. (RST) - if (GameItems.itemlist[n] != null) - if ((GameItems.itemlist[n].flags & Defines.IT_KEY) != 0) + if (GameItemList.itemlist[n] != null) + if ((GameItemList.itemlist[n].flags & Defines.IT_KEY) != 0) client.client.pers.inventory[n] = 0; } } @@ -316,7 +316,7 @@ public class PlayerHud { ent.client.ps.stats[Defines.STAT_AMMO_ICON] = 0; ent.client.ps.stats[Defines.STAT_AMMO] = 0; } else { - item = GameItems.itemlist[ent.client.ammo_index]; + item = GameItemList.itemlist[ent.client.ammo_index]; ent.client.ps.stats[Defines.STAT_AMMO_ICON] = (short) GameBase.gi .imageindex(item.icon); ent.client.ps.stats[Defines.STAT_AMMO] = (short) ent.client.pers.inventory[ent.client.ammo_index]; @@ -403,7 +403,7 @@ public class PlayerHud { ent.client.ps.stats[Defines.STAT_SELECTED_ICON] = 0; else ent.client.ps.stats[Defines.STAT_SELECTED_ICON] = (short) GameBase.gi - .imageindex(GameItems.itemlist[ent.client.pers.selected_item].icon); + .imageindex(GameItemList.itemlist[ent.client.pers.selected_item].icon); ent.client.ps.stats[Defines.STAT_SELECTED_ITEM] = (short) ent.client.pers.selected_item; diff --git a/src/jake2/game/PlayerWeapon.java b/src/jake2/game/PlayerWeapon.java index f994568..1b9cca3 100644 --- a/src/jake2/game/PlayerWeapon.java +++ b/src/jake2/game/PlayerWeapon.java @@ -20,7 +20,7 @@ // Created on 16.11.2003 by RST. -// $Id: PlayerWeapon.java,v 1.1 2005-11-16 22:24:53 salomo Exp $ +// $Id: PlayerWeapon.java,v 1.2 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -34,6 +34,7 @@ import jake2.util.Math3D; public class PlayerWeapon { public static EntThinkAdapter Weapon_Grenade = new EntThinkAdapter() { + public String getID() { return "Weapon_Grenade"; } public boolean think(edict_t ent) { if ((ent.client.newweapon != null) @@ -145,6 +146,7 @@ public class PlayerWeapon { */ public static EntThinkAdapter weapon_grenadelauncher_fire = new EntThinkAdapter() { + public String getID() { return "weapon_grenadelauncher_fire"; } public boolean think(edict_t ent) { float[] offset = { 0, 0, 0 }; @@ -184,6 +186,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_GrenadeLauncher = new EntThinkAdapter() { + public String getID() { return "Weapon_GrenadeLauncher"; } public boolean think(edict_t ent) { @@ -205,6 +208,7 @@ public class PlayerWeapon { */ public static EntThinkAdapter Weapon_RocketLauncher_Fire = new EntThinkAdapter() { + public String getID() { return "Weapon_RocketLauncher_Fire"; } public boolean think(edict_t ent) { @@ -252,6 +256,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_RocketLauncher = new EntThinkAdapter() { + public String getID() { return "Weapon_RocketLauncher"; } public boolean think(edict_t ent) { @@ -265,6 +270,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Blaster_Fire = new EntThinkAdapter() { + public String getID() { return "Weapon_Blaster_Fire"; } public boolean think(edict_t ent) { @@ -282,6 +288,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Blaster = new EntThinkAdapter() { + public String getID() { return "Weapon_Blaster"; } public boolean think(edict_t ent) { @@ -295,6 +302,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_HyperBlaster_Fire = new EntThinkAdapter() { + public String getID() { return "Weapon_HyperBlaster_Fire"; } public boolean think(edict_t ent) { float rotation; @@ -365,6 +373,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_HyperBlaster = new EntThinkAdapter() { + public String getID() { return "Weapon_HyperBlaster"; } public boolean think(edict_t ent) { int pause_frames[] = { 0 }; @@ -377,6 +386,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Machinegun = new EntThinkAdapter() { + public String getID() { return "Weapon_Machinegun"; } public boolean think(edict_t ent) { int pause_frames[] = { 23, 45, 0 }; @@ -389,6 +399,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Chaingun = new EntThinkAdapter() { + public String getID() { return "Weapon_Chaingun"; } public boolean think(edict_t ent) { int pause_frames[] = { 38, 43, 51, 61, 0 }; @@ -410,6 +421,7 @@ public class PlayerWeapon { */ public static EntThinkAdapter weapon_shotgun_fire = new EntThinkAdapter() { + public String getID() { return "weapon_shotgun_fire"; } public boolean think(edict_t ent) { @@ -464,6 +476,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Shotgun = new EntThinkAdapter() { + public String getID() { return "Weapon_Shotgun"; } public boolean think(edict_t ent) { int pause_frames[] = { 22, 28, 34, 0 }; int fire_frames[] = { 8, 9, 0 }; @@ -475,6 +488,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter weapon_supershotgun_fire = new EntThinkAdapter() { + public String getID() { return "weapon_supershotgun_fire"; } public boolean think(edict_t ent) { @@ -532,6 +546,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_SuperShotgun = new EntThinkAdapter() { + public String getID() { return "Weapon_SuperShotgun"; } public boolean think(edict_t ent) { int pause_frames[] = { 29, 42, 57, 0 }; @@ -551,6 +566,7 @@ public class PlayerWeapon { * ====================================================================== */ public static EntThinkAdapter weapon_railgun_fire = new EntThinkAdapter() { + public String getID() { return "weapon_railgun_fire"; } public boolean think(edict_t ent) { @@ -602,6 +618,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_Railgun = new EntThinkAdapter() { + public String getID() { return "Weapon_Railgun"; } public boolean think(edict_t ent) { @@ -622,6 +639,7 @@ public class PlayerWeapon { */ public static EntThinkAdapter weapon_bfg_fire = new EntThinkAdapter() { + public String getID() { return "weapon_bfg_fire"; } public boolean think(edict_t ent) { @@ -685,6 +703,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Weapon_BFG = new EntThinkAdapter() { + public String getID() { return "Weapon_BFG"; } public boolean think(edict_t ent) { Weapon_Generic(ent, 8, 32, 55, 58, pause_frames, fire_frames, @@ -706,6 +725,7 @@ public class PlayerWeapon { * ================ */ public static ItemUseAdapter Use_Weapon = new ItemUseAdapter() { + public String getID() { return "Use_Weapon"; } public void use(edict_t ent, gitem_t item) { int ammo_index; @@ -748,6 +768,7 @@ public class PlayerWeapon { */ public static ItemDropAdapter Drop_Weapon = new ItemDropAdapter() { + public String getID() { return "Drop_Weapon"; } public void drop(edict_t ent, gitem_t item) { int index; @@ -777,6 +798,7 @@ public class PlayerWeapon { */ public static EntThinkAdapter Machinegun_Fire = new EntThinkAdapter() { + public String getID() { return "Machinegun_Fire"; } public boolean think(edict_t ent) { @@ -868,6 +890,7 @@ public class PlayerWeapon { }; public static EntThinkAdapter Chaingun_Fire = new EntThinkAdapter() { + public String getID() { return "Chaingun_Fire"; } public boolean think(edict_t ent) { @@ -994,6 +1017,7 @@ public class PlayerWeapon { public static int fire_frames[] = { 9, 17, 0 }; public static EntInteractAdapter Pickup_Weapon = new EntInteractAdapter() { + public String getID() { return "Pickup_Weapon"; } public boolean interact(edict_t ent, edict_t other) { int index; gitem_t ammo; diff --git a/src/jake2/game/SuperAdapter.java b/src/jake2/game/SuperAdapter.java index bfbf7db..2cbd292 100644 --- a/src/jake2/game/SuperAdapter.java +++ b/src/jake2/game/SuperAdapter.java @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 09.01.2004 by RST. -// $Id: SuperAdapter.java,v 1.7 2005-02-08 17:58:46 cawe Exp $ +// $Id: SuperAdapter.java,v 1.8 2005-11-20 22:18:33 salomo Exp $ package jake2.game; @@ -28,10 +28,17 @@ import jake2.qcommon.Com; import java.util.Hashtable; import java.util.Vector; -public class SuperAdapter { +public abstract class SuperAdapter { + + /** Constructor, does the adapter registration. */ + public SuperAdapter() { + register(this, getID()); + } /** Adapter registration. */ private static void register(SuperAdapter sa, String id) { + if (id.length()==0) + Math.sin(0.1); adapters.put(id, sa); } @@ -45,45 +52,11 @@ public class SuperAdapter { // try to create the adapter if (sa == null) { Com.DPrintf("SuperAdapter.getFromID():adapter not found->" + key + "\n"); - int pos= key.indexOf('$'); - String classname= key; - if (pos != -1) - classname= key.substring(0, pos); - - // load class and instantiate - try { - Com.DPrintf("SuperAdapter.getFromID():loading class->" + classname + "\n"); - Class.forName(classname); - } - catch (Exception e) { - Com.DPrintf("SuperAdapter.getFromID():class not found->" + classname + "\n"); - } - - // try it again... - sa= (SuperAdapter) adapters.get(key); - - if (sa == null) - Com.DPrintf("jake2: could not load adapter:" + key + "\n"); } return sa; } - /** Constructor, does the adapter registration. */ - public SuperAdapter() { - StackTraceElement tr[]= new Throwable().getStackTrace(); - adapterid= tr[2].getClassName(); - if (adapterid.length() == 0) - new Throwable("error in creating an adapter id!").printStackTrace(); - else - register(this, adapterid); - } - /** Returns the Adapter-ID. */ - public String getID() { - return adapterid; - } - - /** Adapter id. */ - private String adapterid; + public abstract String getID(); } diff --git a/src/jake2/game/monsters/M_Actor.java b/src/jake2/game/monsters/M_Actor.java index 8430e27..9aae1fc 100644 --- a/src/jake2/game/monsters/M_Actor.java +++ b/src/jake2/game/monsters/M_Actor.java @@ -19,7 +19,7 @@ */ // Created on 11.11.2003 by RST. -// $Id: M_Actor.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Actor.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -1014,6 +1014,7 @@ public class M_Actor { "Adrianator", "Rambear", "Titus", "Bitterman" }; static EntThinkAdapter actor_stand = new EntThinkAdapter() { + public String getID() { return "actor_stand";} public boolean think(edict_t self) { self.monsterinfo.currentmove = actor_move_stand; @@ -1088,6 +1089,7 @@ public class M_Actor { actor_frames_walk, null); static EntThinkAdapter actor_walk = new EntThinkAdapter() { + public String getID() { return "actor_walk";} public boolean think(edict_t self) { self.monsterinfo.currentmove = actor_move_walk; return true; @@ -1112,6 +1114,7 @@ public class M_Actor { actor_frames_run, null); static EntThinkAdapter actor_run = new EntThinkAdapter() { + public String getID() { return "actor_run";} public boolean think(edict_t self) { if ((GameBase.level.time < self.pain_debounce_time) && (self.enemy == null)) { @@ -1202,6 +1205,7 @@ public class M_Actor { "Check your targets" }; static EntPainAdapter actor_pain = new EntPainAdapter() { + public String getID() { return "actor_pain";} public void pain(edict_t self, edict_t other, float kick, int damage) { int n; @@ -1247,6 +1251,7 @@ public class M_Actor { }; static EntThinkAdapter actor_dead = new EntThinkAdapter() { + public String getID() { return "actor_dead";} public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -1289,6 +1294,7 @@ public class M_Actor { FRAME_death213, actor_frames_death2, actor_dead); static EntDieAdapter actor_die = new EntDieAdapter() { + public String getID() { return "actor_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -1327,6 +1333,7 @@ public class M_Actor { }; static EntThinkAdapter actor_fire = new EntThinkAdapter() { + public String getID() { return "actor_fire";} public boolean think(edict_t self) { actorMachineGun(self); @@ -1349,6 +1356,7 @@ public class M_Actor { FRAME_attak04, actor_frames_attack, actor_run); static EntThinkAdapter actor_attack = new EntThinkAdapter() { + public String getID() { return "actor_attack";} public boolean think(edict_t self) { int n; @@ -1362,6 +1370,7 @@ public class M_Actor { }; static EntUseAdapter actor_use = new EntUseAdapter() { + public String getID() { return "actor_use";} public void use(edict_t self, edict_t other, edict_t activator) { float v[] = { 0, 0, 0 }; @@ -1401,6 +1410,7 @@ public class M_Actor { */ static EntTouchAdapter target_actor_touch = new EntTouchAdapter() { + public String getID() { return "target_actor_touch";} public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { float v[] = { 0, 0, 0 }; diff --git a/src/jake2/game/monsters/M_Berserk.java b/src/jake2/game/monsters/M_Berserk.java index 9f5fa59..dc4e79a 100644 --- a/src/jake2/game/monsters/M_Berserk.java +++ b/src/jake2/game/monsters/M_Berserk.java @@ -20,7 +20,7 @@ // Created on 11.11.2003 by RST -// $Id: M_Berserk.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Berserk.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; @@ -534,6 +534,7 @@ public class M_Berserk { static int sound_search; static EntInteractAdapter berserk_sight = new EntInteractAdapter() { + public String getID() { return "berserk_sight";} public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -542,6 +543,7 @@ public class M_Berserk { }; static EntThinkAdapter berserk_search = new EntThinkAdapter() { + public String getID() { return "berserk_search";} public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search, 1, Defines.ATTN_NORM, 0); @@ -550,6 +552,7 @@ public class M_Berserk { }; static EntThinkAdapter berserk_fidget = new EntThinkAdapter() { + public String getID() { return "berserk_fidget";} public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) return true; @@ -575,6 +578,7 @@ public class M_Berserk { berserk_frames_stand, null); static EntThinkAdapter berserk_stand = new EntThinkAdapter() { + public String getID() { return "berserk_stand";} public boolean think(edict_t self) { self.monsterinfo.currentmove = berserk_move_stand; return true; @@ -624,6 +628,7 @@ public class M_Berserk { berserk_frames_walk, null); static EntThinkAdapter berserk_walk = new EntThinkAdapter() { + public String getID() { return "berserk_walk";} public boolean think(edict_t self) { self.monsterinfo.currentmove = berserk_move_walk; return true; @@ -664,6 +669,7 @@ public class M_Berserk { berserk_frames_run1, null); static EntThinkAdapter berserk_run = new EntThinkAdapter() { + public String getID() { return "berserk_run";} public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = berserk_move_stand; @@ -674,6 +680,7 @@ public class M_Berserk { }; static EntThinkAdapter berserk_attack_spike = new EntThinkAdapter() { + public String getID() { return "berserk_attack_spike";} public boolean think(edict_t self) { float[] aim = { Defines.MELEE_DISTANCE, 0f, -24f }; @@ -685,6 +692,7 @@ public class M_Berserk { }; static EntThinkAdapter berserk_swing = new EntThinkAdapter() { + public String getID() { return "berserk_swing";} public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_punch, 1, Defines.ATTN_NORM, 0); @@ -706,6 +714,7 @@ public class M_Berserk { FRAME_att_c8, berserk_frames_attack_spike, berserk_run); static EntThinkAdapter berserk_attack_club = new EntThinkAdapter() { + public String getID() { return "berserk_attack_club";} public boolean think(edict_t self) { float aim[] = { 0, 0, 0 }; @@ -735,6 +744,7 @@ public class M_Berserk { FRAME_att_c20, berserk_frames_attack_club, berserk_run); static EntThinkAdapter berserk_strike = new EntThinkAdapter() { + public String getID() { return "berserk_strike";} public boolean think(edict_t self) { return true; } @@ -760,6 +770,7 @@ public class M_Berserk { FRAME_att_c34, berserk_frames_attack_strike, berserk_run); static EntThinkAdapter berserk_melee = new EntThinkAdapter() { + public String getID() { return "berserk_melee";} public boolean think(edict_t self) { if ((Lib.rand() % 2) == 0) self.monsterinfo.currentmove = berserk_move_attack_spike; @@ -825,6 +836,7 @@ public class M_Berserk { FRAME_painb20, berserk_frames_pain2, berserk_run); static EntPainAdapter berserk_pain = new EntPainAdapter() { + public String getID() { return "berserk_pain";} public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -847,6 +859,7 @@ public class M_Berserk { }; static EntThinkAdapter berserk_dead = new EntThinkAdapter() { + public String getID() { return "berserk_dead";} public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -890,6 +903,7 @@ public class M_Berserk { FRAME_deathc8, berserk_frames_death2, berserk_dead); static EntDieAdapter berserk_die = new EntDieAdapter() { + public String getID() { return "berserk_die";} public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float point[]) { int n; diff --git a/src/jake2/game/monsters/M_Boss2.java b/src/jake2/game/monsters/M_Boss2.java index 5633398..c77e6ce 100644 --- a/src/jake2/game/monsters/M_Boss2.java +++ b/src/jake2/game/monsters/M_Boss2.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Boss2.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Boss2.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -414,6 +414,7 @@ public class M_Boss2 { static int sound_search1; static EntThinkAdapter boss2_stand = new EntThinkAdapter() { + public String getID() { return "boss2_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = boss2_move_stand; return true; @@ -421,6 +422,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_run = new EntThinkAdapter() { + public String getID() { return "boss2_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = boss2_move_stand; @@ -431,6 +433,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_walk = new EntThinkAdapter() { + public String getID() { return "boss2_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = boss2_move_stand; @@ -440,6 +443,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_attack = new EntThinkAdapter() { + public String getID() { return "boss2_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; @@ -461,6 +465,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_attack_mg = new EntThinkAdapter() { + public String getID() { return "boss2_attack_mg"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = boss2_move_attack_mg; return true; @@ -468,6 +473,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_reattack_mg = new EntThinkAdapter() { + public String getID() { return "boss2_reattack_mg"; } public boolean think(edict_t self) { if (GameUtil.infront(self, self.enemy)) if (Lib.random() <= 0.7) @@ -481,6 +487,7 @@ public class M_Boss2 { }; static EntPainAdapter boss2_pain = new EntPainAdapter() { + public String getID() { return "boss2_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -507,6 +514,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_dead = new EntThinkAdapter() { + public String getID() { return "boss2_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -56, -56, 0); Math3D.VectorSet(self.maxs, 56, 56, 80); @@ -519,6 +527,7 @@ public class M_Boss2 { }; static EntDieAdapter boss2_die = new EntDieAdapter() { + public String getID() { return "boss2_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_death, 1, @@ -532,6 +541,7 @@ public class M_Boss2 { }; static EntThinkAdapter Boss2_CheckAttack = new EntThinkAdapter() { + public String getID() { return "Boss2_CheckAttack"; } public boolean think(edict_t self) { float[] spot1 = { 0, 0, 0 }, spot2 = { 0, 0, 0 }; float[] temp = { 0, 0, 0 }; @@ -615,6 +625,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_search = new EntThinkAdapter() { + public String getID() { return "boss2_search"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search1, 1, @@ -624,6 +635,7 @@ public class M_Boss2 { }; static EntThinkAdapter Boss2Rocket = new EntThinkAdapter() { + public String getID() { return "Boss2Rocket"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] start = { 0, 0, 0 }; @@ -680,6 +692,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_firebullet_right = new EntThinkAdapter() { + public String getID() { return "boss2_firebullet_right"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }, target = { 0, 0, 0 }; @@ -708,6 +721,7 @@ public class M_Boss2 { }; static EntThinkAdapter boss2_firebullet_left = new EntThinkAdapter() { + public String getID() { return "boss2_firebullet_left"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }, target = { 0, 0, 0 }; @@ -737,6 +751,7 @@ public class M_Boss2 { }; static EntThinkAdapter Boss2MachineGun = new EntThinkAdapter() { + public String getID() { return "Boss2MachineGun"; } public boolean think(edict_t self) { /* * RST: this was disabled ! float[] forward={0,0,0}, right={0,0,0}; diff --git a/src/jake2/game/monsters/M_Boss3.java b/src/jake2/game/monsters/M_Boss3.java index 3ae6f65..3bdc6aa 100644 --- a/src/jake2/game/monsters/M_Boss3.java +++ b/src/jake2/game/monsters/M_Boss3.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Boss3.java,v 1.2 2005-02-06 18:48:17 salomo Exp $ +// $Id: M_Boss3.java,v 1.3 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -33,6 +33,7 @@ import jake2.util.Math3D; public class M_Boss3 { static EntUseAdapter Use_Boss3 = new EntUseAdapter() { + public String getID() { return "Use_Boss3"; } public void use(edict_t ent, edict_t other, edict_t activator) { GameBase.gi.WriteByte(Defines.svc_temp_entity); GameBase.gi.WriteByte(Defines.TE_BOSSTPORT); @@ -43,6 +44,7 @@ public class M_Boss3 { }; static EntThinkAdapter Think_Boss3Stand = new EntThinkAdapter() { + public String getID() { return "Think_Boss3Stand"; } public boolean think(edict_t ent) { if (ent.s.frame == M_Boss32.FRAME_stand260) ent.s.frame = M_Boss32.FRAME_stand201; diff --git a/src/jake2/game/monsters/M_Boss31.java b/src/jake2/game/monsters/M_Boss31.java index 0c76d56..03a250f 100644 --- a/src/jake2/game/monsters/M_Boss31.java +++ b/src/jake2/game/monsters/M_Boss31.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Boss31.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Boss31.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -459,6 +459,7 @@ public class M_Boss31 { */ static EntThinkAdapter jorg_search = new EntThinkAdapter() { + public String getID() { return "jorg_search"; } public boolean think(edict_t self) { float r; @@ -478,6 +479,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_idle = new EntThinkAdapter() { + public String getID() { return "jorg_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, Defines.ATTN_NORM, 0); @@ -486,6 +488,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_death_hit = new EntThinkAdapter() { + public String getID() { return "jorg_death_hit"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_death_hit, 1, Defines.ATTN_NORM, 0); @@ -494,6 +497,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_step_left = new EntThinkAdapter() { + public String getID() { return "jorg_step_left"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_step_left, 1, Defines.ATTN_NORM, 0); @@ -502,6 +506,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_step_right = new EntThinkAdapter() { + public String getID() { return "jorg_step_right"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_step_right, 1, Defines.ATTN_NORM, 0); @@ -510,6 +515,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_stand = new EntThinkAdapter() { + public String getID() { return "jorg_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = jorg_move_stand; return true; @@ -517,6 +523,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_reattack1 = new EntThinkAdapter() { + public String getID() { return "jorg_reattack1"; } public boolean think(edict_t self) { if (GameUtil.visible(self, self.enemy)) if (Lib.random() < 0.9) @@ -534,6 +541,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_attack1 = new EntThinkAdapter() { + public String getID() { return "jorg_attack1"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = jorg_move_attack1; return true; @@ -541,6 +549,7 @@ public class M_Boss31 { }; static EntPainAdapter jorg_pain = new EntPainAdapter() { + public String getID() { return "jorg_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -600,6 +609,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorgBFG = new EntThinkAdapter() { + public String getID() { return "jorgBFG"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -630,6 +640,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_firebullet_right = new EntThinkAdapter() { + public String getID() { return "jorg_firebullet_right"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }, target = { 0, 0, 0 }; @@ -657,6 +668,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_firebullet_left = new EntThinkAdapter() { + public String getID() { return "jorg_firebullet_left"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }, target = { 0, 0, 0 }; @@ -684,6 +696,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_firebullet = new EntThinkAdapter() { + public String getID() { return "jorg_firebullet"; } public boolean think(edict_t self) { jorg_firebullet_left.think(self); jorg_firebullet_right.think(self); @@ -692,6 +705,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_attack = new EntThinkAdapter() { + public String getID() { return "jorg_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; float range = 0; @@ -715,6 +729,7 @@ public class M_Boss31 { /** Was disabled. RST. */ static EntThinkAdapter jorg_dead = new EntThinkAdapter() { + public String getID() { return "jorg_dead"; } public boolean think(edict_t self) { /* * edict_t tempent; @@ -737,6 +752,7 @@ public class M_Boss31 { }; static EntDieAdapter jorg_die = new EntDieAdapter() { + public String getID() { return "jorg_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_death, 1, @@ -751,6 +767,7 @@ public class M_Boss31 { }; static EntThinkAdapter Jorg_CheckAttack = new EntThinkAdapter() { + public String getID() { return "Jorg_CheckAttack"; } public boolean think(edict_t self) { float[] spot1 = { 0, 0, 0 }, spot2 = { 0, 0, 0 }; float[] temp = { 0, 0, 0 }; @@ -963,6 +980,7 @@ public class M_Boss31 { jorg_frames_end_walk, null); static EntThinkAdapter jorg_walk = new EntThinkAdapter() { + public String getID() { return "jorg_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = jorg_move_walk; return true; @@ -970,6 +988,7 @@ public class M_Boss31 { }; static EntThinkAdapter jorg_run = new EntThinkAdapter() { + public String getID() { return "jorg_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = jorg_move_stand; diff --git a/src/jake2/game/monsters/M_Boss32.java b/src/jake2/game/monsters/M_Boss32.java index 75e80c1..a27bb15 100644 --- a/src/jake2/game/monsters/M_Boss32.java +++ b/src/jake2/game/monsters/M_Boss32.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Boss32.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Boss32.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -1055,6 +1055,7 @@ public class M_Boss32 { static int sound_hit; static EntThinkAdapter makron_taunt = new EntThinkAdapter() { + public String getID() { return "makron_taunt"; } public boolean think(edict_t self) { float r; @@ -1076,6 +1077,7 @@ public class M_Boss32 { // stand // static EntThinkAdapter makron_stand = new EntThinkAdapter() { + public String getID() { return "makron_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = makron_move_stand; return true; @@ -1088,6 +1090,7 @@ public class M_Boss32 { */ static EntThinkAdapter makron_hit = new EntThinkAdapter() { + public String getID() { return "makron_hit"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_AUTO, sound_hit, 1, Defines.ATTN_NONE, 0); @@ -1096,6 +1099,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_popup = new EntThinkAdapter() { + public String getID() { return "makron_popup"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_popup, 1, Defines.ATTN_NONE, 0); @@ -1104,6 +1108,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_step_left = new EntThinkAdapter() { + public String getID() { return "makron_step_left"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_step_left, 1, @@ -1113,6 +1118,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_step_right = new EntThinkAdapter() { + public String getID() { return "makron_step_right"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_step_right, 1, Defines.ATTN_NORM, 0); @@ -1121,6 +1127,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_brainsplorch = new EntThinkAdapter() { + public String getID() { return "makron_brainsplorch"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_brainsplorch, 1, Defines.ATTN_NORM, 0); @@ -1129,6 +1136,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_prerailgun = new EntThinkAdapter() { + public String getID() { return "makron_prerailgun"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_prerailgun, 1, Defines.ATTN_NORM, 0); @@ -1241,6 +1249,7 @@ public class M_Boss32 { // death // static EntThinkAdapter makron_dead = new EntThinkAdapter() { + public String getID() { return "makron_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -60, -60, 0); Math3D.VectorSet(self.maxs, 60, 60, 72); @@ -1253,6 +1262,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_walk = new EntThinkAdapter() { + public String getID() { return "makron_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = makron_move_walk; return true; @@ -1260,6 +1270,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_run = new EntThinkAdapter() { + public String getID() { return "makron_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = makron_move_stand; @@ -1475,6 +1486,7 @@ public class M_Boss32 { FRAME_active13, makron_frames_sight, makron_run); static EntThinkAdapter makronBFG = new EntThinkAdapter() { + public String getID() { return "makronBFG"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -1500,6 +1512,7 @@ public class M_Boss32 { }; static EntThinkAdapter MakronSaveloc = new EntThinkAdapter() { + public String getID() { return "MakronSaveloc"; } public boolean think(edict_t self) { Math3D.VectorCopy(self.enemy.s.origin, self.pos1); //save for // aiming the @@ -1512,6 +1525,7 @@ public class M_Boss32 { // FIXME: He's not firing from the proper Z static EntThinkAdapter MakronRailgun = new EntThinkAdapter() { + public String getID() { return "MakronRailgun"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] dir = { 0, 0, 0 }; @@ -1536,6 +1550,7 @@ public class M_Boss32 { // FIXME: This is all wrong. He's not firing at the proper angles. static EntThinkAdapter MakronHyperblaster = new EntThinkAdapter() { + public String getID() { return "MakronHyperblaster"; } public boolean think(edict_t self) { float[] dir = { 0, 0, 0 }; float[] vec = { 0, 0, 0 }; @@ -1578,6 +1593,7 @@ public class M_Boss32 { }; static EntPainAdapter makron_pain = new EntPainAdapter() { + public String getID() { return "makron_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) @@ -1620,6 +1636,7 @@ public class M_Boss32 { }; static EntInteractAdapter makron_sight = new EntInteractAdapter() { + public String getID() { return "makron_sight"; } public boolean interact(edict_t self, edict_t other) { self.monsterinfo.currentmove = makron_move_sight; return true; @@ -1627,6 +1644,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_attack = new EntThinkAdapter() { + public String getID() { return "makron_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; float range; @@ -1653,6 +1671,7 @@ public class M_Boss32 { */ static EntThinkAdapter makron_torso_think = new EntThinkAdapter() { + public String getID() { return "makron_torso_think"; } public boolean think(edict_t self) { if (++self.s.frame < 365) self.nextthink = GameBase.level.time + Defines.FRAMETIME; @@ -1665,6 +1684,7 @@ public class M_Boss32 { }; static EntThinkAdapter makron_torso = new EntThinkAdapter() { + public String getID() { return "makron_torso"; } public boolean think(edict_t ent) { ent.movetype = Defines.MOVETYPE_NONE; ent.solid = Defines.SOLID_NOT; @@ -1682,6 +1702,7 @@ public class M_Boss32 { }; static EntDieAdapter makron_die = new EntDieAdapter() { + public String getID() { return "makron_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { edict_t tempent; @@ -1729,6 +1750,7 @@ public class M_Boss32 { }; static EntThinkAdapter Makron_CheckAttack = new EntThinkAdapter() { + public String getID() { return "Makron_CheckAttack"; } public boolean think(edict_t self) { float[] spot1 = { 0, 0, 0 }, spot2 = { 0, 0, 0 }; float[] temp = { 0, 0, 0 }; @@ -1885,6 +1907,7 @@ public class M_Boss32 { * ================= */ static EntThinkAdapter MakronSpawn = new EntThinkAdapter() { + public String getID() { return "MakronSpawn"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; @@ -1909,6 +1932,7 @@ public class M_Boss32 { }; static EntThinkAdapter MakronToss = new EntThinkAdapter() { + public String getID() { return "MakronToss"; } public boolean think(edict_t self) { edict_t ent; diff --git a/src/jake2/game/monsters/M_Brain.java b/src/jake2/game/monsters/M_Brain.java index 7189e30..1f49045 100644 --- a/src/jake2/game/monsters/M_Brain.java +++ b/src/jake2/game/monsters/M_Brain.java @@ -20,7 +20,7 @@ // Created on 13.11.2003 by RST. -// $Id: M_Brain.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Brain.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; @@ -506,6 +506,7 @@ public class M_Brain { static int sound_melee3; static EntInteractAdapter brain_sight = new EntInteractAdapter() { + public String getID() { return "brain_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -514,6 +515,7 @@ public class M_Brain { }; static EntThinkAdapter brain_search = new EntThinkAdapter() { + public String getID() { return "brain_search"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search, 1, Defines.ATTN_NORM, 0); @@ -561,6 +563,7 @@ public class M_Brain { brain_frames_stand, null); static EntThinkAdapter brain_stand = new EntThinkAdapter() { + public String getID() { return "brain_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = brain_move_stand; return true; @@ -607,6 +610,7 @@ public class M_Brain { brain_frames_idle, brain_stand); static EntThinkAdapter brain_idle = new EntThinkAdapter() { + public String getID() { return "brain_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_AUTO, sound_idle3, 1, Defines.ATTN_IDLE, 0); @@ -667,6 +671,7 @@ public class M_Brain { * # endif */ static EntThinkAdapter brain_walk = new EntThinkAdapter() { + public String getID() { return "brain_walk"; } public boolean think(edict_t self) { // if (random() <= 0.5) self.monsterinfo.currentmove = brain_move_walk1; @@ -681,6 +686,7 @@ public class M_Brain { // static EntThinkAdapter brain_duck_down = new EntThinkAdapter() { + public String getID() { return "brain_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) @@ -694,6 +700,7 @@ public class M_Brain { }; static EntThinkAdapter brain_duck_hold = new EntThinkAdapter() { + public String getID() { return "brain_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -704,6 +711,7 @@ public class M_Brain { }; static EntThinkAdapter brain_duck_up = new EntThinkAdapter() { + public String getID() { return "brain_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -714,6 +722,7 @@ public class M_Brain { }; static EntDodgeAdapter brain_dodge = new EntDodgeAdapter() { + public String getID() { return "brain_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { if (Lib.random() > 0.25) return; @@ -735,6 +744,7 @@ public class M_Brain { new mframe_t(GameAI.ai_move, 0, null) }; static EntThinkAdapter brain_dead = new EntThinkAdapter() { + public String getID() { return "brain_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -777,6 +787,7 @@ public class M_Brain { // static EntThinkAdapter brain_swing_right = new EntThinkAdapter() { + public String getID() { return "brain_swing_right"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_melee1, 1, Defines.ATTN_NORM, 0); @@ -785,6 +796,7 @@ public class M_Brain { }; static EntThinkAdapter brain_hit_right = new EntThinkAdapter() { + public String getID() { return "brain_hit_right"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -797,6 +809,7 @@ public class M_Brain { }; static EntThinkAdapter brain_swing_left = new EntThinkAdapter() { + public String getID() { return "brain_swing_left"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_melee2, 1, Defines.ATTN_NORM, 0); @@ -806,6 +819,7 @@ public class M_Brain { }; static EntThinkAdapter brain_hit_left = new EntThinkAdapter() { + public String getID() { return "brain_hit_left"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -819,6 +833,7 @@ public class M_Brain { }; static EntThinkAdapter brain_chest_open = new EntThinkAdapter() { + public String getID() { return "brain_chest_open"; } public boolean think(edict_t self) { self.spawnflags &= ~65536; self.monsterinfo.power_armor_type = Defines.POWER_ARMOR_NONE; @@ -829,6 +844,7 @@ public class M_Brain { }; static EntThinkAdapter brain_tentacle_attack = new EntThinkAdapter() { + public String getID() { return "brain_tentacle_attack"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -864,6 +880,7 @@ public class M_Brain { new mframe_t(GameAI.ai_charge, -11, null) }; static EntThinkAdapter brain_chest_closed = new EntThinkAdapter() { + public String getID() { return "brain_chest_closed"; } public boolean think(edict_t self) { self.monsterinfo.power_armor_type = Defines.POWER_ARMOR_SCREEN; @@ -895,6 +912,7 @@ public class M_Brain { new mframe_t(GameAI.ai_charge, -6, null) }; static EntThinkAdapter brain_melee = new EntThinkAdapter() { + public String getID() { return "brain_melee"; } public boolean think(edict_t self) { if (Lib.random() <= 0.5) self.monsterinfo.currentmove = brain_move_attack1; @@ -926,6 +944,7 @@ public class M_Brain { brain_frames_run, null); static EntThinkAdapter brain_run = new EntThinkAdapter() { + public String getID() { return "brain_run"; } public boolean think(edict_t self) { self.monsterinfo.power_armor_type = Defines.POWER_ARMOR_SCREEN; if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) @@ -1014,6 +1033,7 @@ public class M_Brain { brain_frames_duck, brain_run); static EntPainAdapter brain_pain = new EntPainAdapter() { + public String getID() { return "brain_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { float r; @@ -1046,6 +1066,7 @@ public class M_Brain { }; static EntDieAdapter brain_die = new EntDieAdapter() { + public String getID() { return "brain_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; diff --git a/src/jake2/game/monsters/M_Chick.java b/src/jake2/game/monsters/M_Chick.java index be86e8a..4a6891e 100644 --- a/src/jake2/game/monsters/M_Chick.java +++ b/src/jake2/game/monsters/M_Chick.java @@ -20,7 +20,7 @@ // Created on 13.11.2003 by RST. -// $Id: M_Chick.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Chick.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; @@ -640,6 +640,7 @@ public class M_Chick { static int sound_search; static EntThinkAdapter ChickMoan = new EntThinkAdapter() { + public String getID() { return "ChickMoan"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle1, 1, @@ -684,6 +685,7 @@ public class M_Chick { new mframe_t(GameAI.ai_stand, 0, null) }; static EntThinkAdapter chick_stand = new EntThinkAdapter() { + public String getID() { return "chick_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_stand; return true; @@ -694,6 +696,7 @@ public class M_Chick { FRAME_stand230, chick_frames_fidget, chick_stand); static EntThinkAdapter chick_fidget = new EntThinkAdapter() { + public String getID() { return "chick_fidget"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) return true; @@ -739,6 +742,7 @@ public class M_Chick { FRAME_stand130, chick_frames_stand, null); static EntThinkAdapter chick_run = new EntThinkAdapter() { + public String getID() { return "chick_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) { self.monsterinfo.currentmove = chick_move_stand; @@ -801,6 +805,7 @@ public class M_Chick { chick_frames_walk, null); static EntThinkAdapter chick_walk = new EntThinkAdapter() { + public String getID() { return "chick_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_walk; return true; @@ -854,6 +859,7 @@ public class M_Chick { chick_frames_pain3, chick_run); static EntPainAdapter chick_pain = new EntPainAdapter() { + public String getID() { return "chick_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { float r; @@ -890,6 +896,7 @@ public class M_Chick { }; static EntThinkAdapter chick_dead = new EntThinkAdapter() { + public String getID() { return "chick_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, 0); Math3D.VectorSet(self.maxs, 16, 16, 16); @@ -947,6 +954,7 @@ public class M_Chick { FRAME_death112, chick_frames_death1, chick_dead); static EntDieAdapter chick_die = new EntDieAdapter() { + public String getID() { return "chick_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { @@ -993,6 +1001,7 @@ public class M_Chick { }; static EntThinkAdapter chick_duck_down = new EntThinkAdapter() { + public String getID() { return "chick_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) return true; @@ -1006,6 +1015,7 @@ public class M_Chick { }; static EntThinkAdapter chick_duck_hold = new EntThinkAdapter() { + public String getID() { return "chick_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -1016,6 +1026,7 @@ public class M_Chick { }; static EntThinkAdapter chick_duck_up = new EntThinkAdapter() { + public String getID() { return "chick_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -1038,6 +1049,7 @@ public class M_Chick { chick_frames_duck, chick_run); static EntDodgeAdapter chick_dodge = new EntDodgeAdapter() { + public String getID() { return "chick_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { if (Lib.random() > 0.25) return; @@ -1051,6 +1063,7 @@ public class M_Chick { }; static EntThinkAdapter ChickSlash = new EntThinkAdapter() { + public String getID() { return "ChickSlash"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -1063,6 +1076,7 @@ public class M_Chick { }; static EntThinkAdapter ChickRocket = new EntThinkAdapter() { + public String getID() { return "ChickRocket"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] start = { 0, 0, 0 }; @@ -1086,6 +1100,7 @@ public class M_Chick { }; static EntThinkAdapter Chick_PreAttack1 = new EntThinkAdapter() { + public String getID() { return "Chick_PreAttack1"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_missile_prelaunch, 1, Defines.ATTN_NORM, 0); @@ -1094,6 +1109,7 @@ public class M_Chick { }; static EntThinkAdapter ChickReload = new EntThinkAdapter() { + public String getID() { return "ChickReload"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_missile_reload, 1, Defines.ATTN_NORM, 0); @@ -1102,6 +1118,7 @@ public class M_Chick { }; static EntThinkAdapter chick_attack1 = new EntThinkAdapter() { + public String getID() { return "chick_attack1"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_attack1; return true; @@ -1109,6 +1126,7 @@ public class M_Chick { }; static EntThinkAdapter chick_rerocket = new EntThinkAdapter() { + public String getID() { return "chick_rerocket"; } public boolean think(edict_t self) { if (self.enemy.health > 0) { if (GameUtil.range(self, self.enemy) > Defines.RANGE_MELEE) @@ -1171,6 +1189,7 @@ public class M_Chick { FRAME_attak132, chick_frames_end_attack1, chick_run); static EntThinkAdapter chick_reslash = new EntThinkAdapter() { + public String getID() { return "chick_reslash"; } public boolean think(edict_t self) { if (self.enemy.health > 0) { if (GameUtil.range(self, self.enemy) == Defines.RANGE_MELEE) @@ -1211,6 +1230,7 @@ public class M_Chick { FRAME_attak216, chick_frames_end_slash, chick_run); static EntThinkAdapter chick_slash = new EntThinkAdapter() { + public String getID() { return "chick_slash"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_slash; return true; @@ -1226,6 +1246,7 @@ public class M_Chick { FRAME_attak203, chick_frames_start_slash, chick_slash); static EntThinkAdapter chick_melee = new EntThinkAdapter() { + public String getID() { return "chick_melee"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_start_slash; return true; @@ -1233,6 +1254,7 @@ public class M_Chick { }; static EntThinkAdapter chick_attack = new EntThinkAdapter() { + public String getID() { return "chick_attack"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = chick_move_start_attack1; return true; @@ -1240,6 +1262,7 @@ public class M_Chick { }; static EntInteractAdapter chick_sight = new EntInteractAdapter() { + public String getID() { return "chick_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); diff --git a/src/jake2/game/monsters/M_Flipper.java b/src/jake2/game/monsters/M_Flipper.java index d8e5b91..30235f6 100644 --- a/src/jake2/game/monsters/M_Flipper.java +++ b/src/jake2/game/monsters/M_Flipper.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Flipper.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Flipper.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -386,6 +386,7 @@ public class M_Flipper { FRAME_flphor01, flipper_frames_stand, null); static EntThinkAdapter flipper_stand = new EntThinkAdapter() { + public String getID() { return "flipper_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_stand; return true; @@ -429,6 +430,7 @@ public class M_Flipper { FRAME_flpver29, flipper_frames_run, null); static EntThinkAdapter flipper_run_loop = new EntThinkAdapter() { + public String getID() { return "flipper_run_loop"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_run_loop; return true; @@ -447,6 +449,7 @@ public class M_Flipper { FRAME_flpver06, flipper_frames_run_start, flipper_run_loop); static EntThinkAdapter flipper_run = new EntThinkAdapter() { + public String getID() { return "flipper_run"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_run_start; return true; @@ -484,6 +487,7 @@ public class M_Flipper { FRAME_flphor24, flipper_frames_walk, null); static EntThinkAdapter flipper_walk = new EntThinkAdapter() { + public String getID() { return "flipper_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_walk; return true; @@ -501,6 +505,7 @@ public class M_Flipper { FRAME_flphor05, flipper_frames_start_run, null); static EntThinkAdapter flipper_start_run = new EntThinkAdapter() { + public String getID() { return "flipper_start_run"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_start_run; return true; @@ -528,6 +533,7 @@ public class M_Flipper { FRAME_flppn205, flipper_frames_pain1, flipper_run); static EntThinkAdapter flipper_bite = new EntThinkAdapter() { + public String getID() { return "flipper_bite"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -538,6 +544,7 @@ public class M_Flipper { }; static EntThinkAdapter flipper_preattack = new EntThinkAdapter() { + public String getID() { return "flipper_preattack"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_chomp, 1, @@ -572,6 +579,7 @@ public class M_Flipper { FRAME_flpbit20, flipper_frames_attack, flipper_run); static EntThinkAdapter flipper_melee = new EntThinkAdapter() { + public String getID() { return "flipper_melee"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flipper_move_attack; return true; @@ -579,6 +587,7 @@ public class M_Flipper { }; static EntPainAdapter flipper_pain = new EntPainAdapter() { + public String getID() { return "flipper_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { int n; @@ -608,6 +617,7 @@ public class M_Flipper { }; static EntThinkAdapter flipper_dead = new EntThinkAdapter() { + public String getID() { return "flipper_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -681,6 +691,7 @@ public class M_Flipper { FRAME_flpdth56, flipper_frames_death, flipper_dead); static EntInteractAdapter flipper_sight = new EntInteractAdapter() { + public String getID() { return "flipper_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -689,6 +700,7 @@ public class M_Flipper { }; static EntDieAdapter flipper_die = new EntDieAdapter() { + public String getID() { return "flipper_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { diff --git a/src/jake2/game/monsters/M_Float.java b/src/jake2/game/monsters/M_Float.java index 00882ef..2e2ec3f 100644 --- a/src/jake2/game/monsters/M_Float.java +++ b/src/jake2/game/monsters/M_Float.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Float.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Float.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -556,6 +556,7 @@ public class M_Float { static int sound_sight; static EntInteractAdapter floater_sight = new EntInteractAdapter() { + public String getID() { return "floater_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -564,6 +565,7 @@ public class M_Float { }; static EntThinkAdapter floater_idle = new EntThinkAdapter() { + public String getID() { return "floater_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, Defines.ATTN_IDLE, 0); @@ -572,6 +574,7 @@ public class M_Float { }; static EntThinkAdapter floater_fire_blaster = new EntThinkAdapter() { + public String getID() { return "floater_fire_blaster"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -715,6 +718,7 @@ public class M_Float { FRAME_stand252, floater_frames_stand2, null); static EntThinkAdapter floater_stand = new EntThinkAdapter() { + public String getID() { return "floater_stand"; } public boolean think(edict_t self) { if (Lib.random() <= 0.5) self.monsterinfo.currentmove = floater_move_stand1; @@ -760,6 +764,7 @@ public class M_Float { FRAME_actvat31, floater_frames_activate, null); static EntThinkAdapter floater_run = new EntThinkAdapter() { + public String getID() { return "floater_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) @@ -796,6 +801,7 @@ public class M_Float { static float[] aim = { Defines.MELEE_DISTANCE, 0, 0 }; static EntThinkAdapter floater_wham = new EntThinkAdapter() { + public String getID() { return "floater_wham"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_attack3, 1, @@ -838,6 +844,7 @@ public class M_Float { FRAME_attak225, floater_frames_attack2, floater_run); static EntThinkAdapter floater_zap = new EntThinkAdapter() { + public String getID() { return "floater_zap"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] origin = { 0, 0, 0 }; @@ -931,6 +938,7 @@ public class M_Float { new mframe_t(GameAI.ai_move, 0, null) }; static EntThinkAdapter floater_dead = new EntThinkAdapter() { + public String getID() { return "floater_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -1102,6 +1110,7 @@ public class M_Float { FRAME_stand152, floater_frames_run, null); static EntThinkAdapter floater_walk = new EntThinkAdapter() { + public String getID() { return "floater_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = floater_move_walk; return true; @@ -1109,6 +1118,7 @@ public class M_Float { }; static EntThinkAdapter floater_attack = new EntThinkAdapter() { + public String getID() { return "floater_attack"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = floater_move_attack1; return true; @@ -1116,6 +1126,7 @@ public class M_Float { }; static EntThinkAdapter floater_melee = new EntThinkAdapter() { + public String getID() { return "floater_melee"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) @@ -1127,6 +1138,7 @@ public class M_Float { }; static EntPainAdapter floater_pain = new EntPainAdapter() { + public String getID() { return "floater_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { int n; @@ -1155,6 +1167,7 @@ public class M_Float { }; static EntDieAdapter floater_die = new EntDieAdapter() { + public String getID() { return "floater_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { diff --git a/src/jake2/game/monsters/M_Flyer.java b/src/jake2/game/monsters/M_Flyer.java index b7af64a..2cb7dcb 100644 --- a/src/jake2/game/monsters/M_Flyer.java +++ b/src/jake2/game/monsters/M_Flyer.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Flyer.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Flyer.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -372,6 +372,7 @@ public class M_Flyer { static int sound_die; public static EntInteractAdapter flyer_sight = new EntInteractAdapter() { + public String getID() { return "flyer_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -380,6 +381,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_idle = new EntThinkAdapter() { + public String getID() { return "flyer_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, Defines.ATTN_IDLE, 0); @@ -388,6 +390,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_pop_blades = new EntThinkAdapter() { + public String getID() { return "flyer_pop_blades"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sproing, 1, Defines.ATTN_NORM, 0); @@ -546,6 +549,7 @@ public class M_Flyer { flyer_frames_run, null); static EntThinkAdapter flyer_run = new EntThinkAdapter() { + public String getID() { return "flyer_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = flyer_move_stand; @@ -556,6 +560,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_walk = new EntThinkAdapter() { + public String getID() { return "flyer_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flyer_move_walk; return true; @@ -563,6 +568,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_stand = new EntThinkAdapter() { + public String getID() { return "flyer_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flyer_move_stand; return true; @@ -570,6 +576,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_nextmove = new EntThinkAdapter() { + public String getID() { return "flyer_nextmove"; } public boolean think(edict_t self) { if (nextmove == ACTION_attack1) self.monsterinfo.currentmove = flyer_move_start_melee; @@ -605,6 +612,7 @@ public class M_Flyer { flyer_frames_stop, null); static EntThinkAdapter flyer_stop = new EntThinkAdapter() { + public String getID() { return "flyer_stop"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flyer_move_stop; return true; @@ -612,6 +620,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_start = new EntThinkAdapter() { + public String getID() { return "flyer_start"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = flyer_move_start; return true; @@ -715,6 +724,7 @@ public class M_Flyer { FRAME_bankl07, flyer_frames_bankleft, null); static EntThinkAdapter flyer_fireleft = new EntThinkAdapter() { + public String getID() { return "flyer_fireleft"; } public boolean think(edict_t self) { flyer_fire(self, Defines.MZ2_FLYER_BLASTER_1); return true; @@ -722,6 +732,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_fireright = new EntThinkAdapter() { + public String getID() { return "flyer_fireright"; } public boolean think(edict_t self) { flyer_fire(self, Defines.MZ2_FLYER_BLASTER_2); return true; @@ -752,6 +763,7 @@ public class M_Flyer { FRAME_attak217, flyer_frames_attack2, flyer_run); static EntThinkAdapter flyer_slash_left = new EntThinkAdapter() { + public String getID() { return "flyer_slash_left"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -764,6 +776,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_slash_right = new EntThinkAdapter() { + public String getID() { return "flyer_slash_right"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -776,6 +789,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_loop_melee = new EntThinkAdapter() { + public String getID() { return "flyer_loop_melee"; } public boolean think(edict_t self) { /* * if (random() <= 0.5) self.monsterinfo.currentmove = @@ -824,6 +838,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_check_melee = new EntThinkAdapter() { + public String getID() { return "flyer_check_melee"; } public boolean think(edict_t self) { if (GameUtil.range(self, self.enemy) == Defines.RANGE_MELEE) if (Lib.random() <= 0.8) @@ -840,6 +855,7 @@ public class M_Flyer { FRAME_attak118, flyer_frames_loop_melee, flyer_check_melee); static EntThinkAdapter flyer_attack = new EntThinkAdapter() { + public String getID() { return "flyer_attack"; } public boolean think(edict_t self) { /* * if (random() <= 0.5) self.monsterinfo.currentmove = @@ -852,6 +868,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_setstart = new EntThinkAdapter() { + public String getID() { return "flyer_setstart"; } public boolean think(edict_t self) { nextmove = ACTION_run; self.monsterinfo.currentmove = flyer_move_start; @@ -860,6 +877,7 @@ public class M_Flyer { }; static EntThinkAdapter flyer_melee = new EntThinkAdapter() { + public String getID() { return "flyer_melee"; } public boolean think(edict_t self) { // flyer.nextmove = ACTION_attack1; // self.monsterinfo.currentmove = flyer_move_stop; @@ -869,6 +887,7 @@ public class M_Flyer { }; static EntPainAdapter flyer_pain = new EntPainAdapter() { + public String getID() { return "flyer_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { int n; @@ -901,6 +920,7 @@ public class M_Flyer { }; static EntDieAdapter flyer_die = new EntDieAdapter() { + public String getID() { return "flyer_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_die, 1, diff --git a/src/jake2/game/monsters/M_Gladiator.java b/src/jake2/game/monsters/M_Gladiator.java index 4e5bd6d..21975f8 100644 --- a/src/jake2/game/monsters/M_Gladiator.java +++ b/src/jake2/game/monsters/M_Gladiator.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Gladiator.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Gladiator.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -245,6 +245,7 @@ public class M_Gladiator { static int sound_sight; static EntThinkAdapter gladiator_idle = new EntThinkAdapter() { + public String getID() { return "gladiator_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, @@ -254,6 +255,7 @@ public class M_Gladiator { }; static EntInteractAdapter gladiator_sight = new EntInteractAdapter() { + public String getID() { return "gladiator_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, @@ -263,6 +265,7 @@ public class M_Gladiator { }; static EntThinkAdapter gladiator_search = new EntThinkAdapter() { + public String getID() { return "gladiator_search"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search, 1, @@ -272,6 +275,7 @@ public class M_Gladiator { }; static EntThinkAdapter gladiator_cleaver_swing = new EntThinkAdapter() { + public String getID() { return "gladiator_cleaver_swing"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_cleaver_swing, @@ -293,6 +297,7 @@ public class M_Gladiator { FRAME_stand7, gladiator_frames_stand, null); static EntThinkAdapter gladiator_stand = new EntThinkAdapter() { + public String getID() { return "gladiator_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gladiator_move_stand; @@ -322,6 +327,7 @@ public class M_Gladiator { gladiator_frames_walk, null); static EntThinkAdapter gladiator_walk = new EntThinkAdapter() { + public String getID() { return "gladiator_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gladiator_move_walk; @@ -342,6 +348,7 @@ public class M_Gladiator { gladiator_frames_run, null); static EntThinkAdapter gladiator_run = new EntThinkAdapter() { + public String getID() { return "gladiator_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) @@ -354,6 +361,7 @@ public class M_Gladiator { }; static EntThinkAdapter GaldiatorMelee = new EntThinkAdapter() { + public String getID() { return "GaldiatorMelee"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -392,6 +400,7 @@ public class M_Gladiator { FRAME_melee17, gladiator_frames_attack_melee, gladiator_run); static EntThinkAdapter gladiator_melee = new EntThinkAdapter() { + public String getID() { return "gladiator_melee"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gladiator_move_attack_melee; @@ -400,6 +409,7 @@ public class M_Gladiator { }; static EntThinkAdapter GladiatorGun = new EntThinkAdapter() { + public String getID() { return "GladiatorGun"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; @@ -440,6 +450,7 @@ public class M_Gladiator { FRAME_attack9, gladiator_frames_attack_gun, gladiator_run); static EntThinkAdapter gladiator_attack = new EntThinkAdapter() { + public String getID() { return "gladiator_attack"; } public boolean think(edict_t self) { float range; @@ -486,6 +497,7 @@ public class M_Gladiator { FRAME_painup7, gladiator_frames_pain_air, gladiator_run); static EntPainAdapter gladiator_pain = new EntPainAdapter() { + public String getID() { return "gladiator_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) @@ -519,6 +531,7 @@ public class M_Gladiator { }; static EntThinkAdapter gladiator_dead = new EntThinkAdapter() { + public String getID() { return "gladiator_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); @@ -559,6 +572,7 @@ public class M_Gladiator { FRAME_death22, gladiator_frames_death, gladiator_dead); static EntDieAdapter gladiator_die = new EntDieAdapter() { + public String getID() { return "gladiator_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; diff --git a/src/jake2/game/monsters/M_Gunner.java b/src/jake2/game/monsters/M_Gunner.java index dd82ddb..7d6354b 100644 --- a/src/jake2/game/monsters/M_Gunner.java +++ b/src/jake2/game/monsters/M_Gunner.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Gunner.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Gunner.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -477,6 +477,7 @@ public class M_Gunner { static int sound_sight; static EntThinkAdapter gunner_idlesound = new EntThinkAdapter() { + public String getID() { return "gunner_idlesound"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, Defines.ATTN_IDLE, 0); @@ -485,6 +486,7 @@ public class M_Gunner { }; static EntInteractAdapter gunner_sight = new EntInteractAdapter() { + public String getID() { return "gunner_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -493,6 +495,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_search = new EntThinkAdapter() { + public String getID() { return "gunner_search"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search, 1, Defines.ATTN_NORM, 0); @@ -552,6 +555,7 @@ public class M_Gunner { new mframe_t(GameAI.ai_stand, 0, null) }; static EntThinkAdapter gunner_stand = new EntThinkAdapter() { + public String getID() { return "gunner_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gunner_move_stand; return true; @@ -562,6 +566,7 @@ public class M_Gunner { FRAME_stand70, gunner_frames_fidget, gunner_stand); static EntThinkAdapter gunner_fidget = new EntThinkAdapter() { + public String getID() { return "gunner_fidget"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) return true; @@ -625,6 +630,7 @@ public class M_Gunner { gunner_frames_walk, null); static EntThinkAdapter gunner_walk = new EntThinkAdapter() { + public String getID() { return "gunner_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gunner_move_walk; return true; @@ -645,6 +651,7 @@ public class M_Gunner { gunner_frames_run, null); static EntThinkAdapter gunner_run = new EntThinkAdapter() { + public String getID() { return "gunner_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = gunner_move_stand; @@ -666,6 +673,7 @@ public class M_Gunner { FRAME_runs06, gunner_frames_runandshoot, null); static EntThinkAdapter gunner_runandshoot = new EntThinkAdapter() { + public String getID() { return "gunner_runandshoot"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gunner_move_runandshoot; return true; @@ -719,6 +727,7 @@ public class M_Gunner { FRAME_pain118, gunner_frames_pain1, gunner_run); static EntPainAdapter gunner_pain = new EntPainAdapter() { + public String getID() { return "gunner_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -749,6 +758,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_dead = new EntThinkAdapter() { + public String getID() { return "gunner_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -777,6 +787,7 @@ public class M_Gunner { FRAME_death11, gunner_frames_death, gunner_dead); static EntDieAdapter gunner_die = new EntDieAdapter() { + public String getID() { return "gunner_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -813,6 +824,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_duck_down = new EntThinkAdapter() { + public String getID() { return "gunner_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) return true; @@ -831,6 +843,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_duck_hold = new EntThinkAdapter() { + public String getID() { return "gunner_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -841,6 +854,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_duck_up = new EntThinkAdapter() { + public String getID() { return "gunner_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -864,6 +878,7 @@ public class M_Gunner { gunner_frames_duck, gunner_run); static EntDodgeAdapter gunner_dodge = new EntDodgeAdapter() { + public String getID() { return "gunner_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { if (Lib.random() > 0.25) return; @@ -876,6 +891,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_opengun = new EntThinkAdapter() { + public String getID() { return "gunner_opengun"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_open, 1, Defines.ATTN_IDLE, 0); @@ -884,6 +900,7 @@ public class M_Gunner { }; static EntThinkAdapter GunnerFire = new EntThinkAdapter() { + public String getID() { return "GunnerFire"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -915,6 +932,7 @@ public class M_Gunner { }; static EntThinkAdapter GunnerGrenade = new EntThinkAdapter() { + public String getID() { return "GunnerGrenade"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -946,6 +964,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_attack = new EntThinkAdapter() { + public String getID() { return "gunner_attack"; } public boolean think(edict_t self) { if (GameUtil.range(self, self.enemy) == Defines.RANGE_MELEE) { self.monsterinfo.currentmove = gunner_move_attack_chain; @@ -960,6 +979,7 @@ public class M_Gunner { }; static EntThinkAdapter gunner_fire_chain = new EntThinkAdapter() { + public String getID() { return "gunner_fire_chain"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = gunner_move_fire_chain; return true; @@ -989,6 +1009,7 @@ public class M_Gunner { new mframe_t(GameAI.ai_charge, 0, GunnerFire) }; static EntThinkAdapter gunner_refire_chain = new EntThinkAdapter() { + public String getID() { return "gunner_refire_chain"; } public boolean think(edict_t self) { if (self.enemy.health > 0) if (GameUtil.visible(self, self.enemy)) diff --git a/src/jake2/game/monsters/M_Hover.java b/src/jake2/game/monsters/M_Hover.java index ff8f7b6..b2af1fb 100644 --- a/src/jake2/game/monsters/M_Hover.java +++ b/src/jake2/game/monsters/M_Hover.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Hover.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Hover.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -469,6 +469,7 @@ public class M_Hover { static int sound_search2; static EntThinkAdapter hover_reattack = new EntThinkAdapter() { + public String getID() { return "hover_reattack"; } public boolean think(edict_t self) { if (self.enemy.health > 0) if (GameUtil.visible(self, self.enemy)) @@ -482,6 +483,7 @@ public class M_Hover { }; static EntThinkAdapter hover_fire_blaster = new EntThinkAdapter() { + public String getID() { return "hover_fire_blaster"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -510,6 +512,7 @@ public class M_Hover { }; static EntThinkAdapter hover_stand = new EntThinkAdapter() { + public String getID() { return "hover_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = hover_move_stand; return true; @@ -517,6 +520,7 @@ public class M_Hover { }; static EntThinkAdapter hover_run = new EntThinkAdapter() { + public String getID() { return "hover_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = hover_move_stand; @@ -527,6 +531,7 @@ public class M_Hover { }; static EntThinkAdapter hover_walk = new EntThinkAdapter() { + public String getID() { return "hover_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = hover_move_walk; return true; @@ -534,6 +539,7 @@ public class M_Hover { }; static EntThinkAdapter hover_start_attack = new EntThinkAdapter() { + public String getID() { return "hover_start_attack"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = hover_move_start_attack; return true; @@ -541,6 +547,7 @@ public class M_Hover { }; static EntThinkAdapter hover_attack = new EntThinkAdapter() { + public String getID() { return "hover_attack"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = hover_move_attack1; return true; @@ -548,6 +555,7 @@ public class M_Hover { }; static EntPainAdapter hover_pain = new EntPainAdapter() { + public String getID() { return "hover_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -579,6 +587,7 @@ public class M_Hover { }; static EntThinkAdapter hover_deadthink = new EntThinkAdapter() { + public String getID() { return "hover_deadthink"; } public boolean think(edict_t self) { if (null == self.groundentity && GameBase.level.time < self.timestamp) { @@ -591,6 +600,7 @@ public class M_Hover { }; static EntThinkAdapter hover_dead = new EntThinkAdapter() { + public String getID() { return "hover_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -604,6 +614,7 @@ public class M_Hover { }; static EntDieAdapter hover_die = new EntDieAdapter() { + public String getID() { return "hover_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -644,6 +655,7 @@ public class M_Hover { }; static EntInteractAdapter hover_sight = new EntInteractAdapter() { + public String getID() { return "hover_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -652,6 +664,7 @@ public class M_Hover { }; static EntThinkAdapter hover_search = new EntThinkAdapter() { + public String getID() { return "hover_search"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search1, 1, diff --git a/src/jake2/game/monsters/M_Infantry.java b/src/jake2/game/monsters/M_Infantry.java index d4d3bdd..3e169c4 100644 --- a/src/jake2/game/monsters/M_Infantry.java +++ b/src/jake2/game/monsters/M_Infantry.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Infantry.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Infantry.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -510,6 +510,7 @@ public class M_Infantry { FRAME_stand71, infantry_frames_stand, null); public static EntThinkAdapter infantry_stand = new EntThinkAdapter() { + public String getID() { return "infantry_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = infantry_move_stand; return true; @@ -571,6 +572,7 @@ public class M_Infantry { FRAME_stand49, infantry_frames_fidget, infantry_stand); static EntThinkAdapter infantry_fidget = new EntThinkAdapter() { + public String getID() { return "infantry_fidget"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = infantry_move_fidget; GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, @@ -597,6 +599,7 @@ public class M_Infantry { infantry_frames_walk, null); static EntThinkAdapter infantry_walk = new EntThinkAdapter() { + public String getID() { return "infantry_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = infantry_move_walk; return true; @@ -617,6 +620,7 @@ public class M_Infantry { infantry_frames_run, null); static EntThinkAdapter infantry_run = new EntThinkAdapter() { + public String getID() { return "infantry_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = infantry_move_stand; @@ -657,6 +661,7 @@ public class M_Infantry { FRAME_pain210, infantry_frames_pain2, infantry_run); static EntPainAdapter infantry_pain = new EntPainAdapter() { + public String getID() { return "infantry_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { int n; @@ -694,6 +699,7 @@ public class M_Infantry { { 90.0f, 35.0f, 0.0f } }; static EntThinkAdapter InfantryMachineGun = new EntThinkAdapter() { + public String getID() { return "InfantryMachineGun"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }, target = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -738,6 +744,7 @@ public class M_Infantry { }; static EntInteractAdapter infantry_sight = new EntInteractAdapter() { + public String getID() { return "infantry_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -748,6 +755,7 @@ public class M_Infantry { /// static EntThinkAdapter infantry_dead = new EntThinkAdapter() { + public String getID() { return "infantry_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -831,6 +839,7 @@ public class M_Infantry { FRAME_death309, infantry_frames_death3, infantry_dead); public static EntDieAdapter infantry_die = new EntDieAdapter() { + public String getID() { return "infantry_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { @@ -880,6 +889,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_duck_down = new EntThinkAdapter() { + public String getID() { return "infantry_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) return true; @@ -893,6 +903,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_duck_hold = new EntThinkAdapter() { + public String getID() { return "infantry_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -903,6 +914,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_duck_up = new EntThinkAdapter() { + public String getID() { return "infantry_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -923,6 +935,7 @@ public class M_Infantry { infantry_frames_duck, infantry_run); static EntDodgeAdapter infantry_dodge = new EntDodgeAdapter() { + public String getID() { return "infantry_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { if (Lib.random() > 0.25) return; @@ -935,6 +948,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_cock_gun = new EntThinkAdapter() { + public String getID() { return "infantry_cock_gun"; } public boolean think(edict_t self) { int n; @@ -948,6 +962,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_fire = new EntThinkAdapter() { + public String getID() { return "infantry_fire"; } public boolean think(edict_t self) { InfantryMachineGun.think(self); @@ -980,6 +995,7 @@ public class M_Infantry { FRAME_attak115, infantry_frames_attack1, infantry_run); static EntThinkAdapter infantry_swing = new EntThinkAdapter() { + public String getID() { return "infantry_swing"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_punch_swing, 1, @@ -989,6 +1005,7 @@ public class M_Infantry { }; static EntThinkAdapter infantry_smack = new EntThinkAdapter() { + public String getID() { return "infantry_smack"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -1014,6 +1031,7 @@ public class M_Infantry { FRAME_attak208, infantry_frames_attack2, infantry_run); static EntThinkAdapter infantry_attack = new EntThinkAdapter() { + public String getID() { return "infantry_attack"; } public boolean think(edict_t self) { if (GameUtil.range(self, self.enemy) == Defines.RANGE_MELEE) self.monsterinfo.currentmove = infantry_move_attack2; diff --git a/src/jake2/game/monsters/M_Insane.java b/src/jake2/game/monsters/M_Insane.java index 51fa113..b77adcf 100644 --- a/src/jake2/game/monsters/M_Insane.java +++ b/src/jake2/game/monsters/M_Insane.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Insane.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Insane.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -614,6 +614,7 @@ public class M_Insane { static int sound_scream[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static EntThinkAdapter insane_fist = new EntThinkAdapter() { + public String getID() { return "insane_fist"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_fist, 1, Defines.ATTN_IDLE, 0); @@ -622,6 +623,7 @@ public class M_Insane { }; static EntThinkAdapter insane_shake = new EntThinkAdapter() { + public String getID() { return "insane_shake"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_shake, 1, Defines.ATTN_IDLE, 0); @@ -630,6 +632,7 @@ public class M_Insane { }; static EntThinkAdapter insane_moan = new EntThinkAdapter() { + public String getID() { return "insane_moan"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_moan, 1, Defines.ATTN_IDLE, 0); @@ -638,6 +641,7 @@ public class M_Insane { }; static EntThinkAdapter insane_scream = new EntThinkAdapter() { + public String getID() { return "insane_scream"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_scream[Lib.rand() % 8], 1, Defines.ATTN_IDLE, 0); @@ -646,6 +650,7 @@ public class M_Insane { }; static EntThinkAdapter insane_cross = new EntThinkAdapter() { + public String getID() { return "insane_cross"; } public boolean think(edict_t self) { if (Lib.random() < 0.8) self.monsterinfo.currentmove = insane_move_cross; @@ -656,6 +661,7 @@ public class M_Insane { }; static EntThinkAdapter insane_walk = new EntThinkAdapter() { + public String getID() { return "insane_walk"; } public boolean think(edict_t self) { if ((self.spawnflags & 16) != 0) // Hold Ground? if (self.s.frame == FRAME_cr_pain10) { @@ -673,6 +679,7 @@ public class M_Insane { }; static EntThinkAdapter insane_run = new EntThinkAdapter() { + public String getID() { return "insane_run"; } public boolean think(edict_t self) { if ((self.spawnflags & 16) != 0) // Hold Ground? if (self.s.frame == FRAME_cr_pain10) { @@ -690,6 +697,7 @@ public class M_Insane { }; static EntPainAdapter insane_pain = new EntPainAdapter() { + public String getID() { return "insane_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { int l, r; @@ -732,6 +740,7 @@ public class M_Insane { }; static EntThinkAdapter insane_onground = new EntThinkAdapter() { + public String getID() { return "insane_onground"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = insane_move_down; return true; @@ -739,6 +748,7 @@ public class M_Insane { }; static EntThinkAdapter insane_checkdown = new EntThinkAdapter() { + public String getID() { return "insane_checkdown"; } public boolean think(edict_t self) { // if ( (self.s.frame == FRAME_stand94) || (self.s.frame == // FRAME_stand65) ) @@ -754,6 +764,7 @@ public class M_Insane { }; static EntThinkAdapter insane_checkup = new EntThinkAdapter() { + public String getID() { return "insane_checkup"; } public boolean think(edict_t self) { // If Hold_Ground and Crawl are set if ((self.spawnflags & 4) != 0 && (self.spawnflags & 16) != 0) @@ -765,6 +776,7 @@ public class M_Insane { }; static EntThinkAdapter insane_stand = new EntThinkAdapter() { + public String getID() { return "insane_stand"; } public boolean think(edict_t self) { if ((self.spawnflags & 8) != 0) // If crucified { @@ -783,6 +795,7 @@ public class M_Insane { }; static EntThinkAdapter insane_dead = new EntThinkAdapter() { + public String getID() { return "insane_dead"; } public boolean think(edict_t self) { if ((self.spawnflags & 8) != 0) { self.flags |= Defines.FL_FLY; @@ -799,6 +812,7 @@ public class M_Insane { }; static EntDieAdapter insane_die = new EntDieAdapter() { + public String getID() { return "insane_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; diff --git a/src/jake2/game/monsters/M_Medic.java b/src/jake2/game/monsters/M_Medic.java index 6237e1c..8925213 100644 --- a/src/jake2/game/monsters/M_Medic.java +++ b/src/jake2/game/monsters/M_Medic.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Medic.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Medic.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -560,6 +560,7 @@ public class M_Medic { } static EntThinkAdapter medic_idle = new EntThinkAdapter() { + public String getID(){ return "medic_idle"; } public boolean think(edict_t self) { edict_t ent; @@ -578,6 +579,7 @@ public class M_Medic { }; static EntThinkAdapter medic_search = new EntThinkAdapter() { + public String getID(){ return "medic_search"; } public boolean think(edict_t self) { edict_t ent; @@ -599,6 +601,7 @@ public class M_Medic { }; static EntInteractAdapter medic_sight = new EntInteractAdapter() { + public String getID(){ return "medic_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -702,6 +705,7 @@ public class M_Medic { medic_frames_stand, null); static EntThinkAdapter medic_stand = new EntThinkAdapter() { + public String getID(){ return "medic_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = medic_move_stand; return true; @@ -726,6 +730,7 @@ public class M_Medic { medic_frames_walk, null); static EntThinkAdapter medic_walk = new EntThinkAdapter() { + public String getID(){ return "medic_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = medic_move_walk; return true; @@ -744,6 +749,7 @@ public class M_Medic { medic_frames_run, null); static EntThinkAdapter medic_run = new EntThinkAdapter() { + public String getID(){ return "medic_run"; } public boolean think(edict_t self) { if (0 == (self.monsterinfo.aiflags & Defines.AI_MEDIC)) { edict_t ent; @@ -801,6 +807,7 @@ public class M_Medic { medic_frames_pain2, medic_run); static EntPainAdapter medic_pain = new EntPainAdapter() { + public String getID(){ return "medic_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) @@ -827,6 +834,7 @@ public class M_Medic { }; static EntThinkAdapter medic_fire_blaster = new EntThinkAdapter() { + public String getID(){ return "medic_fire_blaster"; } public boolean think(edict_t self) { float[] start = { 0, 0, 0 }; float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; @@ -861,6 +869,7 @@ public class M_Medic { }; static EntThinkAdapter medic_dead = new EntThinkAdapter() { + public String getID(){ return "medic_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -908,6 +917,7 @@ public class M_Medic { medic_frames_death, medic_dead); static EntDieAdapter medic_die = new EntDieAdapter() { + public String getID(){ return "medic_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { @@ -950,6 +960,7 @@ public class M_Medic { }; static EntThinkAdapter medic_duck_down = new EntThinkAdapter() { + public String getID(){ return "medic_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) return true; @@ -963,6 +974,7 @@ public class M_Medic { }; static EntThinkAdapter medic_duck_hold = new EntThinkAdapter() { + public String getID(){ return "medic_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -973,6 +985,7 @@ public class M_Medic { }; static EntThinkAdapter medic_duck_up = new EntThinkAdapter() { + public String getID(){ return "medic_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -1004,6 +1017,7 @@ public class M_Medic { medic_frames_duck, medic_run); static EntDodgeAdapter medic_dodge = new EntDodgeAdapter() { + public String getID(){ return "medic_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { if (Lib.random() > 0.25) return; @@ -1037,6 +1051,7 @@ public class M_Medic { FRAME_attack30, medic_frames_attackHyperBlaster, medic_run); static EntThinkAdapter medic_continue = new EntThinkAdapter() { + public String getID(){ return "medic_continue"; } public boolean think(edict_t self) { if (GameUtil.visible(self, self.enemy)) if (Lib.random() <= 0.95) @@ -1069,6 +1084,7 @@ public class M_Medic { FRAME_attack14, medic_frames_attackBlaster, medic_run); static EntThinkAdapter medic_hook_launch = new EntThinkAdapter() { + public String getID(){ return "medic_hook_launch"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_hook_launch, 1, Defines.ATTN_NORM, 0); @@ -1084,6 +1100,7 @@ public class M_Medic { { 32.7f, -19.7f, 10.4f } }; static EntThinkAdapter medic_cable_attack = new EntThinkAdapter() { + public String getID(){ return "medic_cable_attack"; } public boolean think(edict_t self) { float[] offset = { 0, 0, 0 }, start = { 0, 0, 0 }, end = { 0, 0, 0 }, f = { 0, 0, 0 }, r = { 0, 0, 0 }; @@ -1164,6 +1181,7 @@ public class M_Medic { }; static EntThinkAdapter medic_hook_retract = new EntThinkAdapter() { + public String getID(){ return "medic_hook_retract"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_hook_retract, 1, Defines.ATTN_NORM, 0); @@ -1206,6 +1224,7 @@ public class M_Medic { FRAME_attack60, medic_frames_attackCable, medic_run); static EntThinkAdapter medic_attack = new EntThinkAdapter() { + public String getID(){ return "medic_attack"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_MEDIC) != 0) self.monsterinfo.currentmove = medic_move_attackCable; @@ -1216,6 +1235,7 @@ public class M_Medic { }; static EntThinkAdapter medic_checkattack = new EntThinkAdapter() { + public String getID(){ return "medic_checkattack"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_MEDIC) != 0) { medic_attack.think(self); diff --git a/src/jake2/game/monsters/M_Mutant.java b/src/jake2/game/monsters/M_Mutant.java index 6683bc9..705c3a3 100644 --- a/src/jake2/game/monsters/M_Mutant.java +++ b/src/jake2/game/monsters/M_Mutant.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Mutant.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Mutant.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -362,6 +362,7 @@ public class M_Mutant { // SOUNDS // static EntThinkAdapter mutant_step = new EntThinkAdapter() { + public String getID(){ return "mutant_step"; } public boolean think(edict_t self) { int n; n = (Lib.rand() + 1) % 3; @@ -379,6 +380,7 @@ public class M_Mutant { }; static EntInteractAdapter mutant_sight = new EntInteractAdapter() { + public String getID(){ return "mutant_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -387,6 +389,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_search = new EntThinkAdapter() { + public String getID(){ return "mutant_search"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search, 1, Defines.ATTN_NORM, 0); @@ -395,6 +398,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_swing = new EntThinkAdapter() { + public String getID(){ return "mutant_swing"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_swing, 1, Defines.ATTN_NORM, 0); @@ -473,6 +477,7 @@ public class M_Mutant { FRAME_stand151, mutant_frames_stand, null); static EntThinkAdapter mutant_stand = new EntThinkAdapter() { + public String getID(){ return "mutant_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_stand; return true; @@ -484,6 +489,7 @@ public class M_Mutant { // static EntThinkAdapter mutant_idle_loop = new EntThinkAdapter() { + public String getID(){ return "mutant_idle_loop"; } public boolean think(edict_t self) { if (Lib.random() < 0.75) self.monsterinfo.nextframe = FRAME_stand155; @@ -512,6 +518,7 @@ public class M_Mutant { FRAME_stand164, mutant_frames_idle, mutant_stand); static EntThinkAdapter mutant_idle = new EntThinkAdapter() { + public String getID(){ return "mutant_idle"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_idle; GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, @@ -542,6 +549,7 @@ public class M_Mutant { mutant_frames_walk, null); static EntThinkAdapter mutant_walk_loop = new EntThinkAdapter() { + public String getID(){ return "mutant_walk_loop"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_walk; return true; @@ -558,6 +566,7 @@ public class M_Mutant { FRAME_walk04, mutant_frames_start_walk, mutant_walk_loop); static EntThinkAdapter mutant_walk = new EntThinkAdapter() { + public String getID(){ return "mutant_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_start_walk; return true; @@ -580,6 +589,7 @@ public class M_Mutant { mutant_frames_run, null); static EntThinkAdapter mutant_run = new EntThinkAdapter() { + public String getID(){ return "mutant_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = mutant_move_stand; @@ -595,6 +605,7 @@ public class M_Mutant { // static EntThinkAdapter mutant_hit_left = new EntThinkAdapter() { + public String getID(){ return "mutant_hit_left"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -610,6 +621,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_hit_right = new EntThinkAdapter() { + public String getID(){ return "mutant_hit_right"; } public boolean think(edict_t self) { float[] aim = { 0, 0, 0 }; @@ -625,6 +637,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_check_refire = new EntThinkAdapter() { + public String getID(){ return "mutant_check_refire"; } public boolean think(edict_t self) { if (null == self.enemy || !self.enemy.inuse || self.enemy.health <= 0) @@ -650,6 +663,7 @@ public class M_Mutant { FRAME_attack15, mutant_frames_attack, mutant_run); static EntThinkAdapter mutant_melee = new EntThinkAdapter() { + public String getID(){ return "mutant_melee"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_attack; return true; @@ -661,6 +675,7 @@ public class M_Mutant { // static EntTouchAdapter mutant_jump_touch = new EntTouchAdapter() { + public String getID(){ return "mutant_jump_touch"; } public void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf) { @@ -697,6 +712,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_jump_takeoff = new EntThinkAdapter() { + public String getID(){ return "mutant_jump_takeoff"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }; @@ -716,6 +732,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_check_landing = new EntThinkAdapter() { + public String getID(){ return "mutant_check_landing"; } public boolean think(edict_t self) { if (self.groundentity != null) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_thud, 1, @@ -747,6 +764,7 @@ public class M_Mutant { FRAME_attack08, mutant_frames_jump, mutant_run); static EntThinkAdapter mutant_jump = new EntThinkAdapter() { + public String getID(){ return "mutant_jump"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = mutant_move_jump; @@ -758,6 +776,7 @@ public class M_Mutant { // CHECKATTACK // static EntThinkAdapter mutant_check_melee = new EntThinkAdapter() { + public String getID(){ return "mutant_check_melee"; } public boolean think(edict_t self) { if (GameUtil.range(self, self.enemy) == Defines.RANGE_MELEE) return true; @@ -767,6 +786,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_check_jump = new EntThinkAdapter() { + public String getID(){ return "mutant_check_jump"; } public boolean think(edict_t self) { float[] v = { 0, 0, 0 }; @@ -795,6 +815,7 @@ public class M_Mutant { }; static EntThinkAdapter mutant_checkattack = new EntThinkAdapter() { + public String getID(){ return "mutant_checkattack"; } public boolean think(edict_t self) { if (null == self.enemy || self.enemy.health <= 0) @@ -857,6 +878,7 @@ public class M_Mutant { FRAME_pain311, mutant_frames_pain3, mutant_run); static EntPainAdapter mutant_pain = new EntPainAdapter() { + public String getID(){ return "mutant_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { float r; @@ -892,6 +914,7 @@ public class M_Mutant { // DEATH // static EntThinkAdapter mutant_dead = new EntThinkAdapter() { + public String getID(){ return "mutant_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -934,6 +957,7 @@ public class M_Mutant { FRAME_death210, mutant_frames_death2, mutant_dead); static EntDieAdapter mutant_die = new EntDieAdapter() { + public String getID(){ return "mutant_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -981,6 +1005,7 @@ public class M_Mutant { * Trigger_Spawn Sight */ public static EntThinkAdapter SP_monster_mutant = new EntThinkAdapter() { + public String getID(){ return "SP_monster_mutant"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); diff --git a/src/jake2/game/monsters/M_Parasite.java b/src/jake2/game/monsters/M_Parasite.java index 9aa56e6..f7bb56a 100644 --- a/src/jake2/game/monsters/M_Parasite.java +++ b/src/jake2/game/monsters/M_Parasite.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Parasite.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Parasite.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -304,6 +304,7 @@ public class M_Parasite { static int sound_search; static EntThinkAdapter parasite_launch = new EntThinkAdapter() { + public String getID(){ return "parasite_launch"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_launch, 1, @@ -313,6 +314,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_reel_in = new EntThinkAdapter() { + public String getID(){ return "parasite_reel_in"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_reelin, 1, Defines.ATTN_NORM, 0); @@ -321,6 +323,7 @@ public class M_Parasite { }; static EntInteractAdapter parasite_sight = new EntInteractAdapter() { + public String getID(){ return "parasite_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -329,6 +332,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_tap = new EntThinkAdapter() { + public String getID(){ return "parasite_tap"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_tap, 1, Defines.ATTN_IDLE, 0); @@ -337,6 +341,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_scratch = new EntThinkAdapter() { + public String getID(){ return "parasite_scratch"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_scratch, 1, Defines.ATTN_IDLE, 0); @@ -345,6 +350,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_search = new EntThinkAdapter() { + public String getID(){ return "parasite_search"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_search, 1, Defines.ATTN_IDLE, 0); @@ -353,6 +359,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_start_walk = new EntThinkAdapter() { + public String getID(){ return "parasite_start_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_start_walk; return true; @@ -360,6 +367,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_walk = new EntThinkAdapter() { + public String getID(){ return "parasite_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_walk; return true; @@ -367,6 +375,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_stand = new EntThinkAdapter() { + public String getID(){ return "parasite_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_stand; return true; @@ -374,6 +383,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_end_fidget = new EntThinkAdapter() { + public String getID(){ return "parasite_end_fidget"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_end_fidget; return true; @@ -381,6 +391,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_do_fidget = new EntThinkAdapter() { + public String getID(){ return "parasite_do_fidget"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_fidget; return true; @@ -388,6 +399,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_refidget = new EntThinkAdapter() { + public String getID(){ return "parasite_refidget"; } public boolean think(edict_t self) { if (Lib.random() <= 0.8) self.monsterinfo.currentmove = parasite_move_fidget; @@ -398,6 +410,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_idle = new EntThinkAdapter() { + public String getID(){ return "parasite_idle"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = parasite_move_start_fidget; return true; @@ -405,6 +418,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_start_run = new EntThinkAdapter() { + public String getID(){ return "parasite_start_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = parasite_move_stand; @@ -415,6 +429,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_run = new EntThinkAdapter() { + public String getID(){ return "parasite_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = parasite_move_stand; @@ -556,6 +571,7 @@ public class M_Parasite { FRAME_pain111, parasite_frames_pain1, parasite_start_run); static EntPainAdapter parasite_pain = new EntPainAdapter() { + public String getID(){ return "parasite_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -580,6 +596,7 @@ public class M_Parasite { }; static EntThinkAdapter parasite_drain_attack = new EntThinkAdapter() { + public String getID(){ return "parasite_drain_attack"; } public boolean think(edict_t self) { float[] offset = { 0, 0, 0 }, start = { 0, 0, 0 }, f = { 0, 0, 0 }, r = { 0, 0, 0 }, end = { 0, 0, 0 }, dir = { 0, 0, 0 }; @@ -700,6 +717,7 @@ public class M_Parasite { */ static EntThinkAdapter parasite_attack = new EntThinkAdapter() { + public String getID(){ return "parasite_attack"; } public boolean think(edict_t self) { // if (random() <= 0.2) // self.monsterinfo.currentmove = ¶site_move_break; @@ -714,6 +732,7 @@ public class M_Parasite { */ static EntThinkAdapter parasite_dead = new EntThinkAdapter() { + public String getID(){ return "parasite_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); Math3D.VectorSet(self.maxs, 16, 16, -8); @@ -738,6 +757,7 @@ public class M_Parasite { FRAME_death107, parasite_frames_death, parasite_dead); static EntDieAdapter parasite_die = new EntDieAdapter() { + public String getID(){ return "parasite_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -783,6 +803,7 @@ public class M_Parasite { */ public static EntThinkAdapter SP_monster_parasite = new EntThinkAdapter() { + public String getID(){ return "SP_monster_parasite"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); diff --git a/src/jake2/game/monsters/M_Soldier.java b/src/jake2/game/monsters/M_Soldier.java index 57225f9..42dad51 100644 --- a/src/jake2/game/monsters/M_Soldier.java +++ b/src/jake2/game/monsters/M_Soldier.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Soldier.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Soldier.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -1017,6 +1017,7 @@ public class M_Soldier { static int sound_cock; static EntThinkAdapter soldier_dead = new EntThinkAdapter() { + public String getID(){ return "soldier_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -24); @@ -1030,6 +1031,7 @@ public class M_Soldier { }; static EntDieAdapter soldier_die = new EntDieAdapter() { + public String getID(){ return "soldier_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -1092,6 +1094,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack1_refire1 = new EntThinkAdapter() { + public String getID(){ return "soldier_attack1_refire1"; } public boolean think(edict_t self) { if (self.s.skinnum > 1) return true; @@ -1109,6 +1112,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack1_refire2 = new EntThinkAdapter() { + public String getID(){ return "soldier_attack1_refire2"; } public boolean think(edict_t self) { if (self.s.skinnum < 2) return true; @@ -1124,6 +1128,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack2_refire1 = new EntThinkAdapter() { + public String getID(){ return "soldier_attack2_refire1"; } public boolean think(edict_t self) { if (self.s.skinnum > 1) return true; @@ -1141,6 +1146,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack2_refire2 = new EntThinkAdapter() { + public String getID(){ return "soldier_attack2_refire2"; } public boolean think(edict_t self) { if (self.s.skinnum < 2) return true; @@ -1156,6 +1162,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack3_refire = new EntThinkAdapter() { + public String getID(){ return "soldier_attack3_refire"; } public boolean think(edict_t self) { if ((GameBase.level.time + 0.4) < self.monsterinfo.pausetime) self.monsterinfo.nextframe = FRAME_attak303; @@ -1164,6 +1171,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_attack6_refire = new EntThinkAdapter() { + public String getID(){ return "soldier_attack6_refire"; } public boolean think(edict_t self) { if (self.enemy.health <= 0) return true; @@ -1179,6 +1187,7 @@ public class M_Soldier { // ATTACK6 (run & shoot) static EntThinkAdapter soldier_fire8 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire8"; } public boolean think(edict_t self) { soldier_fire(self, 7); return true; @@ -1188,6 +1197,7 @@ public class M_Soldier { // ATTACK1 (blaster/shotgun) static EntThinkAdapter soldier_fire1 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire1"; } public boolean think(edict_t self) { soldier_fire(self, 0); return true; @@ -1197,6 +1207,7 @@ public class M_Soldier { // ATTACK2 (blaster/shotgun) static EntThinkAdapter soldier_fire2 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire2"; } public boolean think(edict_t self) { soldier_fire(self, 1); return true; @@ -1204,6 +1215,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_duck_down = new EntThinkAdapter() { + public String getID(){ return "soldier_duck_down"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0) return true; @@ -1217,6 +1229,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_fire3 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire3"; } public boolean think(edict_t self) { soldier_duck_down.think(self); soldier_fire(self, 2); @@ -1227,6 +1240,7 @@ public class M_Soldier { // ATTACK4 (machinegun) static EntThinkAdapter soldier_fire4 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire4"; } public boolean think(edict_t self) { soldier_fire(self, 3); // @@ -1245,6 +1259,7 @@ public class M_Soldier { // static EntThinkAdapter soldier_fire6 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire6"; } public boolean think(edict_t self) { soldier_fire(self, 5); return true; @@ -1252,6 +1267,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_fire7 = new EntThinkAdapter() { + public String getID(){ return "soldier_fire7"; } public boolean think(edict_t self) { soldier_fire(self, 6); return true; @@ -1259,6 +1275,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_idle = new EntThinkAdapter() { + public String getID(){ return "soldier_idle"; } public boolean think(edict_t self) { if (Lib.random() > 0.8) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, @@ -1268,6 +1285,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_stand = new EntThinkAdapter() { + public String getID(){ return "soldier_stand"; } public boolean think(edict_t self) { if ((self.monsterinfo.currentmove == soldier_move_stand3) || (Lib.random() < 0.8)) @@ -1282,6 +1300,7 @@ public class M_Soldier { // WALK // static EntThinkAdapter soldier_walk1_random = new EntThinkAdapter() { + public String getID(){ return "soldier_walk1_random"; } public boolean think(edict_t self) { if (Lib.random() > 0.1) self.monsterinfo.nextframe = FRAME_walk101; @@ -1290,6 +1309,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_walk = new EntThinkAdapter() { + public String getID(){ return "soldier_walk"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) self.monsterinfo.currentmove = soldier_move_walk1; @@ -1300,6 +1320,7 @@ public class M_Soldier { }; static EntThinkAdapter soldier_run = new EntThinkAdapter() { + public String getID(){ return "soldier_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) { self.monsterinfo.currentmove = soldier_move_stand1; @@ -1319,6 +1340,7 @@ public class M_Soldier { }; static EntPainAdapter soldier_pain = new EntPainAdapter() { + public String getID(){ return "soldier_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { float r; int n; @@ -1371,6 +1393,7 @@ public class M_Soldier { // static EntThinkAdapter soldier_duck_up = new EntThinkAdapter() { + public String getID(){ return "soldier_duck_up"; } public boolean think(edict_t self) { self.monsterinfo.aiflags &= ~Defines.AI_DUCKED; self.maxs[2] += 32; @@ -1381,6 +1404,7 @@ public class M_Soldier { }; static EntInteractAdapter soldier_sight = new EntInteractAdapter() { + public String getID(){ return "soldier_sight"; } public boolean interact(edict_t self, edict_t other) { if (Lib.random() < 0.5) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight1, 1, @@ -1403,6 +1427,7 @@ public class M_Soldier { // static EntThinkAdapter SP_monster_soldier_x = new EntThinkAdapter() { + public String getID(){ return "SP_monster_soldier_x"; } public boolean think(edict_t self) { self.s.modelindex = GameBase.gi @@ -1445,6 +1470,7 @@ public class M_Soldier { * Trigger_Spawn Sight */ public static EntThinkAdapter SP_monster_soldier_light = new EntThinkAdapter() { + public String getID(){ return "SP_monster_soldier_light"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); @@ -1472,6 +1498,7 @@ public class M_Soldier { */ public static EntThinkAdapter SP_monster_soldier = new EntThinkAdapter() { + public String getID(){ return "SP_monster_soldier"; } public boolean think(edict_t self) { Com.DPrintf("Spawning a soldier at " + self.s.origin[0] + " " + self.s.origin[1] + " " + @@ -1501,6 +1528,7 @@ public class M_Soldier { * Trigger_Spawn Sight */ public static EntThinkAdapter SP_monster_soldier_ss = new EntThinkAdapter() { + public String getID(){ return "SP_monster_soldier_ss"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); @@ -1585,6 +1613,7 @@ public class M_Soldier { } static EntThinkAdapter soldier_cock = new EntThinkAdapter() { + public String getID(){ return "soldier_cock"; } public boolean think(edict_t self) { if (self.s.frame == FRAME_stand322) GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_cock, 1, @@ -1756,6 +1785,7 @@ public class M_Soldier { // static EntThinkAdapter soldier_duck_hold = new EntThinkAdapter() { + public String getID(){ return "soldier_duck_hold"; } public boolean think(edict_t self) { if (GameBase.level.time >= self.monsterinfo.pausetime) self.monsterinfo.aiflags &= ~Defines.AI_HOLD_FRAME; @@ -2188,6 +2218,7 @@ public class M_Soldier { // ATTACK3 (duck and shoot) static EntThinkAdapter soldier_attack = new EntThinkAdapter() { + public String getID(){ return "soldier_attack"; } public boolean think(edict_t self) { if (self.s.skinnum < 4) { if (Lib.random() < 0.5) @@ -2202,6 +2233,7 @@ public class M_Soldier { }; static EntDodgeAdapter soldier_dodge = new EntDodgeAdapter() { + public String getID(){ return "soldier_dodge"; } public void dodge(edict_t self, edict_t attacker, float eta) { float r; diff --git a/src/jake2/game/monsters/M_Supertank.java b/src/jake2/game/monsters/M_Supertank.java index 0d724e7..dd3bda3 100644 --- a/src/jake2/game/monsters/M_Supertank.java +++ b/src/jake2/game/monsters/M_Supertank.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Supertank.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Supertank.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -566,6 +566,7 @@ public class M_Supertank { static int tread_sound; static EntThinkAdapter TreadSound = new EntThinkAdapter() { + public String getID(){ return "TreadSound"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, tread_sound, 1, Defines.ATTN_NORM, 0); @@ -574,6 +575,7 @@ public class M_Supertank { }; static EntThinkAdapter supertank_search = new EntThinkAdapter() { + public String getID(){ return "supertank_search"; } public boolean think(edict_t self) { if (Lib.random() < 0.5) GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_search1, 1, @@ -655,6 +657,7 @@ public class M_Supertank { FRAME_stand_60, supertank_frames_stand, null); static EntThinkAdapter supertank_stand = new EntThinkAdapter() { + public String getID() { return "supertank_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = supertank_move_stand; return true; @@ -712,6 +715,7 @@ public class M_Supertank { FRAME_forwrd_18, supertank_frames_forward, null); static EntThinkAdapter supertank_forward = new EntThinkAdapter() { + public String getID(){ return "supertank_forward"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = supertank_move_forward; return true; @@ -719,6 +723,7 @@ public class M_Supertank { }; static EntThinkAdapter supertank_walk = new EntThinkAdapter() { + public String getID(){ return "supertank_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = supertank_move_forward; return true; @@ -726,6 +731,7 @@ public class M_Supertank { }; static EntThinkAdapter supertank_run = new EntThinkAdapter() { + public String getID(){ return "supertank_run"; } public boolean think(edict_t self) { if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) self.monsterinfo.currentmove = supertank_move_stand; @@ -739,6 +745,7 @@ public class M_Supertank { // death // static EntThinkAdapter supertank_dead = new EntThinkAdapter() { + public String getID(){ return "supertank_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -60, -60, 0); Math3D.VectorSet(self.maxs, 60, 60, 72); @@ -751,6 +758,7 @@ public class M_Supertank { }; static EntThinkAdapter supertankRocket = new EntThinkAdapter() { + public String getID(){ return "supertankRocket"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] start = { 0, 0, 0 }; @@ -784,6 +792,7 @@ public class M_Supertank { }; static EntThinkAdapter supertankMachineGun = new EntThinkAdapter() { + public String getID(){ return "supertankMachineGun"; } public boolean think(edict_t self) { float[] dir = { 0, 0, 0 }; float[] vec = { 0, 0, 0 }; @@ -820,6 +829,7 @@ public class M_Supertank { }; static EntThinkAdapter supertank_attack = new EntThinkAdapter() { + public String getID(){ return "supertank_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; float range; @@ -1046,6 +1056,7 @@ public class M_Supertank { FRAME_attak2_27, supertank_frames_attack2, supertank_run); static EntThinkAdapter supertank_reattack1 = new EntThinkAdapter() { + public String getID(){ return "supertank_reattack1"; } public boolean think(edict_t self) { if (GameUtil.visible(self, self.enemy)) if (Lib.random() < 0.9) @@ -1089,6 +1100,7 @@ public class M_Supertank { FRAME_attak1_20, supertank_frames_end_attack1, supertank_run); static EntPainAdapter supertank_pain = new EntPainAdapter() { + public String getID(){ return "supertank_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum = 1; @@ -1129,6 +1141,7 @@ public class M_Supertank { }; static EntDieAdapter supertank_die = new EntDieAdapter() { + public String getID(){ return "supertank_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_death, 1, @@ -1149,6 +1162,7 @@ public class M_Supertank { * Trigger_Spawn Sight */ public static EntThinkAdapter SP_monster_supertank = new EntThinkAdapter() { + public String getID(){ return "SP_monster_supertank"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); @@ -1200,6 +1214,7 @@ public class M_Supertank { /** Common Boss explode animation. */ public static EntThinkAdapter BossExplode = new EntThinkAdapter() { + public String getID(){ return "BossExplode"; } public boolean think(edict_t self) { float[] org = { 0, 0, 0 }; diff --git a/src/jake2/game/monsters/M_Tank.java b/src/jake2/game/monsters/M_Tank.java index 62353ac..ef2f6e6 100644 --- a/src/jake2/game/monsters/M_Tank.java +++ b/src/jake2/game/monsters/M_Tank.java @@ -19,7 +19,7 @@ */ // Created on 13.11.2003 by RST. -// $Id: M_Tank.java,v 1.3 2005-11-16 22:24:52 salomo Exp $ +// $Id: M_Tank.java,v 1.4 2005-11-20 22:18:33 salomo Exp $ package jake2.game.monsters; import jake2.Defines; @@ -654,6 +654,7 @@ public class M_Tank { // static EntInteractAdapter tank_sight = new EntInteractAdapter() { + public String getID(){ return "tank_sight"; } public boolean interact(edict_t self, edict_t other) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_sight, 1, Defines.ATTN_NORM, 0); @@ -662,6 +663,7 @@ public class M_Tank { }; static EntThinkAdapter tank_footstep = new EntThinkAdapter() { + public String getID(){ return "tank_footstep"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_step, 1, Defines.ATTN_NORM, 0); @@ -670,6 +672,7 @@ public class M_Tank { }; static EntThinkAdapter tank_thud = new EntThinkAdapter() { + public String getID(){ return "tank_thud"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_BODY, sound_thud, 1, Defines.ATTN_NORM, 0); @@ -678,6 +681,7 @@ public class M_Tank { }; static EntThinkAdapter tank_windup = new EntThinkAdapter() { + public String getID(){ return "tank_windup"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_windup, 1, Defines.ATTN_NORM, 0); @@ -686,6 +690,7 @@ public class M_Tank { }; static EntThinkAdapter tank_idle = new EntThinkAdapter() { + public String getID(){ return "tank_idle"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_idle, 1, Defines.ATTN_IDLE, 0); @@ -733,6 +738,7 @@ public class M_Tank { tank_frames_stand, null); static EntThinkAdapter tank_stand = new EntThinkAdapter() { + public String getID(){ return "tank_stand"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = tank_move_stand; return true; @@ -743,6 +749,7 @@ public class M_Tank { // walk // static EntThinkAdapter tank_run = new EntThinkAdapter() { + public String getID(){ return "tank_run"; } public boolean think(edict_t self) { if (self.enemy != null && self.enemy.client != null) self.monsterinfo.aiflags |= Defines.AI_BRUTAL; @@ -765,6 +772,7 @@ public class M_Tank { }; static EntThinkAdapter tank_walk = new EntThinkAdapter() { + public String getID(){ return "tank_walk"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = tank_move_walk; return true; @@ -900,6 +908,7 @@ public class M_Tank { tank_frames_pain3, tank_run); static EntPainAdapter tank_pain = new EntPainAdapter() { + public String getID(){ return "tank_pain"; } public void pain(edict_t self, edict_t other, float kick, int damage) { if (self.health < (self.max_health / 2)) self.s.skinnum |= 1; @@ -945,6 +954,7 @@ public class M_Tank { // static EntThinkAdapter TankBlaster = new EntThinkAdapter() { + public String getID(){ return "TankBlaster"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] start = { 0, 0, 0 }; @@ -977,6 +987,7 @@ public class M_Tank { }; static EntThinkAdapter TankStrike = new EntThinkAdapter() { + public String getID(){ return "TankStrike"; } public boolean think(edict_t self) { GameBase.gi.sound(self, Defines.CHAN_WEAPON, sound_strike, 1, Defines.ATTN_NORM, 0); @@ -986,6 +997,7 @@ public class M_Tank { }; static EntThinkAdapter TankRocket = new EntThinkAdapter() { + public String getID(){ return "TankRocket"; } public boolean think(edict_t self) { float[] forward = { 0, 0, 0 }, right = { 0, 0, 0 }; float[] start = { 0, 0, 0 }; @@ -1019,6 +1031,7 @@ public class M_Tank { }; static EntThinkAdapter TankMachineGun = new EntThinkAdapter() { + public String getID(){ return "TankMachineGun"; } public boolean think(edict_t self) { float[] dir = { 0, 0, 0 }; @@ -1061,6 +1074,7 @@ public class M_Tank { }; static EntThinkAdapter tank_reattack_blaster = new EntThinkAdapter() { + public String getID(){ return "tank_reattack_blaster"; } public boolean think(edict_t self) { if (GameBase.skill.value >= 2) if (GameUtil.visible(self, self.enemy)) @@ -1122,6 +1136,7 @@ public class M_Tank { FRAME_attak122, tank_frames_attack_post_blast, tank_run); static EntThinkAdapter tank_poststrike = new EntThinkAdapter() { + public String getID(){ return "tank_poststrike"; } public boolean think(edict_t self) { self.enemy = null; tank_run.think(self); @@ -1130,6 +1145,7 @@ public class M_Tank { }; static EntThinkAdapter tank_doattack_rocket = new EntThinkAdapter() { + public String getID(){ return "tank_doattack_rocket"; } public boolean think(edict_t self) { self.monsterinfo.currentmove = tank_move_attack_fire_rocket; return true; @@ -1137,6 +1153,7 @@ public class M_Tank { }; static EntThinkAdapter tank_refire_rocket = new EntThinkAdapter() { + public String getID(){ return "tank_refire_rocket"; } public boolean think(edict_t self) { // Only on hard or nightmare if (GameBase.skill.value >= 2) @@ -1306,6 +1323,7 @@ public class M_Tank { FRAME_attak429, tank_frames_attack_chain, tank_run); static EntThinkAdapter tank_attack = new EntThinkAdapter() { + public String getID(){ return "tank_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; float range; @@ -1353,6 +1371,7 @@ public class M_Tank { // death // static EntThinkAdapter tank_dead = new EntThinkAdapter() { + public String getID(){ return "tank_dead"; } public boolean think(edict_t self) { Math3D.VectorSet(self.mins, -16, -16, -16); Math3D.VectorSet(self.maxs, 16, 16, -0); @@ -1402,6 +1421,7 @@ public class M_Tank { FRAME_death132, tank_frames_death1, tank_dead); static EntDieAdapter tank_die = new EntDieAdapter() { + public String getID(){ return "tank_die"; } public void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; @@ -1455,6 +1475,7 @@ public class M_Tank { * Trigger_Spawn Sight */ public static EntThinkAdapter SP_monster_tank = new EntThinkAdapter() { + public String getID(){ return "SP_monster_tank"; } public boolean think(edict_t self) { if (GameBase.deathmatch.value != 0) { GameUtil.G_FreeEdict(self); diff --git a/src/jake2/util/QuakeFile.java b/src/jake2/util/QuakeFile.java index 431a961..8ff6c28 100644 --- a/src/jake2/util/QuakeFile.java +++ b/src/jake2/util/QuakeFile.java @@ -20,7 +20,7 @@ // Created on 24.07.2004 by RST. -// $Id: QuakeFile.java,v 1.5 2005-11-16 22:24:53 salomo Exp $ +// $Id: QuakeFile.java,v 1.6 2005-11-20 22:18:34 salomo Exp $ package jake2.util; @@ -156,7 +156,7 @@ public class QuakeFile extends RandomAccessFile { if (ndx == -1) return null; else - return GameItems.itemlist[ndx]; + return GameItemList.itemlist[ndx]; } }
\ No newline at end of file |