#include <weapon.h>
Static Public Member Functions | ||||
static CWeaponDef::eFiremode | string_to_eFiremode (const char *str) | |||
take a string and return the eFiremode enum | ||||
static CWeaponDef::eType | string_to_eType (const char *str) | |||
take a string and return the eType enum | ||||
Create methods | ||||
This is a singleton | ||||
static CWeaponDefPool * | instance () | |||
Get an instance. | ||||
static void | clear () | |||
Clear out the entire pool. | ||||
Load/Reload methods | ||||
static bool | load (const std::string &filename, const std::string &path) | |||
static bool | load (const std::string &filename) | |||
static bool | load (CXMLNode node) | |||
| ||||
Info methods | ||||
static int | size () | |||
| ||||
Static Public Attributes | ||||
XML tags | ||||
<Weapon name="handgun" type="trace" range="3000" damage="35" cycle="2" firemode="single" reload="32" clipsize="12" accuracy="5" ammotype="1"/ > | ||||
static const char * | m_kStrElmWeaponDefPool = "WeaponDefPool" | |||
static const char * | m_kStrElmWeapon = "Weapon" | |||
static const char * | m_kStrAttName = "name" | |||
name of the weapon | ||||
static const char * | m_kStrAttType = "type" | |||
type of weapon | ||||
static const char * | m_kStrAttRange = "range" | |||
weapon range | ||||
static const char * | m_kStrAttDamage = "damage" | |||
damage per shot | ||||
static const char * | m_kStrAttCycle = "cycle" | |||
time between shots (ticks) | ||||
static const char * | m_kStrAttFiremode = "firemode" | |||
single, auto, burst | ||||
static const char * | m_kStrAttReload = "reload" | |||
time to reload the weapon | ||||
static const char * | m_kStrAttClipsize = "clipsize" | |||
max number of rounds in the clip | ||||
static const char * | m_kStrAttAccuracy = "accuracy" | |||
base accuracy of the weapon | ||||
static const char * | m_kStrAttAmmoType = "ammotype" | |||
type of ammo this weapon uses | ||||
static const char * | m_kStrAttShotSound = "shot" | |||
sound made when firing | ||||
static const char * | m_kStrElmFX = "WeaponFX" | |||
FX Element. | ||||
static const char * | m_kStrAttShotFX = "shot_fx" | |||
shot FX attribute | ||||
static const char * | m_kStrAttHitFX = "hit_fx" | |||
hit point FX attribute | ||||
static const char * | m_kStrAttMuzzleFX = "muzzle_fx" | |||
muzzle FX attribute |
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
bool CWeaponDefPool::load | ( | const std::string & | filename, | |
const std::string & | path | |||
) | [static] |
filename | The filename of the XML weapon data file | |
path | Additional path (if not part of filename) |
bool CWeaponDefPool::load | ( | const std::string & | filename | ) | [static] |
filename | The filename of the XML weapon data file |
const char * CWeaponDefPool::m_kStrAttType = "type" [static] |
type of weapon
type of weapon (shot type)
const char * CWeaponDefPool::m_kStrAttFiremode = "firemode" [static] |
single, auto, burst
single, auto, burst, shotgun
const char * CWeaponDefPool::m_kStrElmFX = "WeaponFX" [static] |
FX Element.
WeaponFX Element.