📄 weapondefs.cpp
字号:
//----------------------------------------------------------
//
// MODULE : WeaponDefs.cpp
//
// PURPOSE : Weapon definition tables.
//
// CREATED : 9/31/98
//
//----------------------------------------------------------
// Includes....
#include "server_de.h"
#include "WeaponDefs.h"
#include "ClientRes.h"
// initial values for standard weapons
WeaponData g_WeaponDefaults[WEAP_MAXWEAPONTYPES] =
{
// Beretta (Pistol)
{
"Models\\Weapons\\Beretta_pv.abc", // View Model
"Models\\Weapons\\lh_Beretta_pv.abc", // View Model
"Skins\\Weapons\\C_Beretta_pv_t.dtx", // View Skin
"Models\\Powerups\\beretta_pu.abc", // 3rd person model
"Skins\\Powerups\\beretta_pu.dtx", // 3rd person skin
WEAP_BERETTA, // Type
TYPE_PISTOL, // Fire type
AMMO_BULLET, // Ammo type
1, // Ammo Use
1, // Alt Ammo Use
8.0f, // Min Damage
12.0f, // Max Damage
10.0f, // Min Alt damage
20.0f, // Max Alt damage
0.33f, // Reload time
0.5f, // Alt reload time
{75.0f, 25.0f}, // Spread
{250.0f, 150.0f}, // Alt Spread
0.0f, // Projectile Velocity
0.0f, // Alt Projectile Velocity
3500.0f, // Range
3500.0f, // Alt Range
1, // Shots per fire
1, // Alt Shots per fire
1, // Strength or Magic required
2, // Two-handed Strength or Magic required
0, // Damage Radius (projectiles)
0, // Alt Damage Radius (projectiles)
DFALSE, // Alt fire zoom
DTRUE, // Semi-auto
"Sounds\\weapons\\beretta\\fire.wav", // Fire sound
"Sounds\\weapons\\beretta\\fire.wav", // Fire sound for alt fire
"", // Empty weapon sound
"", // Alt Empty weapon sound
NULL, // Projectile class
NULL, // Alt Projectile class
100, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
// Client info
"Beretta 92F", // Name
IDS_WEAPON_BERETTA, // Name ID (resource)
"Sprites\\pistolflare.spr", // flash sprite name
"Sprites\\pistolflare.spr", // alt flash sprite name
0.01f, // Flash duration
0.12f, // Flash scale
{0.0f, 0.0f, 0.0f}, // 3rd person gun offset
{0.6f, -0.6f, 1.9f}, // Gun Offset
{0.15f, 0.1f, 2.0f}, // Muzzle Offset
{0.03f, 0.03f, 2.55f}, // Recoil
{7.5f, -5.6f, 28.0f}, // Flash Offset
0.625f, // Eject interval
0.0f, // View kick
DFALSE, // View kick is Cumulative
DFALSE, // Animation looping
DTRUE, // Alt anim looping
"interface\\statusbar\\weapons\\beretta.pcx", // Icon for status bar
"interface\\statusbar\\weapons\\beretta_h.pcx", // Highlighted icon for status bar
},
// Ingram Mac-10 Sub-machine Gun
{
"Models\\Weapons\\Mac10_pv.abc", // Model
"Models\\Weapons\\lh_Mac10_pv.abc", // Model
"Skins\\Weapons\\C_Mac10_pv_t.dtx", // Skin
"Models\\Powerups\\Mac10_pu.abc", // 3rd person model
"Skins\\Powerups\\Mac10_pu.dtx", // 3rd person skin
WEAP_SUBMACHINEGUN, // Type
TYPE_PISTOL, // Fire type
AMMO_BULLET, // Ammo type
1, // Ammo Use
1, // Alt Ammo Use
8.0f, // Min Damage
12.0f, // Max Damage
8.0f, // Min Alt damage
12.0f, // Max Alt damage
0.1f, // Reload time
0.5f, // Alt reload time
{200.0f, 100.0f}, // Spread
{75.0f, 25.0f}, // Alt Spread
0.0f, // Projectile Velocity
0.0f, // Alt Projectile Velocity
3500.0f, // Range
3500.0f, // Alt Range
1, // Shots per fire
1, // Alt Shots per fire
2, // Strength or Magic required
3, // Two-handed Strength or Magic required
0, // Damage Radius (projectiles)
0, // Alt Damage Radius (projectiles)
DFALSE, // Alt fire zoom
DFALSE, // Semi-auto
"Sounds\\weapons\\mac10\\fire.wav", // Fire sound
"Sounds\\weapons\\mac10\\alt.wav", // Alt Fire sound
"", // Empty weapon sound
"", // Alt Empty weapon sound
NULL, // Projectile class
NULL, // Alt Projectile class
100, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
"Ingram Mac-10", // Name
IDS_WEAPON_MAC10, // Name ID (resource)
"Sprites\\mac10flare.spr", // flash sprite name
"Sprites\\mac10flare.spr", // alt flash Sprite name
0.01f, // Flash duration
0.11f, // Flash scale
{0.0f, 0.0f, 0.0f}, // 3rd person gun offset
{0.8f, -0.7f, 2.0f}, // Gun Offset
{1.0f, 0.0f, 1.0f}, // Muzzle Offset
{0.03f, 0.03f, 0.15f}, // Recoil
{8.0f, -5.75f, 28.0f}, // Flash position
0.625f, // Eject interval
0.0f, // View kick
DFALSE, // View kick is Cumulative
DTRUE, // Animation looping
DTRUE, // Alt anim looping
"interface\\statusbar\\weapons\\mac10.pcx", // Icon for status bar
"interface\\statusbar\\weapons\\mac10_h.pcx", // Highlighted icon for status bar
},
// Flaregun
{
"Models\\Weapons\\Flarepistol_pv.abc", // Model
"Models\\Weapons\\lh_Flarepistol_pv.abc", // Model
"Skins\\Weapons\\C_Flare_pv_t.dtx", // Skin
"Models\\Powerups\\Flarepistol_pu.abc", // 3rd person model
"Skins\\Powerups\\Flarepistol_pu.dtx", // 3rd person skin
WEAP_FLAREGUN, // Type
TYPE_PISTOL, // Fire type
AMMO_FLARE, // Ammo type
1, // Ammo Use
8, // Alt Ammo Use
10.0f, // Min Damage
15.0f, // Max Damage
20.0f, // Min Alt damage
30.0f, // Max Alt damage
0.75f, // Reload time
1.5f, // Alt reload time
{0.0f, 0.0f}, // Spread
{0.0f, 0.0f}, // Alt Spread
2000.0f, // Projectile Velocity
2000.0f, // Alt Projectile Velocity
5000.0f, // Range
5000.0f, // Alt Range
1, // Shots per fire
1, // Alt Shots per fire
2, // Strength or Magic required
3, // Two-handed Strength or Magic required
100, // Damage Radius (projectiles)
100, // Alt Damage Radius (projectiles)
DFALSE, // Alt fire zoom
DFALSE, // Semi-auto
"Sounds\\Weapons\\flare\\fire.wav", // Fire sound
"Sounds\\Weapons\\flare\\alt.wav", // Alt Fire sound
"", // Empty weapon sound
"", // Alt Empty weapon sound
"CFlareProjectile", // Projectile class
"CFlareAltProjectile", // Alt Projectile class
150, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
"Flare Gun", // Name
IDS_WEAPON_FLAREGUN, // Name ID (resource)
"Sprites\\FlaregunFlare.spr", // flash sprite name
"Sprites\\FlaregunFlare.spr", // alt flash Sprite name
0.05f, // Flash duration
0.175f, // Flash scale
{0.0f, 0.0f, 0.0f}, // 3rd person gun offset
{0.8f, -0.7f, 1.6f}, // Gun Offset
{0.0f, 0.275f, 1.0f}, // Muzzle Offset
{0.03f, 0.03f, 0.15f}, // Recoil
{6.5f, -4.5f, 28.0f}, // Flash position
0.625f, // Eject interval
0.0f, // View kick
DFALSE, // View kick is Cumulative
DFALSE, // Animation looping
DFALSE, // Alt anim looping
"interface\\statusbar\\weapons\\flaregun.pcx", // Icon for status bar
"interface\\statusbar\\weapons\\flaregun_h.pcx", // Highlighted icon for status bar
},
// Shotgun
{
"Models\\Weapons\\Shotgun_pv.abc", // Model
"Models\\Weapons\\Shotgun_pv.abc", // Model
"Skins\\Weapons\\C_Shot_pv_t.dtx", // Skin
"Models\\Powerups\\Shotgun_pu.abc", // 3rd person model
"Skins\\Powerups\\Shotgun_pu.dtx", // 3rd person skin
WEAP_SHOTGUN, // Type
TYPE_PISTOL, // Fire type
AMMO_SHELL, // Ammo type
1, // Ammo Use
2, // Alt Ammo Use
4.0f, // Min Damage
6.0f, // Max Damage
8.0f, // Min Alt damage
12.0f, // Max Alt damage
0.5f, // Reload time
1.0f, // Alt reload time
{200.0f, 100.0f}, // Spread
{200.0f, 100.0f}, // Alt Spread
0.0f, // Projectile Velocity
0.0f, // Alt Projectile Velocity
3500.0f, // Range
3500.0f, // Alt Range
16, // Shots per fire
16, // Alt Shots per fire
3, // Strength or Magic required
4, // Two-handed Strength or Magic required
0, // Damage Radius (projectiles)
0, // Alt Damage Radius (projectiles)
DFALSE, // Alt fire zoom
DFALSE, // Semi-auto
"Sounds\\Weapons\\shotgun\\fire.wav", // Fire sound
"Sounds\\Weapons\\shotgun\\alt.wav", // Alt Fire sound
"", // Empty weapon sound
"", // Alt Empty weapon sound
NULL, // Projectile class
NULL, // Alt Projectile class
125, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
"Sawed-off Shotgun", // Name
IDS_WEAPON_SHOTGUN, // Name ID (resource)
"Sprites\\shotgun1.spr", // flash sprite name
"Sprites\\shotgun2.spr", // alt flash Sprite name
0.05f, // Flash duration
0.19f, // Flash scale
{0.0f, 0.0f, 0.0f}, // 3rd person gun offset
{0.5f, -0.5f, 0.9f}, // Gun Offset
{0.08f, 0.5f, 2.0f}, // Muzzle Offset
{0.03f, 0.03f, 0.15f}, // Recoil
{5.0f, -5.0f, 30.0f}, // Flash position
0.625f, // Eject interval
2.5f, // View kick
DFALSE, // View kick is Cumulative
DFALSE, // Animation looping
DFALSE, // Alt anim looping
"interface\\statusbar\\weapons\\shotgun.pcx", // Icon for status bar
"interface\\statusbar\\weapons\\shotgun_h.pcx", // Highlighted icon for status bar
},
// Barrett .50 BMG Sniper Rifle
{
"Models\\Weapons\\SniperRifle_pv.abc", // Model
"Models\\Weapons\\SniperRifle_pv.abc", // Model
"Skins\\Weapons\\C_Sniper_pv_t.dtx", // Skin
"Models\\Powerups\\SniperRifle_pu.abc", // 3rd person model
"Skins\\Powerups\\SniperRifle_pu.dtx", // 3rd person skin
WEAP_SNIPERRIFLE, // Type
TYPE_RIFLE, // Fire type
AMMO_BMG, // Ammo type
1, // Ammo Use
0, // Alt Ammo Use
100.0f, // Min Damage
125.0f, // Max Damage
0.0f, // Min Alt damage
0.0f, // Max Alt damage
1.0f, // Reload time
1.0f, // Alt reload time
{0.0f, 0.0f}, // Spread
{0.0f, 0.0f}, // Alt Spread
0.0f, // Projectile Velocity
0.0f, // Alt Projectile Velocity
10000.0f, // Range
10000.0f, // Alt Range
1, // Shots per fire
0, // Alt Shots per fire
4, // Strength or Magic required
0, // Two-handed Strength or Magic required
0, // Damage Radius (projectiles)
0, // Alt Damage Radius (projectiles)
DTRUE, // Alt fire zoom
DFALSE, // Semi-auto
"Sounds\\Weapons\\sniper\\fire.wav", // Fire sound
"Sounds\\Weapons\\sniper\\zoom.wav", // Alt Fire sound
"", // Empty weapon sound
"", // Alt Empty weapon sound
NULL, // Projectile class
NULL, // Alt Projectile class
75, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
"BMG Sniper Rifle", // Name
IDS_WEAPON_SNIPER, // Name ID (resource)
"Sprites\\sniperflare.spr", // flash sprite name
"Sprites\\sniperflare.spr", // alt flash Sprite name
0.01f, // Flash duration
0.25f, // Flash scale
{0.0f, 0.0f, 0.0f}, // 3rd person gun offset
{0.6f, -0.8f, 1.9f}, // Gun Offset
{-0.25f, 0.260f, 3.0f}, // Muzzle Offset
{1.0f, 1.0f, 0.5f}, // Recoil
{1.5f, -2.5f, 25.0f}, // Flash Offset
0.6333f, // Eject interval
2.0f, // View kick
DFALSE, // View kick is Cumulative
DFALSE, // Animation looping
DFALSE, // Alt anim looping
"interface\\statusbar\\weapons\\sniper.pcx", // Icon for status bar
"interface\\statusbar\\weapons\\sniper_h.pcx", // Highlighted icon for status bar
},
// Howitzer
{
"Models\\Weapons\\Howitzer_pv.abc", // Model
"Models\\Weapons\\Howitzer_pv.abc", // Model
"Skins\\Weapons\\C_Howitzer_pv_t.dtx", // Skin
"Models\\Powerups\\Howitzer_pu.abc", // 3rd person model
"Skins\\Powerups\\Howitzer_pu.dtx", // 3rd person skin
WEAP_HOWITZER, // Type
TYPE_RIFLE, // Fire type
AMMO_HOWITZER, // Ammo type
1, // Ammo Use
5, // Alt Ammo Use
30.0f, // Min Damage
50.0f, // Max Damage
50.0f, // Min Alt damage
75.0f, // Max Alt damage
1.0f, // Reload time
1.0f, // Alt reload time
{20.0f, 20.0f}, // Spread
{100.0f, 100.0f}, // Alt Spread
1000.0f, // Projectile Velocity
1000.0f, // Alt Projectile Velocity
3500.0f, // Range
3500.0f, // Alt Range
1, // Shots per fire
1, // Alt Shots per fire
4, // Strength or Magic required
0, // Two-handed Strength or Magic required
150, // Damage Radius (projectiles)
200, // Alt Damage Radius (projectiles)
DFALSE, // Alt fire zoom
DFALSE, // Semi-auto
"Sounds\\Weapons\\howitzer\\fire.wav", // Fire sound
"Sounds\\Weapons\\howitzer\\alt.wav", // Alt Fire sound
"", // Empty weapon sound
"", // Alt Empty weapon sound
"CHowitzerShell", // Projectile class
"CHowitzerAltShell", // Alt Projectile class
200, // Muzzle Flash radius
{1.0f, 0.68f, 0.35f}, // Muzzle Flash color
"50mm Pack Howitzer", // Name
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -