mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-23 04:22:27 +00:00
128 lines
3.3 KiB
C
128 lines
3.3 KiB
C
/*
|
|
===========================================================================
|
|
Copyright (C) 1999 - 2005, Id Software, Inc.
|
|
Copyright (C) 2000 - 2013, Raven Software, Inc.
|
|
Copyright (C) 2001 - 2013, Activision, Inc.
|
|
Copyright (C) 2013 - 2015, OpenJK contributors
|
|
|
|
This file is part of the OpenJK source code.
|
|
|
|
OpenJK is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License version 2 as
|
|
published by the Free Software Foundation.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
===========================================================================
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Filename:- bg_weapons.h
|
|
//
|
|
// This crosses both client and server. It could all be crammed into bg_public, but isolation of this type of data is best.
|
|
|
|
typedef enum {
|
|
WP_NONE,
|
|
|
|
WP_STUN_BATON,
|
|
WP_MELEE,
|
|
WP_SABER,
|
|
WP_BRYAR_PISTOL,
|
|
WP_BLASTER,
|
|
WP_DISRUPTOR,
|
|
WP_BOWCASTER,
|
|
WP_REPEATER,
|
|
WP_DEMP2,
|
|
WP_FLECHETTE,
|
|
WP_ROCKET_LAUNCHER,
|
|
WP_THERMAL,
|
|
WP_TRIP_MINE,
|
|
WP_DET_PACK,
|
|
WP_CONCUSSION,
|
|
WP_BRYAR_OLD,
|
|
WP_EMPLACED_GUN,
|
|
WP_TURRET,
|
|
|
|
// WP_GAUNTLET,
|
|
// WP_MACHINEGUN, // Bryar
|
|
// WP_SHOTGUN, // Blaster
|
|
// WP_GRENADE_LAUNCHER, // Thermal
|
|
// WP_LIGHTNING, //
|
|
// WP_RAILGUN, //
|
|
// WP_GRAPPLING_HOOK,
|
|
|
|
WP_NUM_WEAPONS
|
|
} weapon_t;
|
|
|
|
//anything > this will be considered not player useable
|
|
#define LAST_USEABLE_WEAPON WP_BRYAR_OLD
|
|
|
|
typedef enum //# ammo_e
|
|
{
|
|
AMMO_NONE,
|
|
AMMO_FORCE, // AMMO_PHASER
|
|
AMMO_BLASTER, // AMMO_STARFLEET,
|
|
AMMO_POWERCELL, // AMMO_ALIEN,
|
|
AMMO_METAL_BOLTS,
|
|
AMMO_ROCKETS,
|
|
AMMO_EMPLACED,
|
|
AMMO_THERMAL,
|
|
AMMO_TRIPMINE,
|
|
AMMO_DETPACK,
|
|
AMMO_MAX
|
|
} ammo_t;
|
|
|
|
|
|
typedef struct weaponData_s
|
|
{
|
|
// char classname[32]; // Spawning name
|
|
|
|
int ammoIndex; // Index to proper ammo slot
|
|
int ammoLow; // Count when ammo is low
|
|
|
|
int energyPerShot; // Amount of energy used per shot
|
|
int fireTime; // Amount of time between firings
|
|
int range; // Range of weapon
|
|
|
|
int altEnergyPerShot; // Amount of energy used for alt-fire
|
|
int altFireTime; // Amount of time between alt-firings
|
|
int altRange; // Range of alt-fire
|
|
|
|
int chargeSubTime; // ms interval for subtracting ammo during charge
|
|
int altChargeSubTime; // above for secondary
|
|
|
|
int chargeSub; // amount to subtract during charge on each interval
|
|
int altChargeSub; // above for secondary
|
|
|
|
int maxCharge; // stop subtracting once charged for this many ms
|
|
int altMaxCharge; // above for secondary
|
|
} weaponData_t;
|
|
|
|
|
|
typedef struct ammoData_s
|
|
{
|
|
// char icon[32]; // Name of ammo icon file
|
|
int max; // Max amount player can hold of ammo
|
|
} ammoData_t;
|
|
|
|
|
|
extern weaponData_t weaponData[WP_NUM_WEAPONS];
|
|
extern ammoData_t ammoData[AMMO_MAX];
|
|
|
|
|
|
// Specific weapon information
|
|
|
|
#define FIRST_WEAPON WP_BRYAR_PISTOL // this is the first weapon for next and prev weapon switching
|
|
#define MAX_PLAYER_WEAPONS WP_NUM_WEAPONS-1 // this is the max you can switch to and get with the give all.
|
|
|
|
|
|
#define DEFAULT_SHOTGUN_SPREAD 700
|
|
#define DEFAULT_SHOTGUN_COUNT 11
|
|
|
|
#define LIGHTNING_RANGE 768
|