Use entityDefs instead of hard-coded item pickups
This commit is contained in:
parent
6dd45060c2
commit
0b2955695a
28 changed files with 223 additions and 134 deletions
|
@ -457,11 +457,3 @@ weapon_t w_crossbow =
|
|||
.type = w_crossbow_type,
|
||||
.hudpic = w_crossbow_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_crossbow(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_CROSSBOW);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -238,12 +238,3 @@ weapon_t w_crowbar =
|
|||
.type = w_crowbar_type,
|
||||
.hudpic = w_crowbar_hudpic
|
||||
};
|
||||
|
||||
/* entity definitions for pickups */
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_crowbar(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_CROWBAR);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -343,9 +343,3 @@ weapon_t w_egon =
|
|||
.type = w_egon_type,
|
||||
.predraw = w_egon_postdraw
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void weapon_egon(void) {
|
||||
Weapons_InitItem(WEAPON_EGON);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -472,9 +472,3 @@ weapon_t w_gauss =
|
|||
.type = w_gauss_type,
|
||||
.hudpic = w_gauss_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void weapon_gauss(void) {
|
||||
Weapons_InitItem(WEAPON_GAUSS);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -419,18 +419,3 @@ weapon_t w_glock =
|
|||
.type = w_glock_type,
|
||||
.hudpic = w_glock_hudpic
|
||||
};
|
||||
|
||||
/* pickups */
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_9mmhandgun(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_GLOCK);
|
||||
}
|
||||
|
||||
void
|
||||
weapon_glock(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_GLOCK);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -283,9 +283,3 @@ weapon_t w_handgrenade =
|
|||
.type = w_handgrenade_type,
|
||||
.hudpic = w_handgrenade_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void weapon_handgrenade(void) {
|
||||
Weapons_InitItem(WEAPON_HANDGRENADE);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -321,11 +321,3 @@ weapon_t w_hornetgun =
|
|||
.type = w_hornetgun_type,
|
||||
.hudpic = w_hornetgun_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_hornetgun(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_HORNETGUN);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -461,17 +461,3 @@ weapon_t w_mp5 =
|
|||
.type = w_mp5_type,
|
||||
.hudpic = w_mp5_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_9mmAR(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_MP5);
|
||||
}
|
||||
|
||||
void
|
||||
weapon_mp5(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_MP5);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -376,18 +376,3 @@ weapon_t w_python =
|
|||
.type = w_python_type,
|
||||
.hudpic = w_python_hudpic
|
||||
};
|
||||
|
||||
/* pickups */
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_357(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_PYTHON);
|
||||
}
|
||||
|
||||
void
|
||||
weapon_python(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_PYTHON);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -371,9 +371,3 @@ weapon_t w_rpg =
|
|||
.type = w_rpg_type,
|
||||
.hudpic = w_rpg_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void weapon_rpg(void) {
|
||||
Weapons_InitItem(WEAPON_RPG);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -351,11 +351,3 @@ weapon_t w_satchel =
|
|||
.type = w_satchel_type,
|
||||
.hudpic = w_satchel_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_satchel(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_SATCHEL);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -448,11 +448,3 @@ weapon_t w_shotgun =
|
|||
.type = w_shotgun_type,
|
||||
.hudpic = w_shotgun_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_shotgun(void)
|
||||
{
|
||||
Weapons_InitItem(WEAPON_SHOTGUN);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -362,9 +362,3 @@ weapon_t w_snark =
|
|||
.type = w_snark_type,
|
||||
.hudpic = w_snark_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void weapon_snark(void) {
|
||||
Weapons_InitItem(WEAPON_SNARK);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -409,13 +409,3 @@ weapon_t w_tripmine =
|
|||
.type = w_tripmine_type,
|
||||
.hudpic = w_tripmine_hudpic
|
||||
};
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
weapon_tripmine(void) {
|
||||
item_pickup ip = (item_pickup)self;
|
||||
Weapons_InitItem(WEAPON_TRIPMINE);
|
||||
ip.SetBody(2);
|
||||
ip.SetFrame(8);
|
||||
}
|
||||
#endif
|
||||
|
|
19
zpak001.pk3dir/def/weapon_357.def
Normal file
19
zpak001.pk3dir/def/weapon_357.def
Normal file
|
@ -0,0 +1,19 @@
|
|||
entityDef weapon_357
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" ".367 Revolver"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_357.mdl"
|
||||
"inv_item" "3"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
||||
|
||||
entityDef weapon_python
|
||||
{
|
||||
"spawnclass" "weapon_357"
|
||||
}
|
19
zpak001.pk3dir/def/weapon_9mmAR.def
Normal file
19
zpak001.pk3dir/def/weapon_9mmAR.def
Normal file
|
@ -0,0 +1,19 @@
|
|||
entityDef weapon_9mmAR
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "9mm AR"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_9mmAR.mdl"
|
||||
"inv_item" "4"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
||||
|
||||
entityDef weapon_mp5
|
||||
{
|
||||
"spawnclass" "weapon_9mmAR"
|
||||
}
|
19
zpak001.pk3dir/def/weapon_9mmhandgun.def
Normal file
19
zpak001.pk3dir/def/weapon_9mmhandgun.def
Normal file
|
@ -0,0 +1,19 @@
|
|||
entityDef weapon_9mmhandgun
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "9mm Handgun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_9mmhandgun.mdl"
|
||||
"inv_item" "2"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
||||
|
||||
entityDef weapon_glock
|
||||
{
|
||||
"spawnclass" "weapon_9mmhandgun"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_crossbow.def
Normal file
14
zpak001.pk3dir/def/weapon_crossbow.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_crossbow
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Crossbow"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_crossbow.mdl"
|
||||
"inv_item" "6"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_crowbar.def
Normal file
14
zpak001.pk3dir/def/weapon_crowbar.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_crowbar
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Crowbar"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_crowbar.mdl"
|
||||
"inv_item" "1"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_egon.def
Normal file
14
zpak001.pk3dir/def/weapon_egon.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_egon
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Gluon Gun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_egon.mdl"
|
||||
"inv_item" "9"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_gauss.def
Normal file
14
zpak001.pk3dir/def/weapon_gauss.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_gauss
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Tau Cannon"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_gauss.mdl"
|
||||
"inv_item" "8"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_handgrenade.def
Normal file
14
zpak001.pk3dir/def/weapon_handgrenade.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_handgrenade
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Hand Grenade"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_grenade.mdl"
|
||||
"inv_item" "11"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_hornetgun.def
Normal file
14
zpak001.pk3dir/def/weapon_hornetgun.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_hornetgun
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Hornet Gun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_hgun.mdl"
|
||||
"inv_item" "10"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_rpg.def
Normal file
14
zpak001.pk3dir/def/weapon_rpg.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_rpg
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Rocket Launcher"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_rpg.mdl"
|
||||
"inv_item" "7"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_satchel.def
Normal file
14
zpak001.pk3dir/def/weapon_satchel.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_satchel
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Satchel"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_satchel.mdl"
|
||||
"inv_item" "12"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
14
zpak001.pk3dir/def/weapon_shotgun.def
Normal file
14
zpak001.pk3dir/def/weapon_shotgun.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
entityDef weapon_shotgun
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Shotgun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_shotgun.mdl"
|
||||
"inv_item" "5"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
15
zpak001.pk3dir/def/weapon_snark.def
Normal file
15
zpak001.pk3dir/def/weapon_snark.def
Normal file
|
@ -0,0 +1,15 @@
|
|||
entityDef weapon_snark
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Snark"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/w_sqknest.mdl"
|
||||
"frame" "1"
|
||||
"inv_item" "14"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
16
zpak001.pk3dir/def/weapon_tripmine.def
Normal file
16
zpak001.pk3dir/def/weapon_tripmine.def
Normal file
|
@ -0,0 +1,16 @@
|
|||
entityDef weapon_tripmine
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Tripmine"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"spawnclass" "NSItem"
|
||||
"model" "models/v_tripmine.mdl"
|
||||
"body" "2"
|
||||
"frame" "8"
|
||||
"inv_item" "13"
|
||||
"snd_acquire" "weapon.pickup"
|
||||
"snd_respawn" "item.respawn"
|
||||
}
|
Loading…
Reference in a new issue