From 0421135df89b698dba6d4440c792402b2c45bb44 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 28 Aug 2015 10:25:59 -0400 Subject: [PATCH] Add plasma. --- qcsrc/server/item_ammo.qc | 18 +++++++++++------- qcsrc/server/t_items.qh | 3 +++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/qcsrc/server/item_ammo.qc b/qcsrc/server/item_ammo.qc index 10459cc0e..bd7b4708e 100644 --- a/qcsrc/server/item_ammo.qc +++ b/qcsrc/server/item_ammo.qc @@ -12,10 +12,11 @@ float autocvar_g_balance_ammodistribution_distance_medium = 512 + 1; float autocvar_g_balance_ammodistribution_modifier_shells = 1; float autocvar_g_balance_ammodistribution_modifier_bullets = 1; float autocvar_g_balance_ammodistribution_modifier_cells = 1; +float autocvar_g_balance_ammodistribution_modifier_plasma = 1; float autocvar_g_balance_ammodistribution_modifier_rockets = 1; float autocvar_g_balance_ammodistribution_modifier_fuel = 1; -#define ITEM_AMMO_COUNT 5 +#define ITEM_AMMO_COUNT 6 void() item_ammo_spawnfunc(float i) { switch (i) @@ -23,8 +24,9 @@ void() item_ammo_spawnfunc(float i) case 0: return spawnfunc_item_shells; case 1: return spawnfunc_item_bullets; case 2: return spawnfunc_item_cells; - case 3: return spawnfunc_item_rockets; - case 4: return spawnfunc_item_fuel; + case 3: return spawnfunc_item_plasma; + case 4: return spawnfunc_item_rockets; + case 5: return spawnfunc_item_fuel; default: error("item_ammo_wtf"); } return spawnfunc_item_shells; @@ -47,8 +49,9 @@ float item_ammo_modifier(float i) case 0: m = autocvar_g_balance_ammodistribution_modifier_shells; break; case 1: m = autocvar_g_balance_ammodistribution_modifier_bullets; break; case 2: m = autocvar_g_balance_ammodistribution_modifier_cells; break; - case 3: m = autocvar_g_balance_ammodistribution_modifier_rockets; break; - case 4: m = autocvar_g_balance_ammodistribution_modifier_fuel; break; + case 3: m = autocvar_g_balance_ammodistribution_modifier_plasma; break; + case 4: m = autocvar_g_balance_ammodistribution_modifier_rockets; break; + case 5: m = autocvar_g_balance_ammodistribution_modifier_fuel; break; default: error("item_ammo_wtf"); } if (m == 0) @@ -64,8 +67,9 @@ float item_ammo_type(float i) case 0: return IT_SHELLS; case 1: return IT_NAILS; case 2: return IT_CELLS; - case 3: return IT_ROCKETS; - case 4: return IT_FUEL; + case 3: return IT_PLASMA; + case 4: return IT_ROCKETS; + case 5: return IT_FUEL; default: error("item_ammo_wtf"); } return 0; diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index 35cce6178..d6d31a2f1 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -95,7 +95,10 @@ void spawnfunc_item_invincible(); void spawnfunc_item_armor_small(); void spawnfunc_item_shells(); void spawnfunc_item_bullets(); +void spawnfunc_item_cells(); +void spawnfunc_item_plasma(); void spawnfunc_item_rockets(); +void spawnfunc_item_fuel(); float autocvar_sv_simple_items; bool ItemSend(entity to, int sf); -- 2.39.2