Merge branch 'samual/weapons' into Mario/weapons
authorMario <zacjardine@y7mail.com>
Thu, 6 Nov 2014 06:55:52 +0000 (17:55 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 6 Nov 2014 06:55:52 +0000 (17:55 +1100)
27 files changed:
bal-wep-xonotic.cfg
balance-xonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/miscfunctions.qc
qcsrc/common/constants.qh
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh
qcsrc/server/autocvars.qh
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/mutator_nix.qc
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh
qcsrc/server/t_quake3.qc
qcsrc/server/w_shotgun.qc [deleted file]
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/throwing.qc

index 562119b..db8d41d 100644 (file)
@@ -509,7 +509,7 @@ set g_balance_hook_primary_animtime 0.3
 set g_balance_hook_primary_hooked_ammo 5
 set g_balance_hook_primary_hooked_time_free 2
 set g_balance_hook_primary_hooked_time_max 0
-set g_balance_hook_primary_refire 0
+set g_balance_hook_primary_refire 0.2
 set g_balance_hook_secondary_animtime 0.3
 set g_balance_hook_secondary_damage 25
 set g_balance_hook_secondary_damageforcescale 0
index bb25c17..dc4b4b9 100644 (file)
@@ -21,6 +21,7 @@ set g_start_ammo_shells 15
 set g_start_ammo_nails 0
 set g_start_ammo_rockets 0
 set g_start_ammo_cells 0
+set g_start_ammo_plasma 0
 set g_start_ammo_fuel 0
 set g_warmup_start_health 100 "starting values when being in warmup-stage"
 set g_warmup_start_armor 100 "starting values when being in warmup-stage"
@@ -28,6 +29,7 @@ set g_warmup_start_ammo_shells 30 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_nails 160 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_rockets 80 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_cells 90 "starting values when being in warmup-stage"
+set g_warmup_start_ammo_plasma 90 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
 set g_lms_start_health 200
 set g_lms_start_armor 200
@@ -35,6 +37,7 @@ set g_lms_start_ammo_shells 60
 set g_lms_start_ammo_nails 320
 set g_lms_start_ammo_rockets 160
 set g_lms_start_ammo_cells 180
+set g_lms_start_ammo_plasma 180
 set g_lms_start_ammo_fuel 0
 set g_balance_nix_roundtime 25
 set g_balance_nix_incrtime 1.6
@@ -42,11 +45,13 @@ set g_balance_nix_ammo_shells 60
 set g_balance_nix_ammo_nails 320
 set g_balance_nix_ammo_rockets 160
 set g_balance_nix_ammo_cells 180
+set g_balance_nix_ammo_plasma 180
 set g_balance_nix_ammo_fuel 0
 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume
 set g_balance_nix_ammoincr_nails 6
 set g_balance_nix_ammoincr_rockets 2
 set g_balance_nix_ammoincr_cells 2
+set g_balance_nix_ammoincr_plasma 2
 set g_balance_nix_ammoincr_fuel 2
 // }}}
 
@@ -65,6 +70,9 @@ set g_pickup_rockets_max 160
 set g_pickup_cells 30
 set g_pickup_cells_weapon 30
 set g_pickup_cells_max 180
+set g_pickup_plasma 30
+set g_pickup_plasma_weapon 30
+set g_pickup_plasma_max 180
 set g_pickup_fuel 50
 set g_pickup_fuel_weapon 50
 set g_pickup_fuel_jetpack 100
index 590325f..053499a 100644 (file)
@@ -323,6 +323,7 @@ float autocvar_hud_panel_weapons_ammo;
 float autocvar_hud_panel_weapons_ammo_alpha;
 string autocvar_hud_panel_weapons_ammo_color;
 float autocvar_hud_panel_weapons_ammo_full_cells;
+float autocvar_hud_panel_weapons_ammo_full_plasma;
 float autocvar_hud_panel_weapons_ammo_full_fuel;
 float autocvar_hud_panel_weapons_ammo_full_nails;
 float autocvar_hud_panel_weapons_ammo_full_rockets;
index 811b364..acd22fe 100644 (file)
@@ -762,6 +762,7 @@ void HUD_Weapons(void)
                                                case ammo_nails:   ammo_full = autocvar_hud_panel_weapons_ammo_full_nails;   break;
                                                case ammo_rockets: ammo_full = autocvar_hud_panel_weapons_ammo_full_rockets; break;
                                                case ammo_cells:   ammo_full = autocvar_hud_panel_weapons_ammo_full_cells;   break;
+                                               case ammo_plasma:  ammo_full = autocvar_hud_panel_weapons_ammo_full_plasma;  break;
                                                case ammo_fuel:    ammo_full = autocvar_hud_panel_weapons_ammo_full_fuel;    break;
                                                default: ammo_full = 60;
                                        }
@@ -924,7 +925,7 @@ void HUD_Ammo(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       const float AMMO_COUNT = 4;
+       const float AMMO_COUNT = 5;
        float rows = 0, columns, row, column;
        vector ammo_size;
        if(autocvar_hud_panel_ammo_onlycurrent)
index 4b00f12..fbdbc45 100644 (file)
@@ -578,20 +578,6 @@ vector getplayerorigin(float pl)
        return GETPLAYERORIGIN_ERROR;
 }
 
-vector getcsqcplayercolor(float pl)
-{
-       entity e;
-       
-       e = CSQCModel_server2csqc(pl);
-       if(e)
-       {
-               if(e.colormap > 0)
-                       return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, TRUE);
-       }
-       
-       return '1 1 1';
-}
-
 float getplayeralpha(float pl)
 {
        entity e;
index c270689..ee8a228 100644 (file)
@@ -185,6 +185,8 @@ const float STAT_WEAPONS3 = 75;
 const float STAT_MONSTERS_TOTAL = 76;
 const float STAT_MONSTERS_KILLED = 77;
 
+const float STAT_PLASMA = 80;
+
 // mod stats (1xx)
 const float STAT_REDALIVE = 100;
 const float STAT_BLUEALIVE = 101;
index ffc62ea..fd86dbb 100644 (file)
@@ -70,7 +70,7 @@ float friend_needshelp(entity e)
        switch(self.skin)
        {
                case 0: return (e.health < autocvar_g_balance_health_regenstable);
-               case 1: return ((e.ammo_cells && e.ammo_cells < g_pickup_cells_max) || (e.ammo_rockets && e.ammo_rockets < g_pickup_rockets_max) || (e.ammo_nails && e.ammo_nails < g_pickup_nails_max) || (e.ammo_shells && e.ammo_shells < g_pickup_shells_max));
+               case 1: return ((e.ammo_cells && e.ammo_cells < g_pickup_cells_max) || (e.ammo_plasma && e.ammo_plasma < g_pickup_plasma_max) || (e.ammo_rockets && e.ammo_rockets < g_pickup_rockets_max) || (e.ammo_nails && e.ammo_nails < g_pickup_nails_max) || (e.ammo_shells && e.ammo_shells < g_pickup_shells_max));
                case 2: return (e.armorvalue < autocvar_g_balance_armor_regenstable);
                case 3: return (e.health > 0);
        }
@@ -209,6 +209,7 @@ void mage_heal()
                                        break;
                                case 1:
                                        if(head.ammo_cells) head.ammo_cells = bound(head.ammo_cells, head.ammo_cells + 1, g_pickup_cells_max);
+                                       if(head.ammo_plasma) head.ammo_plasma = bound(head.ammo_plasma, head.ammo_plasma + 1, g_pickup_plasma_max);
                                        if(head.ammo_rockets) head.ammo_rockets = bound(head.ammo_rockets, head.ammo_rockets + 1, g_pickup_rockets_max);
                                        if(head.ammo_shells) head.ammo_shells = bound(head.ammo_shells, head.ammo_shells + 2, g_pickup_shells_max);
                                        if(head.ammo_nails) head.ammo_nails = bound(head.ammo_nails, head.ammo_nails + 5, g_pickup_nails_max);
index d17826a..f37e2d4 100644 (file)
@@ -2,7 +2,7 @@
 REGISTER_WEAPON(
 /* WEP_##id  */ CRYLINK,
 /* function  */ W_Crylink,
-/* ammotype  */ ammo_cells,
+/* ammotype  */ ammo_plasma,
 /* impulse   */ 6,
 /* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
 /* rating    */ BOT_PICKUP_RATING_MID,
index 6512d04..784f205 100644 (file)
@@ -2,7 +2,7 @@
 REGISTER_WEAPON(
 /* WEP_##id  */ VORTEX,
 /* function  */ W_Vortex,
-/* ammotype  */ ammo_cells,
+/* ammotype  */ ammo_plasma,
 /* impulse   */ 7,
 /* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
 /* rating    */ BOT_PICKUP_RATING_HIGH,
index b5aedfd..51fd20f 100644 (file)
@@ -269,6 +269,7 @@ string GetAmmoPicture(.float ammotype)
                case ammo_nails:   return "ammo_bullets";
                case ammo_rockets: return "ammo_rockets";
                case ammo_cells:   return "ammo_cells";
+               case ammo_plasma:  return "ammo_cells";
                case ammo_fuel:    return "ammo_fuel";
                default: return ""; // wtf, no ammo type?
        }
@@ -283,7 +284,8 @@ string GetAmmoPicture(.float ammotype)
                case 1: return ammo_nails;
                case 2: return ammo_rockets;
                case 3: return ammo_cells;
-               case 4: return ammo_fuel;
+               case 4: return ammo_plasma;
+               case 5: return ammo_fuel;
                default: return ammo_none;
        }
 }
@@ -296,6 +298,7 @@ float GetAmmoStat(.float ammotype)
                case ammo_nails: return STAT_NAILS;
                case ammo_rockets: return STAT_ROCKETS;
                case ammo_cells: return STAT_CELLS;
+               case ammo_plasma: return STAT_PLASMA;
                case ammo_fuel: return STAT_FUEL;
                default: return -1;
        }
index f39453f..af03108 100644 (file)
@@ -83,6 +83,7 @@ float GetAmmoStat(.float ammotype);
 .float ammo_nails;
 .float ammo_rockets;
 .float ammo_cells;
+.float ammo_plasma;
 .float ammo_fuel;
 .float ammo_none;
 
index e268015..8387dc6 100644 (file)
@@ -144,11 +144,13 @@ float autocvar_g_balance_nexball_secondary_lifetime;
 float autocvar_g_balance_nexball_secondary_refire;
 float autocvar_g_balance_nexball_secondary_speed;
 float autocvar_g_balance_nix_ammo_cells;
+float autocvar_g_balance_nix_ammo_plasma;
 float autocvar_g_balance_nix_ammo_fuel;
 float autocvar_g_balance_nix_ammo_nails;
 float autocvar_g_balance_nix_ammo_rockets;
 float autocvar_g_balance_nix_ammo_shells;
 float autocvar_g_balance_nix_ammoincr_cells;
+float autocvar_g_balance_nix_ammoincr_plasma;
 float autocvar_g_balance_nix_ammoincr_fuel;
 float autocvar_g_balance_nix_ammoincr_nails;
 float autocvar_g_balance_nix_ammoincr_rockets;
@@ -429,6 +431,7 @@ float autocvar_g_onslaught_cp_health;
 float autocvar_g_onslaught_cp_regen;
 float autocvar_g_onslaught_gen_health;
 float autocvar_g_pickup_cells_max;
+float autocvar_g_pickup_plasma_max;
 float autocvar_g_pickup_fuel_max;
 float autocvar_g_pickup_items;
 float autocvar_g_pickup_nails_max;
index 45f5a6e..f682b69 100644 (file)
@@ -98,7 +98,10 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius)
                                        if (head.ammo_rockets && player.ammo_rockets > self.ammo_rockets)
                                                continue;
 
-                                       if (head.ammo_cells && player.ammo_cells > self.ammo_cells )
+                                       if (head.ammo_cells && player.ammo_cells > self.ammo_cells)
+                                               continue;
+
+                                       if (head.ammo_plasma && player.ammo_plasma > self.ammo_plasma)
                                                continue;
 
                                        discard = FALSE;
index 4ffa3c8..22b793d 100644 (file)
@@ -140,6 +140,7 @@ float CheatImpulse(float i)
                        self.personal.ammo_rockets = self.ammo_rockets;
                        self.personal.ammo_nails = self.ammo_nails;
                        self.personal.ammo_cells = self.ammo_cells;
+                       self.personal.ammo_plasma = self.ammo_plasma;
                        self.personal.ammo_shells = self.ammo_shells;
                        self.personal.ammo_fuel = self.ammo_fuel;
                        self.personal.health = self.health;
@@ -197,6 +198,7 @@ float CheatImpulse(float i)
                                self.ammo_rockets = self.personal.ammo_rockets;
                                self.ammo_nails = self.personal.ammo_nails;
                                self.ammo_cells = self.personal.ammo_cells;
+                               self.ammo_plasma = self.personal.ammo_plasma;
                                self.ammo_shells = self.personal.ammo_shells;
                                self.ammo_fuel = self.personal.ammo_fuel;
                                self.health = self.personal.health;
index a4df63e..c29523b 100644 (file)
@@ -441,6 +441,7 @@ void PutClientInServer (void)
                        self.ammo_nails = warmup_start_ammo_nails;
                        self.ammo_rockets = warmup_start_ammo_rockets;
                        self.ammo_cells = warmup_start_ammo_cells;
+                       self.ammo_plasma = warmup_start_ammo_plasma;
                        self.ammo_fuel = warmup_start_ammo_fuel;
                        self.health = warmup_start_health;
                        self.armorvalue = warmup_start_armorvalue;
@@ -452,6 +453,7 @@ void PutClientInServer (void)
                        self.ammo_nails = start_ammo_nails;
                        self.ammo_rockets = start_ammo_rockets;
                        self.ammo_cells = start_ammo_cells;
+                       self.ammo_plasma = start_ammo_plasma;
                        self.ammo_fuel = start_ammo_fuel;
                        self.health = start_health;
                        self.armorvalue = start_armorvalue;
@@ -1686,6 +1688,7 @@ void SpectateCopy(entity spectatee) {
        self.armortype = spectatee.armortype;
        self.armorvalue = spectatee.armorvalue;
        self.ammo_cells = spectatee.ammo_cells;
+       self.ammo_plasma = spectatee.ammo_plasma;
        self.ammo_shells = spectatee.ammo_shells;
        self.ammo_nails = spectatee.ammo_nails;
        self.ammo_rockets = spectatee.ammo_rockets;
index 5c65e69..b7c9707 100644 (file)
@@ -778,6 +778,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SUPERWEAPONS_FINISHED, AS_FLOAT, superweapons_finished);
        addstat(STAT_PRESSED_KEYS, AS_FLOAT, pressedkeys);
        addstat(STAT_FUEL, AS_INT, ammo_fuel);
+       addstat(STAT_PLASMA, AS_INT, ammo_plasma);
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load);
index f586190..77ebe64 100644 (file)
@@ -361,6 +361,7 @@ string formatmessage(string msg)
                        else if (self.items & IT_NAILS) replacement = "bullets";
                        else if (self.items & IT_ROCKETS) replacement = "rockets";
                        else if (self.items & IT_CELLS) replacement = "cells";
+                       else if (self.items & IT_PLASMA) replacement = "plasma";
                        else replacement = "batteries"; // ;)
                } else if (escape == "x") {
                        replacement = cursor_ent.netname;
@@ -562,6 +563,8 @@ float g_pickup_rockets;
 float g_pickup_rockets_max;
 float g_pickup_cells;
 float g_pickup_cells_max;
+float g_pickup_plasma;
+float g_pickup_plasma_max;
 float g_pickup_fuel;
 float g_pickup_fuel_jetpack;
 float g_pickup_fuel_max;
@@ -610,6 +613,7 @@ float start_ammo_shells;
 float start_ammo_nails;
 float start_ammo_rockets;
 float start_ammo_cells;
+float start_ammo_plasma;
 float start_ammo_fuel;
 float start_health;
 float start_armorvalue;
@@ -621,6 +625,7 @@ float warmup_start_ammo_shells;
 float warmup_start_ammo_nails;
 float warmup_start_ammo_rockets;
 float warmup_start_ammo_cells;
+float warmup_start_ammo_plasma;
 float warmup_start_ammo_fuel;
 float warmup_start_health;
 float warmup_start_armorvalue;
@@ -684,6 +689,7 @@ void readplayerstartcvars()
        start_ammo_nails = 0;
        start_ammo_rockets = 0;
        start_ammo_cells = 0;
+       start_ammo_plasma = 0;
        start_health = cvar("g_balance_health_start");
        start_armorvalue = cvar("g_balance_armor_start");
 
@@ -794,6 +800,7 @@ void readplayerstartcvars()
                start_ammo_rockets = 999;
                start_ammo_shells = 999;
                start_ammo_cells = 999;
+               start_ammo_plasma = 999;
                start_ammo_nails = 999;
                start_ammo_fuel = 999;
        }
@@ -803,6 +810,7 @@ void readplayerstartcvars()
                start_ammo_nails = cvar("g_start_ammo_nails");
                start_ammo_rockets = cvar("g_start_ammo_rockets");
                start_ammo_cells = cvar("g_start_ammo_cells");
+               start_ammo_plasma = cvar("g_start_ammo_plasma");
                start_ammo_fuel = cvar("g_start_ammo_fuel");
        }
 
@@ -871,12 +879,14 @@ void readplayerstartcvars()
        start_ammo_shells = max(0, start_ammo_shells);
        start_ammo_nails = max(0, start_ammo_nails);
        start_ammo_cells = max(0, start_ammo_cells);
+       start_ammo_plasma = max(0, start_ammo_plasma);
        start_ammo_rockets = max(0, start_ammo_rockets);
        start_ammo_fuel = max(0, start_ammo_fuel);
 
        warmup_start_ammo_shells = max(0, warmup_start_ammo_shells);
        warmup_start_ammo_nails = max(0, warmup_start_ammo_nails);
        warmup_start_ammo_cells = max(0, warmup_start_ammo_cells);
+       warmup_start_ammo_plasma = max(0, warmup_start_ammo_plasma);
        warmup_start_ammo_rockets = max(0, warmup_start_ammo_rockets);
        warmup_start_ammo_fuel = max(0, warmup_start_ammo_fuel);
 }
@@ -1001,6 +1011,8 @@ void readlevelcvars(void)
        g_pickup_rockets_max = cvar("g_pickup_rockets_max");
        g_pickup_cells = cvar("g_pickup_cells");
        g_pickup_cells_max = cvar("g_pickup_cells_max");
+       g_pickup_plasma = cvar("g_pickup_plasma");
+       g_pickup_plasma_max = cvar("g_pickup_plasma_max");
        g_pickup_fuel = cvar("g_pickup_fuel");
        g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack");
        g_pickup_fuel_max = cvar("g_pickup_fuel_max");
index 78a08c5..4ee54f0 100644 (file)
@@ -103,7 +103,7 @@ MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon);
        // returns 1 if throwing the current weapon shall not be allowed
 
 MUTATOR_HOOKABLE(SetStartItems);
-       // adjusts {warmup_}start_{items,weapons,ammo_{cells,rockets,nails,shells,fuel}}
+       // adjusts {warmup_}start_{items,weapons,ammo_{cells,plasma,rockets,nails,shells,fuel}}
 
 MUTATOR_HOOKABLE(BuildMutatorsString);
        // appends ":mutatorname" to ret_string for logging
index 8a6315c..2b30c8a 100644 (file)
@@ -229,6 +229,7 @@ MUTATOR_HOOKFUNCTION(ca_SetStartItems)
        start_ammo_nails   = warmup_start_ammo_nails   = cvar("g_lms_start_ammo_nails");
        start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
+       start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
 
        return 0;
index fb0bb2e..0684ac8 100644 (file)
@@ -135,6 +135,7 @@ MUTATOR_HOOKFUNCTION(lms_SetStartItems)
        start_ammo_nails   = warmup_start_ammo_nails   = cvar("g_lms_start_ammo_nails");
        start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
+       start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
 
        return FALSE;
index 4603a1c..5ea5f1a 100644 (file)
@@ -64,7 +64,7 @@ void NIX_GiveCurrentWeapon()
 
        if(nix_nextchange != self.nix_lastchange_id) // this shall only be called once per round!
        {
-               self.ammo_shells = self.ammo_nails = self.ammo_rockets = self.ammo_cells = self.ammo_fuel = 0;
+               self.ammo_shells = self.ammo_nails = self.ammo_rockets = self.ammo_cells = self.ammo_plasma = self.ammo_fuel = 0;
                
                if(self.items & IT_UNLIMITED_WEAPON_AMMO)
                {
@@ -74,6 +74,7 @@ void NIX_GiveCurrentWeapon()
                                case ammo_nails:   self.ammo_nails   = autocvar_g_pickup_nails_max;   break;
                                case ammo_rockets: self.ammo_rockets = autocvar_g_pickup_rockets_max; break;
                                case ammo_cells:   self.ammo_cells   = autocvar_g_pickup_cells_max;   break;
+                               case ammo_plasma:  self.ammo_plasma  = autocvar_g_pickup_plasma_max;   break;
                                case ammo_fuel:    self.ammo_fuel    = autocvar_g_pickup_fuel_max;    break;
                        }
                }
@@ -85,6 +86,7 @@ void NIX_GiveCurrentWeapon()
                                case ammo_nails:   self.ammo_nails   = autocvar_g_balance_nix_ammo_nails;   break;
                                case ammo_rockets: self.ammo_rockets = autocvar_g_balance_nix_ammo_rockets; break;
                                case ammo_cells:   self.ammo_cells   = autocvar_g_balance_nix_ammo_cells;   break;
