diff options
Diffstat (limited to 'src/jake2/game/GameItems.java')
-rw-r--r-- | src/jake2/game/GameItems.java | 770 |
1 files changed, 37 insertions, 733 deletions
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)) |