Add priority/weights to the weapons.
This commit is contained in:
parent
f89da11c6b
commit
3f636e0a3d
21 changed files with 42 additions and 1 deletions
|
@ -275,6 +275,7 @@ weapon_t w_asscan =
|
|||
.id = ITEM_ASSCAN,
|
||||
.slot = 3,
|
||||
.slot_pos = 3,
|
||||
.weight = WEIGHT_ASSCAN,
|
||||
.draw = w_asscan_draw,
|
||||
.holster = w_asscan_holster,
|
||||
.primary = w_asscan_primary,
|
||||
|
|
|
@ -167,6 +167,7 @@ weapon_t w_autorifle =
|
|||
.id = ITEM_AUTORIFLE,
|
||||
.slot = 2,
|
||||
.slot_pos = 0,
|
||||
.weight = WEIGHT_AUTORIFLE,
|
||||
.draw = w_autorifle_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_autorifle_primary,
|
||||
|
|
|
@ -208,7 +208,7 @@ weapon_t w_crowbar =
|
|||
.id = ITEM_CROWBAR,
|
||||
.slot = 0,
|
||||
.slot_pos = 0,
|
||||
.weight = 0,
|
||||
.weight = WEIGHT_CROWBAR,
|
||||
.draw = w_crowbar_draw,
|
||||
.holster = w_crowbar_holster,
|
||||
.primary = w_crowbar_primary,
|
||||
|
|
|
@ -202,6 +202,7 @@ weapon_t w_dbs =
|
|||
.id = ITEM_DBS,
|
||||
.slot = 2,
|
||||
.slot_pos = 1,
|
||||
.weight = WEIGHT_DBS,
|
||||
.draw = w_dbs_draw,
|
||||
.holster = w_dbs_holster,
|
||||
.primary = w_dbs_primary,
|
||||
|
|
|
@ -234,6 +234,7 @@ weapon_t w_flamer =
|
|||
.id = ITEM_FLAMER,
|
||||
.slot = 3,
|
||||
.slot_pos = 2,
|
||||
.weight = WEIGHT_FLAMER,
|
||||
.draw = w_flamer_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_flamer_primary,
|
||||
|
|
|
@ -259,6 +259,7 @@ weapon_t w_glauncher =
|
|||
.id = ITEM_GLAUNCHER,
|
||||
.slot = 3,
|
||||
.slot_pos = 1,
|
||||
.weight = WEIGHT_GLAUNCHER,
|
||||
.draw = w_glauncher_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_glauncher_primary,
|
||||
|
|
|
@ -96,6 +96,7 @@ weapon_t w_grapple =
|
|||
.id = ITEM_GRAPPLE,
|
||||
.slot = 5,
|
||||
.slot_pos = 0,
|
||||
.weight = WEIGHT_GRAPPLE,
|
||||
.draw = w_grapple_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = __NULL__,
|
||||
|
|
|
@ -183,6 +183,7 @@ weapon_t w_incendiary =
|
|||
.id = ITEM_INCENDIARY,
|
||||
.slot = 4,
|
||||
.slot_pos = 3,
|
||||
.weight = WEIGHT_INCENDIARY,
|
||||
.draw = w_incendiary_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_incendiary_primary,
|
||||
|
|
|
@ -183,6 +183,7 @@ weapon_t w_knife =
|
|||
.id = ITEM_KNIFE,
|
||||
.slot = 0,
|
||||
.slot_pos = 2,
|
||||
.weight = WEIGHT_KNIFE,
|
||||
.draw = w_knife_draw,
|
||||
.holster = w_knife_holster,
|
||||
.primary = w_knife_primary,
|
||||
|
|
|
@ -170,6 +170,7 @@ weapon_t w_medkit =
|
|||
.id = ITEM_MEDKIT,
|
||||
.slot = 0,
|
||||
.slot_pos = 1,
|
||||
.weight = WEIGHT_MEDKIT,
|
||||
.draw = w_medkit_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_medkit_primary,
|
||||
|
|
|
@ -194,6 +194,7 @@ weapon_t w_nailgun =
|
|||
.id = ITEM_NAILGUN,
|
||||
.slot = 3,
|
||||
.slot_pos = 0,
|
||||
.weight = WEIGHT_NAILGUN,
|
||||
.draw = w_nailgun_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_nailgun_primary,
|
||||
|
|
|
@ -289,6 +289,7 @@ weapon_t w_pipebomb =
|
|||
.id = ITEM_PIPEBOMB,
|
||||
.slot = 4,
|
||||
.slot_pos = 1,
|
||||
.weight = WEIGHT_PIPEBOMB,
|
||||
.draw = w_pipebomb_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_pipebomb_primary,
|
||||
|
|
|
@ -184,6 +184,7 @@ weapon_t w_railgun =
|
|||
.id = ITEM_RAILGUN,
|
||||
.slot = 1,
|
||||
.slot_pos = 3,
|
||||
.weight = WEIGHT_RAILGUN,
|
||||
.draw = w_railgun_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_railgun_primary,
|
||||
|
|
|
@ -224,6 +224,7 @@ weapon_t w_rpg =
|
|||
.id = ITEM_RPG,
|
||||
.slot = 4,
|
||||
.slot_pos = 0,
|
||||
.weight = WEIGHT_RPG,
|
||||
.draw = w_rpg_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_rpg_primary,
|
||||
|
|
|
@ -190,6 +190,7 @@ weapon_t w_sbs =
|
|||
.id = ITEM_SBS,
|
||||
.slot = 1,
|
||||
.slot_pos = 0,
|
||||
.weight = WEIGHT_SBS,
|
||||
.draw = w_sbs_draw,
|
||||
.holster = w_sbs_holster,
|
||||
.primary = w_sbs_primary,
|
||||
|
|
|
@ -220,6 +220,7 @@ weapon_t w_sniper =
|
|||
.id = ITEM_SNIPER,
|
||||
.slot = 1,
|
||||
.slot_pos = 1,
|
||||
.weight = WEIGHT_SNIPER,
|
||||
.draw = w_sniper_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_sniper_primary,
|
||||
|
|
|
@ -209,6 +209,7 @@ weapon_t w_supernail =
|
|||
.id = ITEM_SUPERNAIL,
|
||||
.slot = 3,
|
||||
.slot_pos = 2,
|
||||
.weight = WEIGHT_SUPERNAIL,
|
||||
.draw = w_supernail_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_supernail_primary,
|
||||
|
|
|
@ -188,6 +188,7 @@ weapon_t w_tranquil =
|
|||
.id = ITEM_TRANQUIL,
|
||||
.slot = 1,
|
||||
.slot_pos = 2,
|
||||
.weight = WEIGHT_TRANQUIL,
|
||||
.draw = w_tranquil_draw,
|
||||
.holster = __NULL__,
|
||||
.primary = w_tranquil_primary,
|
||||
|
|
|
@ -215,6 +215,7 @@ weapon_t w_umbrella =
|
|||
.id = ITEM_UMBRELLA,
|
||||
.slot = 0,
|
||||
.slot_pos = 4,
|
||||
.weight = WEIGHT_UMBRELLA,
|
||||
.draw = w_umbrella_draw,
|
||||
.holster = w_umbrella_holster,
|
||||
.primary = w_umbrella_primary,
|
||||
|
|
|
@ -232,6 +232,7 @@ weapon_t w_wrench =
|
|||
.id = ITEM_WRENCH,
|
||||
.slot = 0,
|
||||
.slot_pos = 3,
|
||||
.weight = WEIGHT_WRENCH,
|
||||
.draw = w_wrench_draw,
|
||||
.holster = w_wrench_holster,
|
||||
.primary = w_wrench_primary,
|
||||
|
|
|
@ -39,3 +39,25 @@ enum
|
|||
WEAPON_INCENDIARY,
|
||||
WEAPON_GRAPPLE
|
||||
};
|
||||
|
||||
|
||||
#define WEIGHT_CROWBAR -1
|
||||
#define WEIGHT_MEDKIT 1
|
||||
#define WEIGHT_KNIFE 1
|
||||
#define WEIGHT_WRENCH 1
|
||||
#define WEIGHT_UMBRELLA 1
|
||||
#define WEIGHT_SBS 10
|
||||
#define WEIGHT_SNIPER 10
|
||||
#define WEIGHT_TRANQUIL 10
|
||||
#define WEIGHT_RAILGUN 10
|
||||
#define WEIGHT_AUTORIFLE 10
|
||||
#define WEIGHT_DBS 20
|
||||
#define WEIGHT_NAILGUN 20
|
||||
#define WEIGHT_GLAUNCHER 20
|
||||
#define WEIGHT_SUPERNAIL 20
|
||||
#define WEIGHT_FLAMER 20
|
||||
#define WEIGHT_RPG 20
|
||||
#define WEIGHT_PIPEBOMB 0
|
||||
#define WEIGHT_ASSCAN 20
|
||||
#define WEIGHT_INCENDIARY 20
|
||||
#define WEIGHT_GRAPPLE -1
|
Loading…
Reference in a new issue