Emergency 20 Dokumentation  4.2.0
em5::CommandContext Class Reference

EMERGENCY 5 command context class. More...

#include <CommandContext.h>

Inheritance diagram for em5::CommandContext:
qsf::game::CommandContext

Public Types

enum  EvaluationReason { EVALUATIONREASON_UNKNOWN, EVALUATIONREASON_SHOWCOMMAND_CURSOR, EVALUATIONREASON_SHOWCOMMAND_ABOVE_ENTITY }
 

Public Member Functions

 CommandContext ()
 Default constructor. More...
 
virtual ~CommandContext ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::game::CommandContext
 CommandContext ()
 Default constructor. More...
 
bool hasTargetPosition () const
 Return true if a target position exists. More...
 
const glm::vec3 & getTargetPosition () const
 Return target position, in case the target position is not valid, glm::vec3(0,0,0) is returned, use hasTargetPosition() to check if target exists. More...
 

Public Attributes

PlayermPlayer
 Player issuing the command; always valid, do not destroy. More...
 
bool mIsAutomatism
 "true" if command is pushed by automatism, not by player direct More...
 
EvaluationReason mEvaluationReason
 Indicates the reason for an evaluation of an command. More...
 
- Public Attributes inherited from qsf::game::CommandContext
EntitymCaller
 Caller entity for the command; always valid, do not destroy. More...
 
EntitymTargetEntity
 Target entity for the command; may be a null pointer if no target available, do not destroy. More...
 
boost::optional< glm::vec3 > mTargetPosition
 Target position if there is one available. More...
 
boost::optional< glm::quat > mTargetRotation
 Target rotation if there is one available. More...
 
uint64 mUserData
 Optional user data to send in "em5::Messages::EM5_SPAWN_UNIT", "qsf::getUninitialized<uint64>()" if there's no user data. More...
 
bool mTargetPositionSealed
 Indicates if the given target position is sealed and thus shouldn't be modified. More...
 
bool mAllowSelfExecution
 If "true", self-execution commands are allowed (i.e. no target given, or the target is one of the executing callers) More...
 
std::vector< Entity * > mCallers
 The caller entities for which the same command is executed in a row; valid only in command execution. More...
 
size_t mCurrentCallerIndex
 The index of the current caller; valid only in command execution. More...
 

Detailed Description

EMERGENCY 5 command context class.

Member Enumeration Documentation

Enumerator
EVALUATIONREASON_UNKNOWN 
EVALUATIONREASON_SHOWCOMMAND_CURSOR 
EVALUATIONREASON_SHOWCOMMAND_ABOVE_ENTITY 

Constructor & Destructor Documentation

em5::CommandContext::CommandContext ( )
inline

Default constructor.

em5::CommandContext::~CommandContext ( )
inlinevirtual

Destructor.

Reimplemented from qsf::game::CommandContext.

Member Data Documentation

EvaluationReason em5::CommandContext::mEvaluationReason

Indicates the reason for an evaluation of an command.

bool em5::CommandContext::mIsAutomatism

"true" if command is pushed by automatism, not by player direct

Player* em5::CommandContext::mPlayer

Player issuing the command; always valid, do not destroy.


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