Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Variables
guns.hpp File Reference
#include "inexor/sound/sound.hpp"
#include "inexor/ui/legacy/3dgui.hpp"
#include "inexor/engine/particles.hpp"

Go to the source code of this file.

Classes

struct  itemstat
 pickup description structure More...
 
struct  guninfo
 weapon description structure More...
 

Macros

#define MAXRAYS   20
 
#define EXP_SELFDAMDIV   2
 
#define EXP_SELFPUSH   2.5f
 
#define EXP_DISTSCALE   1.5f
 
#define BOMB_DAMRAD   20
 

Enumerations

enum  {
  GUN_FIST = 0, GUN_SG, GUN_CG, GUN_RL,
  GUN_RIFLE, GUN_GL, GUN_PISTOL, GUN_BOMB,
  GUN_FIREBALL, GUN_ICEBALL, GUN_SLIMEBALL, GUN_BITE,
  GUN_BARREL, GUN_SPLINTER, NUMGUNS
}
 gun and projectile enumeration More...
 
enum  { A_BLUE, A_GREEN, A_YELLOW }
 armour type enumeration... More...
 

Variables

static const itemstat itemstats []
 create an array of itemstat instances ('pickups') More...
 
static const guninfo guns [NUMGUNS]
 create an array of guninfo instances ('guns') More...
 

Class Documentation

struct itemstat

pickup description structure

Class Members
int add
int icon
int info
int max
const char * name
int sound
struct guninfo

weapon description structure

Class Members
int attackdelay
int damage
int exprad
const char * file
int hitpush
int kickamount
const char * name
short part
int projspeed
int range
int rays
int sound
int spread
int ttl

Macro Definition Documentation

#define BOMB_DAMRAD   20
#define EXP_DISTSCALE   1.5f
#define EXP_SELFDAMDIV   2
#define EXP_SELFPUSH   2.5f

Referenced by fpsent::hitpush().

#define MAXRAYS   20

Referenced by game::raydamage().

Enumeration Type Documentation

anonymous enum

gun and projectile enumeration

Enumerator
GUN_FIST 
GUN_SG 
GUN_CG 

shotgun

GUN_RL 

chaingun

GUN_RIFLE 

rocket launcher

GUN_GL 
GUN_PISTOL 

grenade launcher

GUN_BOMB 
GUN_FIREBALL 

BOMBERMAN gamemode: bomb.

GUN_ICEBALL 

monster/bot: fireball

GUN_SLIMEBALL 

monster/bot: iceball

GUN_BITE 

monster/bot: slimeball

GUN_BARREL 

bite

GUN_SPLINTER 

barrel damage

NUMGUNS 
anonymous enum

armour type enumeration...

take 20/40/60 % off TODO find better file (or make obsolete)

Enumerator
A_BLUE 
A_GREEN 
A_YELLOW 

Variable Documentation

const guninfo guns[NUMGUNS]
static
Initial value:
=
{
{S_PUNCH1, 250, 50, 0, 0, 0, 14, 1, 80, 0, 0, "fist", "chainsaw", 0},
{S_SG, 1400, 10, 400, 0, 20, 1024, 20, 80, 0, 0, "shotgun", "shotgun", 0},
{S_CG, 100, 30, 100, 0, 7, 1024, 1, 80, 0, 0, "chaingun", "chaingun", 0},
{S_RLFIRE, 800, 120, 0, 320, 10, 1024, 1, 160, 40, 0, "rocketlauncher", "rocket", 0},
{S_RIFLE, 1500, 100, 0, 0, 30, 2048, 1, 80, 0, 0, "rifle", "rifle", 0},
{S_FLAUNCH, 600, 90, 0, 200, 10, 1024, 1, 250, 45, 1500, "grenadelauncher", "grenadelauncher", 0},
{S_PISTOL, 500, 35, 50, 0, 7, 1024, 1, 80, 0, 0, "pistol", "pistol", 0},
{S_FEXPLODE, 375, 200, 8, 20, 0, 1024, 1, 150, 40, 1500, "bomb", "cannon", 0},
{S_FLAUNCH, 200, 20, 0, 200, 1, 1024, 1, 80, 40, 0, "fireball", nullptr, PART_FIREBALL1},
{S_ICEBALL, 200, 40, 0, 120, 1, 1024, 1, 80, 40, 0, "iceball", nullptr, PART_FIREBALL2},
{S_SLIMEBALL, 200, 30, 0, 640, 1, 1024, 1, 80, 40, 0, "slimeball", nullptr, PART_FIREBALL3},
{S_PIGR1, 250, 50, 0, 0, 1, 12, 1, 80, 0, 0, "bite", nullptr, 0},
{-1, 0, 120, 0, 0, 0, 0, 1, 80, 40, 0, "barrel", nullptr, 0},
{S_FEXPLODE, 375, 200, 8, 20, 0, 1024, 1, 150, 40, 1500, "bomb_splinter", nullptr, 0},
}
Definition: sound.hpp:32
Definition: sound.hpp:32
Definition: sound.hpp:33
Definition: particles.hpp:15
Definition: particles.hpp:15
Definition: sound.hpp:17
Definition: sound.hpp:16
Definition: particles.hpp:15
Definition: sound.hpp:16
Definition: sound.hpp:21
Definition: sound.hpp:21
Definition: sound.hpp:16
Definition: sound.hpp:16
Definition: sound.hpp:32

