PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
Loading...
Searching...
No Matches
proofps_dd::MapItem Class Reference

Detailed Description

Definition at line 37 of file MapItem.h.

#include <MapItem.h>

Public Types

typedef uint32_t MapItemId
 

Public Member Functions

 MapItem (PR00FsUltimateRenderingEngine &gfx, const MapItemType &eMapItemType, const PureVector &pos)
 
 ~MapItem ()
 
 MapItem (const MapItem &)=delete
 
MapItemoperator= (const MapItem &)=delete
 
 MapItem (MapItem &&)=delete
 
MapItem && operator= (MapItem &&)=delete
 
const MapItemIdgetId () const
 
const MapItemTypegetType () const
 
const PureVector & getPos () const
 
const PureObject3D & getObject3D () const
 
std::string toString () const
 
bool isTaken () const
 
void take ()
 
void unTake ()
 
const std::chrono::time_point< std::chrono::steady_clock > & getTimeTaken () const
 
void update (float factor)
 

Static Public Member Functions

static const MapItemIdgetGlobalMapItemId ()
 
static void resetGlobalData ()
 
static uint32_t getItemRespawnTimeSecs (const MapItem &mapItem)
 
static std::string toString (const MapItemType &eMapItemType)
 

Static Public Attributes

static constexpr uint32_t ITEM_ARMOR_AP_INC = 50
 
static constexpr uint32_t ITEM_ARMOR_RESPAWN_SECS = 10
 
static constexpr uint32_t ITEM_HEALTH_HP_INC = 20
 
static constexpr uint32_t ITEM_HEALTH_RESPAWN_SECS = 10
 
static constexpr uint32_t ITEM_JETLAX_RESPAWN_SECS = 30
 
static constexpr uint32_t ITEM_WPN_PISTOL_RESPAWN_SECS = 10
 
static constexpr uint32_t ITEM_WPN_MACHINEGUN_RESPAWN_SECS = 20
 
static constexpr uint32_t ITEM_WPN_BAZOOKA_RESPAWN_SECS = 20
 
static constexpr uint32_t ITEM_WPN_PUSHA_RESPAWN_SECS = 20
 
static constexpr uint32_t ITEM_WPN_MACHINEPISTOL_RESPAWN_SECS = 30
 
static constexpr uint32_t ITEM_WPN_SHOTGUN_RESPAWN_SECS = 20
 
static constexpr uint32_t ITEM_WPN_GRENADELAUNCHER_RESPAWN_SECS = 30
 

Private Attributes

MapItemId m_id
 Unique id for identifying.
 
PR00FsUltimateRenderingEngine & m_gfx
 
PureObject3D * m_obj
 
float m_fObjPosOriginalY
 The vertical floating movement is relative to this coord.
 
MapItemType m_eMapItemType
 
bool m_bTaken
 
std::chrono::time_point< std::chrono::steady_clock > m_timeTaken
 
float m_fSinusMotionDegrees
 For iterating the vertical floating movement.
 

Static Private Attributes

static MapItemId m_globalMapItemId = 0
 Next unique id for identifying.
 
static std::map< MapItemType, PureObject3D * > m_mapReferenceObjects
 

Member Typedef Documentation

◆ MapItemId

Definition at line 41 of file MapItem.h.

Constructor & Destructor Documentation

◆ MapItem() [1/3]

proofps_dd::MapItem::MapItem ( PR00FsUltimateRenderingEngine & gfx,
const MapItemType & eMapItemType,
const PureVector & pos )

Definition at line 103 of file MapItem.cpp.

◆ ~MapItem()

proofps_dd::MapItem::~MapItem ( )

Definition at line 167 of file MapItem.cpp.

◆ MapItem() [2/3]

proofps_dd::MapItem::MapItem ( const MapItem & )
delete

◆ MapItem() [3/3]

proofps_dd::MapItem::MapItem ( MapItem && )
delete

Member Function Documentation

◆ getGlobalMapItemId()

const proofps_dd::MapItem::MapItemId & proofps_dd::MapItem::getGlobalMapItemId ( )
static

Definition at line 30 of file MapItem.cpp.

◆ getId()

const proofps_dd::MapItem::MapItemId & proofps_dd::MapItem::getId ( ) const

Definition at line 177 of file MapItem.cpp.

◆ getItemRespawnTimeSecs()

uint32_t proofps_dd::MapItem::getItemRespawnTimeSecs ( const MapItem & mapItem)
static

Definition at line 45 of file MapItem.cpp.

◆ getObject3D()

const PureObject3D & proofps_dd::MapItem::getObject3D ( ) const

Definition at line 192 of file MapItem.cpp.

◆ getPos()

const PureVector & proofps_dd::MapItem::getPos ( ) const

Definition at line 187 of file MapItem.cpp.

◆ getTimeTaken()

const std::chrono::time_point< std::chrono::steady_clock > & proofps_dd::MapItem::getTimeTaken ( ) const

Definition at line 237 of file MapItem.cpp.

◆ getType()

const proofps_dd::MapItemType & proofps_dd::MapItem::getType ( ) const

Definition at line 182 of file MapItem.cpp.

◆ isTaken()

bool proofps_dd::MapItem::isTaken ( ) const