+                               case ammo_plasma:  self.ammo_plasma  = autocvar_g_balance_nix_ammo_plasma;   break;
                                case ammo_fuel:    self.ammo_fuel    = autocvar_g_balance_nix_ammo_fuel;    break;
                        }
                }
@@ -127,6 +129,7 @@ void NIX_GiveCurrentWeapon()
                        case ammo_nails:   self.ammo_nails   += autocvar_g_balance_nix_ammoincr_nails;   break;
                        case ammo_rockets: self.ammo_rockets += autocvar_g_balance_nix_ammoincr_rockets; break;
                        case ammo_cells:   self.ammo_cells   += autocvar_g_balance_nix_ammoincr_cells;   break;
+                       case ammo_plasma:  self.ammo_plasma  += autocvar_g_balance_nix_ammoincr_plasma;   break;
                        case ammo_fuel:    self.ammo_fuel    += autocvar_g_balance_nix_ammoincr_fuel;    break;
                }
 
@@ -256,6 +259,7 @@ MUTATOR_DEFINITION(mutator_nix)
                FOR_EACH_PLAYER(e) if(e.deadflag == DEAD_NO)
                {
                        e.ammo_cells = start_ammo_cells;
+                       e.ammo_plasma = start_ammo_plasma;
                        e.ammo_shells = start_ammo_shells;
                        e.ammo_nails = start_ammo_nails;
                        e.ammo_rockets = start_ammo_rockets;
index 35f9731..0e02098 100644 (file)
@@ -573,6 +573,7 @@ float Item_GiveTo(entity item, entity player)
        pickedup |= Item_GiveAmmoTo(item, player, ammo_nails, g_pickup_nails_max, ITEM_MODE_NONE);
        pickedup |= Item_GiveAmmoTo(item, player, ammo_rockets, g_pickup_rockets_max, ITEM_MODE_NONE);
        pickedup |= Item_GiveAmmoTo(item, player, ammo_cells, g_pickup_cells_max, ITEM_MODE_NONE);
+       pickedup |= Item_GiveAmmoTo(item, player, ammo_plasma, g_pickup_plasma_max, ITEM_MODE_NONE);
        pickedup |= Item_GiveAmmoTo(item, player, health, item.max_health, ITEM_MODE_HEALTH);
        pickedup |= Item_GiveAmmoTo(item, player, armorvalue, item.max_armorvalue, ITEM_MODE_ARMOR);
 
@@ -783,7 +784,7 @@ float weapon_pickupevalfunc(entity player, entity item)
                // If I can pick it up
                if(!item.spawnshieldtime)
                        c = 0;
-               else if(player.ammo_cells || player.ammo_shells || player.ammo_nails || player.ammo_rockets)
+               else if(player.ammo_cells || player.ammo_shells || player.ammo_plasma || player.ammo_nails || player.ammo_rockets)
                {
                        // Skilled bots will grab more
                        c = bound(0, skill / 10, 1) * 0.5;
@@ -826,7 +827,7 @@ float weapon_pickupevalfunc(entity player, entity item)
 float commodity_pickupevalfunc(entity player, entity item)
 {
        float c, i;
-       float need_shells = FALSE, need_nails = FALSE, need_rockets = FALSE, need_cells = FALSE, need_fuel = FALSE;
+       float need_shells = FALSE, need_nails = FALSE, need_rockets = FALSE, need_cells = FALSE, need_plasma = FALSE, need_fuel = FALSE;
        entity wi;
        c = 0;
 
@@ -846,6 +847,8 @@ float commodity_pickupevalfunc(entity player, entity item)
                        need_rockets = TRUE;
                else if(wi.items & IT_CELLS)
                        need_cells = TRUE;
+               else if(wi.items & IT_PLASMA)
+                       need_plasma = TRUE;
                else if(wi.items & IT_FUEL)
                        need_cells = TRUE;
        }
@@ -869,6 +872,10 @@ float commodity_pickupevalfunc(entity player, entity item)
        if (item.ammo_cells)
        if (player.ammo_cells < g_pickup_cells_max)
                c = c + max(0, 1 - player.ammo_cells / g_pickup_cells_max);
+       if (need_plasma)
+       if (item.ammo_plasma)
+       if (player.ammo_plasma < g_pickup_plasma_max)
+               c = c + max(0, 1 - player.ammo_plasma / g_pickup_plasma_max);
        if (need_fuel)
        if (item.ammo_fuel)
        if (player.ammo_fuel < g_pickup_fuel_max)
@@ -1145,6 +1152,15 @@ void spawnfunc_item_cells (void) {
        StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "cells", IT_CELLS, 0, 0, commodity_pickupevalfunc, 2000);
 }
 
+void spawnfunc_item_plasma()
+{
+       if(!self.ammo_plasma)
+               self.ammo_plasma = g_pickup_plasma;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_ammo_anyway;
+       StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "plasma", IT_PLASMA, 0, 0, commodity_pickupevalfunc, 2000);
+}
+
 void spawnfunc_item_shells (void) {
        if(!weaponswapping)
        if(autocvar_sv_q3acompat_machineshotgunswap)
@@ -1387,6 +1403,7 @@ void spawnfunc_target_items (void)
                if(self.ammo_nails != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_nails), "nails");
                if(self.ammo_rockets != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_rockets), "rockets");
                if(self.ammo_cells != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_cells), "cells");
+               if(self.ammo_plasma != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_plasma), "plasma");
                if(self.ammo_fuel != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_fuel), "fuel");
                if(self.health != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.health), "health");
                if(self.armorvalue != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.health), "armor");
@@ -1585,6 +1602,7 @@ float GiveItems(entity e, float beginarg, float endarg)
        PREGIVE(e, superweapons_finished);
        PREGIVE(e, ammo_nails);
        PREGIVE(e, ammo_cells);
+       PREGIVE(e, ammo_plasma);
        PREGIVE(e, ammo_shells);
        PREGIVE(e, ammo_rockets);
        PREGIVE(e, ammo_fuel);
@@ -1638,6 +1656,7 @@ float GiveItems(entity e, float beginarg, float endarg)
                                }
                        case "allammo":
                                got += GiveValue(e, ammo_cells, op, val);
+                               got += GiveValue(e, ammo_plasma, op, val);
                                got += GiveValue(e, ammo_shells, op, val);
                                got += GiveValue(e, ammo_nails, op, val);
                                got += GiveValue(e, ammo_rockets, op, val);
@@ -1670,6 +1689,9 @@ float GiveItems(entity e, float beginarg, float endarg)
                        case "cells":
                                got += GiveValue(e, ammo_cells, op, val);
                                break;
+                       case "plasma":
+                               got += GiveValue(e, ammo_plasma, op, val);
+                               break;
                        case "shells":
                                got += GiveValue(e, ammo_shells, op, val);
                                break;
@@ -1726,6 +1748,7 @@ float GiveItems(entity e, float beginarg, float endarg)
        POSTGIVE_VALUE(e, invincible_finished, 1, "misc/powerup_shield.wav", "misc/poweroff.wav");
        POSTGIVE_VALUE(e, ammo_nails, 0, "misc/itempickup.wav", string_null);
        POSTGIVE_VALUE(e, ammo_cells, 0, "misc/itempickup.wav", string_null);
+       POSTGIVE_VALUE(e, ammo_plasma, 0, "misc/itempickup.wav", string_null);
        POSTGIVE_VALUE(e, ammo_shells, 0, "misc/itempickup.wav", string_null);
        POSTGIVE_VALUE(e, ammo_rockets, 0, "misc/itempickup.wav", string_null);
        POSTGIVE_VALUE_ROT(e, ammo_fuel, 1, pauserotfuel_finished, autocvar_g_balance_pause_fuel_rot, pauseregen_finished, autocvar_g_balance_pause_fuel_regen, "misc/itempickup.wav", string_null);
index b073dfa..13cc379 100644 (file)
@@ -16,6 +16,7 @@ const      float IT_SUPERWEAPON               =    4096;
 const      float IT_STRENGTH                  =    8192;
 const      float IT_INVINCIBLE                =   16384;
 const      float IT_HEALTH                    =   32768;
+const      float IT_PLASMA                    =   65536;
 
 // shared value space (union):
        // for items:
@@ -36,7 +37,7 @@ const      float IT_ARMOR_SHARD               = 2097152;
 const      float IT_ARMOR                     = 4194304;
 
 // item masks
-const      float IT_AMMO                      =    3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS;
+const      float IT_AMMO                      =    3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
 const      float IT_PICKUPMASK                =      51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
 const      float IT_UNLIMITED_AMMO            =       3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
 
index f919299..6f61f79 100644 (file)
@@ -23,11 +23,11 @@ void spawnfunc_ammo_cells()          { spawnfunc_item_rockets();        }
 
 // Rail -> Vortex
 void spawnfunc_weapon_railgun()      { spawnfunc_weapon_vortex();          }
-void spawnfunc_ammo_slugs()          { spawnfunc_item_cells();          }
+void spawnfunc_ammo_slugs()          { spawnfunc_item_plasma();          }
 
 // BFG -> Crylink
 void spawnfunc_weapon_bfg()          { spawnfunc_weapon_crylink();      }
-void spawnfunc_ammo_bfg()            { spawnfunc_item_cells();          }
+void spawnfunc_ammo_bfg()            { spawnfunc_item_plasma();          }
 
 // RL -> RL
 void spawnfunc_ammo_rockets()        { spawnfunc_item_rockets();        }
diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc
deleted file mode 100644 (file)
index 173f8c1..0000000
+++ /dev/null
@@ -1,287 +0,0 @@
-#ifdef REGISTER_WEAPON
-REGISTER_WEAPON(
-/* WEP_##id  */ SHOTGUN,
-/* function  */ w_shotgun,
-/* ammotype  */ IT_SHELLS,
-/* impulse   */ 2,
-/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
-/* rating    */ BOT_PICKUP_RATING_LOW,
-/* model     */ "shotgun",
-/* shortname */ "shotgun",
-/* fullname  */ _("Shotgun")
-);
-#else
-#ifdef SVQC
-
-void W_Shotgun_Attack (void)
-{
-       float   sc;
-       float   ammoamount;
-       float   bullets;
-       float   d;
-       float   f;
-       float   spread;
-       float   solidpenetration;
-       entity flash;
-
-       ammoamount = autocvar_g_balance_shotgun_primary_ammo;
-       bullets = autocvar_g_balance_shotgun_primary_bullets;
-       d = autocvar_g_balance_shotgun_primary_damage;
-       f = autocvar_g_balance_shotgun_primary_force;
-       spread = autocvar_g_balance_shotgun_primary_spread;
-       solidpenetration = autocvar_g_balance_shotgun_primary_solidpenetration;
-
-       W_DecreaseAmmo(ammo_shells, ammoamount, autocvar_g_balance_shotgun_reload_ammo);
-
-       W_SetupShot (self, TRUE, 5, "weapons/shotgun_fire.wav", CH_WEAPON_A, d * bullets);
-       for (sc = 0;sc < bullets;sc = sc + 1)
-               fireBullet(w_shotorg, w_shotdir, spread, solidpenetration, d, f, WEP_SHOTGUN, 0);
-
-       pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, autocvar_g_balance_shotgun_primary_ammo);
-
-       // casing code
-       if (autocvar_g_casings >= 1)
-               for (sc = 0;sc < ammoamount;sc = sc + 1)
-                       SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, self);
-
-       // muzzle flash for 1st person view
-       flash = spawn();
-       setmodel(flash, "models/uziflash.md3"); // precision set below
-       flash.think = SUB_Remove;
-       flash.nextthink = time + 0.06;
-       flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
-       W_AttachToShotorg(flash, '5 0 0');
-}
-
-.float swing_prev;
-.entity swing_alreadyhit;
-void shotgun_meleethink (void)
-{
-       // declarations
-       float i, f, swing, swing_factor, swing_damage, meleetime, is_player, is_monster;
-       entity target_victim;
-       vector targpos;
-
-       if(!self.cnt) // set start time of melee
-       {
-               self.cnt = time;
-               W_PlayStrengthSound(self.realowner);
-       }
-
-       makevectors(self.realowner.v_angle); // update values for v_* vectors
-
-       // calculate swing percentage based on time
-       meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
-       swing = bound(0, (self.cnt + meleetime - time) / meleetime, 10);
-       f = ((1 - swing) * autocvar_g_balance_shotgun_secondary_melee_traces);
-
-       // check to see if we can still continue, otherwise give up now
-       if((self.realowner.deadflag != DEAD_NO) && autocvar_g_balance_shotgun_secondary_melee_no_doubleslap)
-       {
-               remove(self);
-               return;
-       }
-
-       // if okay, perform the traces needed for this frame
-       for(i=self.swing_prev; i < f; ++i)
-       {
-               swing_factor = ((1 - (i / autocvar_g_balance_shotgun_secondary_melee_traces)) * 2 - 1);
-
-               targpos = (self.realowner.origin + self.realowner.view_ofs
-                       + (v_forward * autocvar_g_balance_shotgun_secondary_melee_range)
-                       + (v_up * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_up)
-                       + (v_right * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_side));
-
-               WarpZone_traceline_antilag(self, self.realowner.origin + self.realowner.view_ofs, targpos, FALSE, self, ANTILAG_LATENCY(self.realowner));
-
-               // draw lightning beams for debugging
-               //te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5);
-               //te_customflash(targpos, 40,  2, '1 1 1');
-
-               is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body");
-               is_monster = (trace_ent.flags & FL_MONSTER);
-
-               if((trace_fraction < 1) // if trace is good, apply the damage and remove self
-                       && (trace_ent.takedamage == DAMAGE_AIM)
-                       && (trace_ent != self.swing_alreadyhit)
-                       && ((is_player || is_monster) || autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage))
-               {
-                       target_victim = trace_ent; // so it persists through other calls
-
-                       if(is_player || is_monster) // this allows us to be able to nerf the non-player damage done in e.g. assault or onslaught.
-                               swing_damage = (autocvar_g_balance_shotgun_secondary_damage * min(1, swing_factor + 1));
-                       else
-                               swing_damage = (autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage * min(1, swing_factor + 1));
-
-                       //print(strcat(self.realowner.netname, " hitting ", target_victim.netname, " with ", strcat(ftos(swing_damage), " damage (factor: ", ftos(swing_factor), ") at "), ftos(time), " seconds.\n"));
-
-                       Damage(target_victim, self.realowner, self.realowner,
-                               swing_damage, WEP_SHOTGUN | HITTYPE_SECONDARY,
-                               self.realowner.origin + self.realowner.view_ofs,
-                               v_forward * autocvar_g_balance_shotgun_secondary_force);
-
-                       if(accuracy_isgooddamage(self.realowner, target_victim)) { accuracy_add(self.realowner, WEP_SHOTGUN, 0, swing_damage); }
-
-                       // draw large red flash for debugging
-                       //te_customflash(targpos, 200, 2, '15 0 0');
-
-                       if(autocvar_g_balance_shotgun_secondary_melee_multihit) // allow multiple hits with one swing, but not against the same player twice.
-                       {
-                               self.swing_alreadyhit = target_victim;
-                               continue; // move along to next trace
-                       }
-                       else
-                       {
-                               remove(self);
-                               return;
-                       }
-               }
-       }
-
-       if(time >= self.cnt + meleetime)
-       {
-               // melee is finished
-               remove(self);
-               return;
-       }
-       else
-       {
-               // set up next frame
-               self.swing_prev = i;
-               self.nextthink = time;
-       }
-}
-
-void W_Shotgun_Attack2 (void)
-{
-       sound (self, CH_WEAPON_A, "weapons/shotgun_melee.wav", VOL_BASE, ATTEN_NORM);
-       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_shotgun_secondary_animtime, w_ready);
-
-       entity meleetemp;
-       meleetemp = spawn();
-       meleetemp.realowner = self;
-       meleetemp.think = shotgun_meleethink;
-       meleetemp.nextthink = time + autocvar_g_balance_shotgun_secondary_melee_delay * W_WeaponRateFactor();
-       W_SetupShot_Range(self, TRUE, 0, "", 0, autocvar_g_balance_shotgun_secondary_damage, autocvar_g_balance_shotgun_secondary_melee_range);
-}
-
-void spawnfunc_weapon_shotgun(); // defined in t_items.qc
-
-.float shotgun_primarytime;
-
-float w_shotgun(float req)
-{
-       float ammo_amount;
-       if (req == WR_AIM)
-               if(vlen(self.origin-self.enemy.origin) <= autocvar_g_balance_shotgun_secondary_melee_range)
-                       self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE);
-               else
-                       self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
-
-       else if (req == WR_THINK)
-       {
-               if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo) // forced reload
-               {
-                       // don't force reload an empty shotgun if its melee attack is active
-                       if (!(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo))
-                               weapon_action(self.weapon, WR_RELOAD);
-               }
-               else
-               {
-                       if (self.BUTTON_ATCK)
-                       {
-                               if (time >= self.shotgun_primarytime) // handle refire separately so the secondary can be fired straight after a primary
-                               {
-                                       if(weapon_prepareattack(0, autocvar_g_balance_shotgun_primary_animtime))
-                                       {
-                                               W_Shotgun_Attack();
-                                               self.shotgun_primarytime = time + autocvar_g_balance_shotgun_primary_refire * W_WeaponRateFactor();
-                                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_shotgun_primary_animtime, w_ready);
-                                       }
-                               }
-                       }
-               }
-               if (self.clip_load >= 0) // we are not currently reloading
-               if (!self.crouch) // no crouchmelee please
-               if (self.BUTTON_ATCK2 && autocvar_g_balance_shotgun_secondary)
-               if (weapon_prepareattack(1, autocvar_g_balance_shotgun_secondary_refire))
-               {
-                       // attempt forcing playback of the anim by switching to another anim (that we never play) here...
-                       weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
-               }
-       }
-       else if (req == WR_PRECACHE)
-       {
-               precache_model ("models/uziflash.md3");
-               precache_model ("models/weapons/g_shotgun.md3");
-               precache_model ("models/weapons/v_shotgun.md3");
-               precache_model ("models/weapons/h_shotgun.iqm");
-               precache_sound ("misc/itempickup.wav");
-               precache_sound ("weapons/shotgun_fire.wav");
-               precache_sound ("weapons/shotgun_melee.wav");
-               //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
-       }
-       else if (req == WR_SETUP)
-       {
-               weapon_setup(WEP_SHOTGUN);
-               self.current_ammo = ammo_shells;
-       }
-       else if (req == WR_CHECKAMMO1)
-       {
-               ammo_amount = self.ammo_shells >= autocvar_g_balance_shotgun_primary_ammo;
-               ammo_amount += self.(weapon_load[WEP_SHOTGUN]) >= autocvar_g_balance_shotgun_primary_ammo;
-               return ammo_amount;
-       }
-       else if (req == WR_CHECKAMMO2)
-       {
-               // melee attack is always available
-               return TRUE;
-       }
-       else if (req == WR_RELOAD)
-       {
-               W_Reload(autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav");
-       }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               return WEAPON_THINKING_WITH_PORTALS;
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       return WEAPON_SHOTGUN_MURDER_SLAP;
-               else
-                       return WEAPON_SHOTGUN_MURDER;
-       }
-       return TRUE;
-}
-#endif
-#ifdef CSQC
-.float prevric;
-float w_shotgun(float req)
-{
-       if(req == WR_IMPACTEFFECT)
-       {
-               vector org2;
-               org2 = w_org + w_backoff * 2;
-               pointparticles(particleeffectnum("shotgun_impact"), org2, w_backoff * 1000, 1);
-               if(!w_issilent && time - self.prevric > 0.25)
-               {
-                       if(w_random < 0.0165)
-                               sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTEN_NORM);
-                       else if(w_random < 0.033)
-                               sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTEN_NORM);
-                       else if(w_random < 0.05)
-                               sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTEN_NORM);
-                       self.prevric = time;
-               }
-       }
-       else if(req == WR_PRECACHE)
-       {
-               precache_sound("weapons/ric1.wav");
-               precache_sound("weapons/ric2.wav");
-               precache_sound("weapons/ric3.wav");
-       }
-       return TRUE;
-}
-#endif
-#endif
index d6bc658..04dd3f6 100644 (file)
@@ -139,6 +139,7 @@ void weapon_defaultspawnfunc(float wpn)
                        case ammo_nails:   self.ammo_nails   = cvar("g_pickup_nails_weapon");   break;
                        case ammo_rockets: self.ammo_rockets = cvar("g_pickup_rockets_weapon"); break;
                        case ammo_cells:   self.ammo_cells   = cvar("g_pickup_cells_weapon");   break;
+                       case ammo_plasma:  self.ammo_plasma  = cvar("g_pickup_plasma_weapon");  break;
                        case ammo_fuel:    self.ammo_fuel    = cvar("g_pickup_fuel_weapon");    break;
                }
        }
index e5f36b9..2d5a831 100644 (file)
@@ -112,6 +112,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
                                case ammo_nails:   s = sprintf("%s and %d nails", s, thisammo);   break;
                                case ammo_rockets: s = sprintf("%s and %d rockets", s, thisammo); break;
                                case ammo_cells:   s = sprintf("%s and %d cells", s, thisammo);   break;
+                               case ammo_plasma:  s = sprintf("%s and %d plasma", s, thisammo);  break;
                                case ammo_fuel:    s = sprintf("%s and %d fuel", s, thisammo);    break;
                        }