PGE API 0.4
PR00F's Game Engine full documentation
|
Weapon class for PR00F's Game Engine Weapon Manager. More...
Weapon class for PR00F's Game Engine Weapon Manager.
Definition at line 323 of file WeaponManager.h.
#include <WeaponManager.h>
Public Types | |
enum | State { WPN_READY , WPN_RELOADING , WPN_SHOOTING } |
enum | FiringMode { WPN_FM_SEMI , WPN_FM_BURST , WPN_FM_PROJ , WPN_FM_AUTO } |
enum | Type { Ranged , Melee , Throwable } |
Public Member Functions | |
Weapon (const char *fname, PgeObjectPool< PooledBullet > &bullets, pge_audio::PgeAudio &audio, PR00FsUltimateRenderingEngine &gfx, pge_network::PgeNetworkConnectionHandle connHandle) | |
virtual | ~Weapon () |
CConsole & | getConsole () const |
Returns access to console preset with logger module name as this class. | |
const WeaponId & | getUniqueId () const |
const Type & | getType () const |
PureObject3D & | getObject3D () |
Returns the graphical object entity associated to this weapon object. | |
const PureObject3D & | getObject3D () const |
Returns the graphical object entity associated to this weapon object. | |
void | UpdatePosition (const PureVector &playerPos, bool bStickToCenter) |
Updates the graphical object entity associated to this weapon object. | |
void | UpdatePositions (const PureVector &playerPos, TPureFloat fAngleY, TPureFloat fAngleZ) |
Updates the graphical object entity associated to this weapon object. | |
void | UpdatePositions (const PureVector &playerPos, const PureVector &targetPos2D) |
Updates the graphical object entity associated to this weapon object. | |
const FiringMode & | getCurrentFiringMode () const |
Returns the current firing mode of the weapon. | |
TPureUInt | getUnmagBulletCount () const |
Returns the "unmag" bullet count of this weapon. | |
void | SetUnmagBulletCount (TPureUInt count) |
Sets the "unmag" bullet count of this weapon. | |
TPureUInt | getMagBulletCount () const |
Returns the "mag" bullet count of this weapon. | |
void | SetMagBulletCount (TPureUInt count) |
Sets the "mag" bullet count of this weapon. | |
bool | canIncBulletCount () const |
Returns if we can add more bullets for this weapon. | |
void | IncBulletCount (TPureUInt count) |
Adds more bullets for this weapon. | |
const pge_network::PgeNetworkConnectionHandle & | getOwner () const |
Returns the player associated with this weapon. | |
void | SetOwner (const pge_network::PgeNetworkConnectionHandle &owner) |
Sets the player associated with this weapon. | |
bool | update () |
Updates the weapon based on the time elapsed since last call to this function. | |
const PgeOldNewValue< State > & | getState () const |
Returns the current state of the weapon. | |
void | clientReceiveStateFromServer (const State &state) |
void | updateOldValues () |
TPureBool | reload () |
Reloads the weapon i.e. | |
TPureBool | pullTrigger (bool bMoving, bool bRun, bool bDuck) |
Pulls the trigger of the weapon, which might result in shooting the weapon. | |
void | releaseTrigger () |
Releases the trigger of the weapon. | |
bool | isTriggerReleased () const |
Returns the state of the trigger. | |
void | Reset () |
Resets properties of the weapon to its initial values like when it was just loaded from file. | |
bool | isAvailable () const |
Returns if this weapon is available for the player. | |
void | SetAvailable (bool bAvail) |
Changes the availability of this weapon for the player. | |
float | getDamagePerFireRating () const |
Returns a calculated rating of damage caused by a single shot fired. | |
float | getFiringRate () const |
Returns a calculated firing rate per 1 second. | |
float | getDamagePerSecondRating () const |
Returns a calculated rating of total damage per 1 second. | |
float | getAccuracyByPose (bool bMoving, bool bRun, bool bDuck) const |
Returns a calculated accuracy based on player's pose. | |
float | getLowestAccuracyByPose () const |
Returns the lowest possible accuracy of this weapon, based only on player's pose. | |
float | getMomentaryRecoilMultiplier () const |
Returns the momentary recoil multiplier. | |
float | getMaximumRecoilMultiplier () const |
Returns the weapon's maximum recoil multiplier. | |
float | getMomentaryAccuracy (bool bMoving, bool bRun, bool bDuck) const |
Returns the calculated momentary accuracy based on all factors. | |
float | getLowestAccuracyPossible () const |
Returns a positive relative bullet angle representing the lowest possible accuracy with this weapon. | |
float | getRandomRelativeBulletAngle (bool bMoving, bool bRun, bool bDuck) const |
Returns a random relative angle for a bullet. | |
SoLoud::Wav & | getFiringSound () |
SoLoud::Wav & | getDryFiringSound () |
SoLoud::Wav & | getReloadStartSound () |
SoLoud::Wav & | getReloadEndSound () |
SoLoud::Wav & | getPlayerHitSound () |
SoLoud::Wav & | getWallHitSound () |
Weapon (const Weapon &other) | |
Weapon & | operator= (const Weapon &other) |
![]() | |
PGEcfgFile (bool bRequireAllAcceptedVarsDefineRequirement, bool bCaseSensitiveVars) | |
virtual | ~PGEcfgFile () |
CConsole & | getConsole () const |
Returns access to console preset with logger module name as this class. | |
std::map< std::string, PGEcfgVariable > & | getVars () |
const std::map< std::string, PGEcfgVariable > & | getVars () const |
bool | load (const char *fname) |
Loads variables from the given config file. | |
bool | save (const char *fname="") const |
Saves variables to the given config file. | |
const std::string & | getFilename () const |
const std::string & | getPathToFile () const |
bool | getAllAcceptedVarsDefineRequirement () const |
bool | getCaseSensitiveVars () const |
const std::set< std::string > & | getAcceptedVars () const |
bool | setAcceptedVars (const std::set< std::string > &newAcceptedVars) |
std::vector< std::string > & | getTemplate () |
Returns the lines of the template generated from the loaded config file. | |
const std::vector< std::string > & | getTemplate () const |
Returns the lines of the template generated from the loaded config file. | |
PGEcfgFile (const PGEcfgFile &other) | |
PGEcfgFile & | operator= (const PGEcfgFile &other) |
Static Public Member Functions | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
static std::string | stateToString (const State &eState) |
![]() | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
Static Public Attributes | |
static constexpr TPureFloat | WpnYBiasToPlayerCenter { 0.15f } |
Private Types | |
typedef std::pair< FiringMode, std::string > | FiringModeEnumToStringPair |
Private Member Functions | |
Weapon () | |
void | UpdateGraphics () |
Private Attributes | |
PgeObjectPool< PooledBullet > & | m_bullets |
pge_audio::PgeAudio & | m_audio |
PR00FsUltimateRenderingEngine & | m_gfx |
pge_network::PgeNetworkConnectionHandle | m_connHandle |
Owner (shooter) of this weapon. | |
PureObject3D * | m_obj |
WeaponId | m_id {} |
Unique ID, filled by ctor. | |
Type | m_type {} |
Type of weapon, filled by ctor. | |
PgeOldNewValue< State > | m_state |
State as calculated and updated by PGE server instance. | |
FiringMode | m_firingMode |
Current firing mode, something between getVars("firing_mode_def") and getVars("firing_mode_max"). | |
TPureUInt | m_nUnmagBulletCount |
Spare bullets not loaded into weapon. | |
TPureUInt | m_nMagBulletCount |
Bullets loaded into weapon. | |
TPureUInt | m_nBulletsToReload |
Only updated during reload() / Update(). | |
PFL::timeval | m_timeReloadStarted |
Only updated during reload() / Update(). | |
PFL::timeval | m_timeLastShot |
Only updated during pullTrigger() / Update(). | |
bool | m_bAvailable |
Flag for the game, e.g. | |
bool | m_bTriggerReleased |
True if trigger is released, false when being pulled. | |
SoLoud::Wav | m_sndShoot |
SoLoud::Wav | m_sndShootDry |
SoLoud::Wav | m_sndReloadStart |
SoLoud::Wav | m_sndReloadEnd |
SoLoud::Wav | m_sndDamageWall |
SoLoud::Wav | m_sndDamagePlayer |
Static Private Attributes | |
static const std::vector< FiringModeEnumToStringPair > | m_vecOrderOfFiringModes |
static std::set< std::string > | m_WpnAcceptedVars |
Additional Inherited Members | |
![]() | |
virtual bool | validateOnLoad (std::ifstream &) const |
Validate the file being processed by load(). | |
virtual bool | validateOnSave (std::ofstream &) const |
Validate the file being processed by save(). | |
![]() | |
static bool | lineIsValueAssignment (const std::string &sTrimmedLine, bool bCaseSensitiveVars, std::string &sVar, std::string &sValue, bool &bParseError) |
![]() | |
std::set< std::string > | m_acceptedVars |
std::map< std::string, PGEcfgVariable > | m_vars |
|
private |
Definition at line 503 of file WeaponManager.h.
enum Weapon::FiringMode |
Definition at line 337 of file WeaponManager.h.
enum Weapon::State |
Enumerator | |
---|---|
WPN_READY | |
WPN_RELOADING | |
WPN_SHOOTING |
Definition at line 330 of file WeaponManager.h.
enum Weapon::Type |
Enumerator | |
---|---|
Ranged | |
Melee | |
Throwable |
Definition at line 345 of file WeaponManager.h.
Weapon::Weapon | ( | const char * | fname, |
PgeObjectPool< PooledBullet > & | bullets, | ||
pge_audio::PgeAudio & | audio, | ||
PR00FsUltimateRenderingEngine & | gfx, | ||
pge_network::PgeNetworkConnectionHandle | connHandle ) |
fname | Path and filename of the Weapon file to be loaded. |
bullets | A bullet pool for storing the bullets that are fired by Weapon instances created by this WeaponManager instance. Remember, the pool needs to be properly initialized with non-zero capacity, otherwise bullets cannot be fired. |
audio | The engine's audio subsystem instance. |
gfx | The engine's graphics subsystem instance. |
connHandle | Connection handle of the player owning this Weapon instance. |
Definition at line 457 of file WeaponManager.cpp.
|
virtual |
Definition at line 844 of file WeaponManager.cpp.
|
inline |
Definition at line 431 of file WeaponManager.h.
|
private |
Definition at line 1688 of file WeaponManager.cpp.
bool Weapon::canIncBulletCount | ( | ) | const |
Returns if we can add more bullets for this weapon.
Returns if we can add more bullets for this weapon, i.e.
if we can pick up more bullets for this weapon. Useful if we are touching bullet pack for this weapon and want to check if we can pick that up, or we are actually full. Basically this depends on the "unmag" or "mag" bullet count compared to getVars()["cap_max"], depending on if the weapon is reloadable or not.
Definition at line 1091 of file WeaponManager.cpp.
void Weapon::clientReceiveStateFromServer | ( | const State & | state | ) |
Definition at line 1226 of file WeaponManager.cpp.
float Weapon::getAccuracyByPose | ( | bool | bMoving, |
bool | bRun, | ||
bool | bDuck ) const |
Returns a calculated accuracy based on player's pose.
Returns a calculated accuracy (aim) based on player's pose.
This is basically the weapon's base accuracy (CVAR: acc_angle) multiplied by CVARS: acc_m_duck, acc_m_run, acc_m_walk.
bMoving | Set to true of player is moving (walk or run), or false if is still at the moment. |
bRun | Used only if bMoving is true. If bRun is true, CVAR acc_m_run will be used, otherwise CVAR acc_m_walk will be used for calculation. |
bDuck | If true, accuracy will be multiplied by CVAR acc_m_duck. |
Definition at line 1508 of file WeaponManager.cpp.
CConsole & Weapon::getConsole | ( | ) | const |
Returns access to console preset with logger module name as this class.
Definition at line 855 of file WeaponManager.cpp.
const Weapon::FiringMode & Weapon::getCurrentFiringMode | ( | ) | const |
Returns the current firing mode of the weapon.
This is something between getVars("firing_mode_def") and getVars("firing_mode_max").
Definition at line 1014 of file WeaponManager.cpp.
float Weapon::getDamagePerFireRating | ( | ) | const |
Returns a calculated rating of damage caused by a single shot fired.
Returns a calculated rating of damage caused by a single shot fired: DPFR.
This is a positive number usually in range [0.01, 100], rarely even bigger.
Definition at line 1450 of file WeaponManager.cpp.
float Weapon::getDamagePerSecondRating | ( | ) | const |
Returns a calculated rating of total damage per 1 second.
Returns a calculated rating of total damage per 1 second: DPSR.
This is used by WeaponManager to put Weapons into order based on their power. Always positive.
Definition at line 1487 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getDryFiringSound | ( | ) |
Definition at line 1645 of file WeaponManager.cpp.
float Weapon::getFiringRate | ( | ) | const |
Returns a calculated firing rate per 1 second.
Currently it takes the firing cooldown into account, not considering magazine size and reload time. So this is perfect only for those weapons which cannot be emptied within 1 second with continuous firing. If a weapon can be emptied within 1 second and reload is needed to continue firing, this function returns imprecise value.
Also, this function does not consider weapon with different firing modes yet.
Definition at line 1473 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getFiringSound | ( | ) |
Definition at line 1640 of file WeaponManager.cpp.
|
static |
Returns the logger module name of this class.
Definition at line 870 of file WeaponManager.cpp.
float Weapon::getLowestAccuracyByPose | ( | ) | const |
Returns the lowest possible accuracy of this weapon, based only on player's pose.
Returns the lowest possible accuracy (aim) of this weapon, based only on player's pose.
Note: I use the term "weapon accuracy" interchangeably with "aim".
Definition at line 1526 of file WeaponManager.cpp.
float Weapon::getLowestAccuracyPossible | ( | ) | const |
Returns a positive relative bullet angle representing the lowest possible accuracy with this weapon.
Returns a positive relative bullet angle representing the lowest possible accuracy (aim) with this weapon.
The higher is the absolute value of the relative bullet angle, the lower the accuracy (aim) is.
Note: I use the term "weapon accuracy" interchangeably with "aim".
Definition at line 1613 of file WeaponManager.cpp.
TPureUInt Weapon::getMagBulletCount | ( | ) | const |
Returns the "mag" bullet count of this weapon.
This is the number of bullets already loaded into the weapon. A weapon can be fired only if it has positive "mag" bullet count. "Mag" is short for "magazine", even though not all weapons have "magazines", we always refer to "mag" bullet count to know how many bullets are ready to be fired from the weapon without the need of reload. This also means that not reloadable weapons have all their bullets counted as "mag" bullet count.
Definition at line 1056 of file WeaponManager.cpp.
float Weapon::getMaximumRecoilMultiplier | ( | ) | const |
Returns the weapon's maximum recoil multiplier.
This is basically value of CVAR recoil_m. The minimum recoil multiplier is always 1.f for any weapon.
Definition at line 1581 of file WeaponManager.cpp.
float Weapon::getMomentaryAccuracy | ( | bool | bMoving, |
bool | bRun, | ||
bool | bDuck ) const |
Returns the calculated momentary accuracy based on all factors.
Returns the calculated momentary accuracy (aim) based on all factors.
The momentary accuracy depends on multiple factors:
Note: I use the term "weapon accuracy" interchangeably with "aim".
bMoving | Same as for getAccuracyByPose(). |
bRun | Same as for getAccuracyByPose(). |
bDuck | Same as for getAccuracyByPose(). |
Definition at line 1600 of file WeaponManager.cpp.
float Weapon::getMomentaryRecoilMultiplier | ( | ) | const |
Returns the momentary recoil multiplier.
The momentary recoil multiplier is always between 1.0 and CVAR recoil_m. When a shot is fired, the momentary recoil multiplier is set to CVAR recoil_m, and then is it linear decreased to 1.0 over the duration of CVAR recoil_cooldown. This causes rapid firing less accurate than moderate firing with the same weapon. Note that CVAR recoil_m set to 1.0 means no recoil i.e. weapon accuracy (aim) is not affected by recoil.
Definition at line 1541 of file WeaponManager.cpp.
PureObject3D & Weapon::getObject3D | ( | ) |
Returns the graphical object entity associated to this weapon object.
Definition at line 893 of file WeaponManager.cpp.
const PureObject3D & Weapon::getObject3D | ( | ) | const |
Returns the graphical object entity associated to this weapon object.
Definition at line 901 of file WeaponManager.cpp.
const pge_network::PgeNetworkConnectionHandle & Weapon::getOwner | ( | ) | const |
Returns the player associated with this weapon.
This is the player specified originally in the constructor of this Weapon object, or another player set using SetOwner(). Players are identified by their connection handle.
Definition at line 1129 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getPlayerHitSound | ( | ) |
Definition at line 1660 of file WeaponManager.cpp.
float Weapon::getRandomRelativeBulletAngle | ( | bool | bMoving, |
bool | bRun, | ||
bool | bDuck ) const |
Returns a random relative angle for a bullet.
Returns a random relative Z angle for a newborn bullet.
This relative Z angle is the difference of the Z angles of the weapon and the newborn bullet. The relative Z angle can be positive or negative but its absolute maximum value is the momentary accuracy (aim) (getMomentaryAccuracy()).
Note: I use the term "weapon accuracy" interchangeably with "aim".
bMoving | Same as for getAccuracyByPose(). |
bRun | Same as for getAccuracyByPose(). |
bDuck | Same as for getAccuracyByPose(). |
Definition at line 1631 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getReloadEndSound | ( | ) |
Definition at line 1655 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getReloadStartSound | ( | ) |
Definition at line 1650 of file WeaponManager.cpp.
const PgeOldNewValue< Weapon::State > & Weapon::getState | ( | ) | const |
Returns the current state of the weapon.
Weapon state can be updated by functions like pullTrigger(), reload(), update(), etc. Weapon state is totally independent of the state of trigger, see: isTriggerReleased().
Definition at line 1221 of file WeaponManager.cpp.
const Weapon::Type & Weapon::getType | ( | ) | const |
Definition at line 865 of file WeaponManager.cpp.
const WeaponId & Weapon::getUniqueId | ( | ) | const |
Definition at line 860 of file WeaponManager.cpp.
TPureUInt Weapon::getUnmagBulletCount | ( | ) | const |
Returns the "unmag" bullet count of this weapon.
This is the number of bullets with the player not loaded into the weapon. To fire these bullets, they first need to be loaded into the weapon using reload(). Only reloadable weapons can have positive number of "unmag" bullets.
Definition at line 1027 of file WeaponManager.cpp.
SoLoud::Wav & Weapon::getWallHitSound | ( | ) |
Definition at line 1665 of file WeaponManager.cpp.
void Weapon::IncBulletCount | ( | TPureUInt | count | ) |
Adds more bullets for this weapon.
Useful when we are picking up bullet pack for this weapon or same kind of weapon.
count | How many bullets we want to add. The actual increase value might be less. See more details at canIncBulletCount(). |
Definition at line 1109 of file WeaponManager.cpp.
bool Weapon::isAvailable | ( | ) | const |
Returns if this weapon is available for the player.
The player is that client whose connection handle was specified in the constructor of this Weapon object.
Definition at line 1431 of file WeaponManager.cpp.
bool Weapon::isTriggerReleased | ( | ) | const |
Returns the state of the trigger.
Note that the trigger state is independent of the state of the weapon that can be queried by getState(). For example:
Definition at line 1388 of file WeaponManager.cpp.
Definition at line 464 of file WeaponManager.h.
TPureBool Weapon::pullTrigger | ( | bool | bMoving, |
bool | bRun, | ||
bool | bDuck ) |
Pulls the trigger of the weapon, which might result in shooting the weapon.
Firing an actual shot depends on different things like current state of the weapon, firing mode, etc. If a shot was actually fired, at least one new bullet is placed in 'bullets' specified in the constructor of this weapon.
Similar to ranged weapons, for melee type weapons as well, this is the attack function.
bMoving | Same as for getAccuracyByPose(). |
bRun | Same as for getAccuracyByPose(). |
bDuck | Same as for getAccuracyByPose(). |
Definition at line 1301 of file WeaponManager.cpp.
void Weapon::releaseTrigger | ( | ) |
Releases the trigger of the weapon.
It is important to invoke this function whenever the player's input imply it. Some firing modes require repeated pull-and-release of the trigger, see FiringMode for details.
Definition at line 1374 of file WeaponManager.cpp.
TPureBool Weapon::reload | ( | ) |
Reloads the weapon i.e.
moves some "unmag" bullets into "mag" bullet count.
moves some "unmag" bullets into "mag" bullet count. See the return value of the function if you are interested in if the reloading is actually triggered by this call. It can happen that the reloading process is not initiated by this call, e.g. reloading has been already initiated previously, or the magazine is already full, etc.
Definition at line 1247 of file WeaponManager.cpp.
void Weapon::Reset | ( | ) |
Resets properties of the weapon to its initial values like when it was just loaded from file.
Useful when the player respawns and we need to reset all of their weapons. The availability for the player is also being reset to false.
Definition at line 1398 of file WeaponManager.cpp.
void Weapon::SetAvailable | ( | bool | bAvail | ) |
Changes the availability of this weapon for the player.
Definition at line 1439 of file WeaponManager.cpp.
void Weapon::SetMagBulletCount | ( | TPureUInt | count | ) |
Sets the "mag" bullet count of this weapon.
See getMagBulletCount() for better understanding "mag" bullet count.
count | The "mag" bullet count to be set. For reloadable weapons, this cannot be greater than getVars()["reloadable"]. For non-reloadable weapons, this cannot be greater than getVars()["cap_max"]. |
Definition at line 1069 of file WeaponManager.cpp.
void Weapon::SetOwner | ( | const pge_network::PgeNetworkConnectionHandle & | owner | ) |
Sets the player associated with this weapon.
Players are identified by their connection handle.
Definition at line 1138 of file WeaponManager.cpp.
void Weapon::SetUnmagBulletCount | ( | TPureUInt | count | ) |
Sets the "unmag" bullet count of this weapon.
See getUnmagBulletCount() for better understanding "unmag" bullet count.
count | The "unmag" bullet count to be set. This cannot be greater than getVars()["cap_max"]. |
Definition at line 1038 of file WeaponManager.cpp.
|
static |
Definition at line 875 of file WeaponManager.cpp.
bool Weapon::update | ( | ) |
Updates the weapon based on the time elapsed since last call to this function.
This function is recommended to be invoked by the game as often as possible, since it is time-dependent. Calling this function takes care of the state transition and other property updates of the weapon, initiated by a trigger pull or reload.
Definition at line 1151 of file WeaponManager.cpp.
|
private |
Definition at line 1701 of file WeaponManager.cpp.
void Weapon::updateOldValues | ( | ) |
Definition at line 1232 of file WeaponManager.cpp.
void Weapon::UpdatePosition | ( | const PureVector & | playerPos, |
bool | bStickToCenter ) |
Updates the graphical object entity associated to this weapon object.
Only the position is updated.
Definition at line 910 of file WeaponManager.cpp.
void Weapon::UpdatePositions | ( | const PureVector & | playerPos, |
const PureVector & | targetPos2D ) |
Updates the graphical object entity associated to this weapon object.
The position and angles are updated. The angles are updated to point to the specified targetPos2D value. This function can be used to update our weapon on our side.
Definition at line 935 of file WeaponManager.cpp.
void Weapon::UpdatePositions | ( | const PureVector & | playerPos, |
TPureFloat | fAngleY, | ||
TPureFloat | fAngleZ ) |
Updates the graphical object entity associated to this weapon object.
The position and angles are updated to the specified values. This function can be used to update the weapon of other clients on our side.
Definition at line 923 of file WeaponManager.cpp.
|
private |
Definition at line 510 of file WeaponManager.h.
|
private |
Flag for the game, e.g.
if true then the player has this weapon.
Definition at line 523 of file WeaponManager.h.
|
private |
True if trigger is released, false when being pulled.
True by default.
Definition at line 524 of file WeaponManager.h.
|
private |
Definition at line 509 of file WeaponManager.h.
|
private |
Owner (shooter) of this weapon.
Should be used by PGE server instance only.
Definition at line 512 of file WeaponManager.h.
|
private |
Current firing mode, something between getVars("firing_mode_def") and getVars("firing_mode_max").
Definition at line 517 of file WeaponManager.h.
|
private |
Definition at line 511 of file WeaponManager.h.
|
private |
Unique ID, filled by ctor.
Definition at line 514 of file WeaponManager.h.
|
private |
Only updated during reload() / Update().
Should be managed by PGE server instance.
Definition at line 520 of file WeaponManager.h.
|
private |
Bullets loaded into weapon.
Even if weapon is not reloadable. Should be managed by PGE server instance.
Definition at line 519 of file WeaponManager.h.
|
private |
Spare bullets not loaded into weapon.
Should be managed by PGE server instance.
Definition at line 518 of file WeaponManager.h.
|
private |
Definition at line 513 of file WeaponManager.h.
|
private |
Definition at line 530 of file WeaponManager.h.
|
private |
Definition at line 529 of file WeaponManager.h.
|
private |
Definition at line 528 of file WeaponManager.h.
|
private |
Definition at line 527 of file WeaponManager.h.
|
private |
Definition at line 525 of file WeaponManager.h.
|
private |
Definition at line 526 of file WeaponManager.h.
|
private |
State as calculated and updated by PGE server instance.
Definition at line 516 of file WeaponManager.h.
|
private |
Only updated during pullTrigger() / Update().
Should be managed by PGE server instance.
Definition at line 522 of file WeaponManager.h.
|
private |
Only updated during reload() / Update().
Should be managed by PGE server instance.
Definition at line 521 of file WeaponManager.h.
|
private |
Type of weapon, filled by ctor.
Definition at line 515 of file WeaponManager.h.
|
staticprivate |
Definition at line 1677 of file WeaponManager.h.
|
staticprivate |
Definition at line 507 of file WeaponManager.h.
|
staticconstexpr |
Definition at line 352 of file WeaponManager.h.