create an array of guninfo instances ('guns')

Referenced by ai::dopursue(), game::drawhudgun(), game::drawhudmodel(), game::movable::explode(), ai::hastarget(), fpsent::hitpush(), game::parsemessages(), game::preloadweapons(), server::shotevent::process(), server::explodeevent::process(), ai::render(), game::renderplayer(), game::updatemovables(), ai::weapmaxdist(), and ai::weapmindist().

const itemstat itemstats[]
static
Initial value:
=
{
{10, 30, S_ITEMAMMO, "SG", HICON_SG, GUN_SG},
{20, 60, S_ITEMAMMO, "CG", HICON_CG, GUN_CG},
{5, 15, S_ITEMAMMO, "RL", HICON_RL, GUN_RL},
{5, 15, S_ITEMAMMO, "RI", HICON_RIFLE, GUN_RIFLE},
{10, 30, S_ITEMAMMO, "GL", HICON_GL, GUN_GL},
{30, 120, S_ITEMAMMO, "PI", HICON_PISTOL, GUN_PISTOL},
{1, 12, S_ITEMAMMO, "BO", HICON_BOMB, GUN_BOMB},
{1, 10, S_ITEMPUP, "BR", HICON_BOMBRADIUS, -1},
{1, 7, S_ITEMPUP, "BD", HICON_BOMBDELAY, -1},
{25, 100, S_ITEMHEALTH, "H", HICON_HEALTH, -1},
{10, 1000, S_ITEMHEALTH, "MH", HICON_HEALTH, -1},
{20000, 30000, S_ITEMPUP, "Q", HICON_QUAD, -1}
}
Definition: 3dgui.hpp:20
Definition: sound.hpp:18
Definition: 3dgui.hpp:17
Definition: 3dgui.hpp:15
Definition: 3dgui.hpp:23
Definition: 3dgui.hpp:37
Definition: 3dgui.hpp:38
Definition: guns.hpp:39
Definition: guns.hpp:40
grenade launcher
Definition: guns.hpp:22
Definition: sound.hpp:18
Definition: 3dgui.hpp:25
Definition: sound.hpp:17
rocket launcher
Definition: guns.hpp:20
Definition: sound.hpp:17
Definition: 3dgui.hpp:28
shotgun
Definition: guns.hpp:18
chaingun
Definition: guns.hpp:19
Definition: guns.hpp:21
Definition: guns.hpp:23
Definition: 3dgui.hpp:26
Definition: guns.hpp:17
Definition: 3dgui.hpp:21
Definition: 3dgui.hpp:22
Definition: 3dgui.hpp:24
Definition: 3dgui.hpp:14

create an array of itemstat instances ('pickups')

Referenced by fpsstate::addammo(), entities::addammo(), fpsstate::baseammo(), fpsstate::canpickup(), game::explode(), fpsstate::hasmaxammo(), entities::itemicon(), entities::itemname(), ai::itemspawned(), fpsstate::pickup(), entities::pickupeffects(), server::explodeevent::process(), game::captureclientmode::receiveammo(), server::captureservermode::regenowners(), and game::captureclientmode::updatebase().