Definition at line 207 of file MapItem.cpp.

◆ operator=() [1/2]

MapItem & proofps_dd::MapItem::operator= ( const MapItem & )
delete

◆ operator=() [2/2]

MapItem && proofps_dd::MapItem::operator= ( MapItem && )
delete

◆ resetGlobalData()

void proofps_dd::MapItem::resetGlobalData ( )
static

Definition at line 35 of file MapItem.cpp.

◆ take()

void proofps_dd::MapItem::take ( )

Definition at line 212 of file MapItem.cpp.

◆ toString() [1/2]

std::string proofps_dd::MapItem::toString ( ) const

Definition at line 202 of file MapItem.cpp.

◆ toString() [2/2]

std::string proofps_dd::MapItem::toString ( const MapItemType & eMapItemType)
static

Definition at line 74 of file MapItem.cpp.

◆ unTake()

void proofps_dd::MapItem::unTake ( )

Definition at line 225 of file MapItem.cpp.

◆ update()

void proofps_dd::MapItem::update ( float factor)

Definition at line 242 of file MapItem.cpp.

Member Data Documentation

◆ ITEM_ARMOR_AP_INC

uint32_t proofps_dd::MapItem::ITEM_ARMOR_AP_INC = 50
staticconstexpr

Definition at line 43 of file MapItem.h.

◆ ITEM_ARMOR_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_ARMOR_RESPAWN_SECS = 10
staticconstexpr

Definition at line 44 of file MapItem.h.

◆ ITEM_HEALTH_HP_INC

uint32_t proofps_dd::MapItem::ITEM_HEALTH_HP_INC = 20
staticconstexpr

Definition at line 45 of file MapItem.h.

◆ ITEM_HEALTH_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_HEALTH_RESPAWN_SECS = 10
staticconstexpr

Definition at line 46 of file MapItem.h.

◆ ITEM_JETLAX_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_JETLAX_RESPAWN_SECS = 30
staticconstexpr

Definition at line 47 of file MapItem.h.

◆ ITEM_WPN_BAZOOKA_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_BAZOOKA_RESPAWN_SECS = 20
staticconstexpr

Definition at line 50 of file MapItem.h.

◆ ITEM_WPN_GRENADELAUNCHER_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_GRENADELAUNCHER_RESPAWN_SECS = 30
staticconstexpr

Definition at line 54 of file MapItem.h.

◆ ITEM_WPN_MACHINEGUN_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_MACHINEGUN_RESPAWN_SECS = 20
staticconstexpr

Definition at line 49 of file MapItem.h.

◆ ITEM_WPN_MACHINEPISTOL_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_MACHINEPISTOL_RESPAWN_SECS = 30
staticconstexpr

Definition at line 52 of file MapItem.h.

◆ ITEM_WPN_PISTOL_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_PISTOL_RESPAWN_SECS = 10
staticconstexpr

Definition at line 48 of file MapItem.h.

◆ ITEM_WPN_PUSHA_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_PUSHA_RESPAWN_SECS = 20
staticconstexpr

Definition at line 51 of file MapItem.h.

◆ ITEM_WPN_SHOTGUN_RESPAWN_SECS

uint32_t proofps_dd::MapItem::ITEM_WPN_SHOTGUN_RESPAWN_SECS = 20
staticconstexpr

Definition at line 53 of file MapItem.h.

◆ m_bTaken

bool proofps_dd::MapItem::m_bTaken
private

Definition at line 100 of file MapItem.h.

◆ m_eMapItemType

MapItemType proofps_dd::MapItem::m_eMapItemType
private

Definition at line 99 of file MapItem.h.

◆ m_fObjPosOriginalY

float proofps_dd::MapItem::m_fObjPosOriginalY
private

The vertical floating movement is relative to this coord.

Definition at line 98 of file MapItem.h.

◆ m_fSinusMotionDegrees

float proofps_dd::MapItem::m_fSinusMotionDegrees
private

For iterating the vertical floating movement.

Definition at line 102 of file MapItem.h.

◆ m_gfx

PR00FsUltimateRenderingEngine& proofps_dd::MapItem::m_gfx
private

Definition at line 96 of file MapItem.h.

◆ m_globalMapItemId

proofps_dd::MapItem::MapItemId proofps_dd::MapItem::m_globalMapItemId = 0
staticprivate

Next unique id for identifying.

Used by server and client instances.

Definition at line 89 of file MapItem.h.

◆ m_id

MapItemId proofps_dd::MapItem::m_id
private

Unique id for identifying.

Used by server and client instances. Must be equal for same item across server and clients, used in packets too.

Definition at line 93 of file MapItem.h.

◆ m_mapReferenceObjects

std::map< proofps_dd::MapItemType, PureObject3D * > proofps_dd::MapItem::m_mapReferenceObjects
staticprivate

Definition at line 91 of file MapItem.h.

◆ m_obj

PureObject3D* proofps_dd::MapItem::m_obj
private

Definition at line 97 of file MapItem.h.

◆ m_timeTaken

std::chrono::time_point<std::chrono::steady_clock> proofps_dd::MapItem::m_timeTaken
private

Definition at line 101 of file MapItem.h.


The documentation for this class was generated from the following files: