Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Tactics3D::RemotePC Class Reference

#include <Tactics3DRemotePC.h>

Inheritance diagram for Tactics3D::RemotePC:
Tactics3D::Warrior OpenSkyNet::Core::ABCObject OpenSkyNet::Core::CollisionListener OpenSkyNet::Core::Object

Public Member Functions

 RemotePC (OpenSkyNet::Utils::uint networkId_, OpenSkyNet::Core::PhysVisObject *pVO_, int gp_, int lvl_, int dex_, int str_, int end_, TEAM team_, OpenSkyNet::Utils::Socket *socket_)
 
virtual ~RemotePC ()
 
void recvActions (const std::vector< Warrior * > &warriors_)
 
Object interface methods
virtual void setPos (const OpenSkyNet::Math::Point<> &pos_)
 
Tactics3D event handlers
virtual void onMove ()
 
virtual void onHipFire (OpenSkyNet::Core::Object *intendedTarget_, Action *action_)
 
virtual void onIronSightsFire (OpenSkyNet::Core::Object *intendedTarget_, Action *action_)
 
virtual void onEvocation ()
 
virtual bool onAttack (std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
 
- Public Member Functions inherited from Tactics3D::Warrior
 Warrior (OpenSkyNet::Utils::uint networkId_, OpenSkyNet::Core::PhysVisObject *pVO_, int gp_, int lvl_, int dex_, int str_, int end_, TEAM team_)
 
virtual ~Warrior ()
 
void setTempOD (int oD_)
 
void takeDamage (int dmg_)
 
virtual void setIsTurn (bool isTurn_)
 
bool isGrounded () const
 
void setGrounded (bool isGrounded_)
 
bool isGrappling () const
 
WarriorgetOtherGrappler () const
 
virtual bool grapple (Warrior *otherGrappler_)
 
virtual bool stopGrappling ()
 
bool isAlive () const
 
void setDead ()
 
const std::vector< AttackRange * > & getAttackRanges () const
 
virtual const AttackRangegetAttackRange (SPECIAL_MOVE specialMove_) const
 
void addEvocationObject (EvocationObject *evoObj_)
 
std::vector< EvocationObject * > & getEvocationObjects ()
 
virtual bool doPerformAction (const Action *action_, bool &doDelay_, bool &doSubstitute_, Action *&substitute_)
 
void snapToGrid ()
 
virtual OpenSkyNet::Math::Point getPos () const
 
virtual void getPos (OpenSkyNet::Math::Point<> &pos_) const
 
virtual bool getHasPosChanged () const
 
virtual void setHasPosChanged (bool val_)
 
virtual OpenSkyNet::Math::Matrix3x3 getRot () const
 
virtual void getRot (OpenSkyNet::Math::Matrix3x3 &rot_) const
 
virtual void setRot (const OpenSkyNet::Math::Matrix3x3 &rot_)
 
virtual bool getHasRotChanged () const
 
virtual void setHasRotChanged (bool val_)
 
virtual OpenSkyNet::Math::Point getVel () const
 
virtual void getVel (OpenSkyNet::Math::Point<> &vel_) const
 
virtual void setVel (const OpenSkyNet::Math::Point<> &vel_)
 
virtual OpenSkyNet::Math::Point getAngVel () const
 
virtual void getAngVel (OpenSkyNet::Math::Point<> &angVel_) const
 
virtual const
OpenSkyNet::Core::PhysicalObject
getPhysicalObject () const
 
virtual
OpenSkyNet::Core::PhysicalObject
getPhysicalObject ()
 
virtual const
OpenSkyNet::Core::VisibleObject
getVisibleObject () const
 
virtual
OpenSkyNet::Core::VisibleObject
getVisibleObject ()
 
virtual void setNonCollidingData (OpenSkyNet::Core::Object *obj_)
 
virtual void handleNonCollidingTransformApplied (OpenSkyNet::Core::Object *obj_)
 
virtual bool handleCollisions (OpenSkyNet::Core::Object *collidee_, std::vector< OpenSkyNet::CD::HitInfo > &colliders_, float &dt_)
 
virtual bool handleOutOfGrid (OpenSkyNet::Core::Object *obj_)
 
virtual void handleNewAttackRangeCollisions (AttackRange *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
 
virtual void handleDeletedAttackRangeCollisions (AttackRange *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
 
virtual void setVisible (bool val_)
 
const
OpenSkyNet::OgreCore::OgreVisibleObject
getOgreVisibleObject () const
 
OpenSkyNet::OgreCore::OgreVisibleObjectgetOgreVisibleObject ()
 
Ogre::SceneNode * getRenderNode ()
 
Ogre::Entity * getEntity ()
 
void clearFightingStyles ()
 
void addFightingStyle (FIGHTING_STYLE style_, int rank_)
 
const FightingStyleContextMapgetFightingStyleContexts () const
 
void clearSuperPowers ()
 
void addSuperPower (SUPER_POWER power_)
 
const SuperPowerContextMapgetSuperPowerContexts () const
 
virtual bool setSuperPowerActive (SUPER_POWER power_, const SuperPower::Warriors &targets_)
 
bool isSuperPowerActive (SUPER_POWER power_)
 
virtual const std::list
< ICollectible * > & 
getInventory () const
 
virtual std::list
< ICollectible * > & 
getInventory ()
 
virtual const IWeapongetPrimaryWeapon () const
 
virtual IWeapongetPrimaryWeapon ()
 
virtual void setPrimaryWeapon (IWeapon *weapon_)
 
int getGP () const
 
int getLvl () const
 
virtual int getDex () const
 
virtual int getInitDex () const
 
virtual void setDex (int dex_)
 
virtual void setInitDex (int dex_)
 
virtual int getStr () const
 
virtual int getInitStr () const
 
virtual void setStr (int str_)
 
virtual void setInitStr (int str_)
 
virtual int getEnd () const
 
virtual int getInitEnd () const
 
virtual void setEnd (int end_)
 
virtual void setInitEnd (int end_)
 
TEAM getTeam () const
 
int getOO (FIGHTING_STYLE style_=HIGHEST_OO) const
 
int getOD () const
 
int getInitOD () const
 
int getDmgAdj () const
 
int getSpeed () const
 
void setSpeed (int speed_)
 
float getMovementLeftInAction () const
 
void disableMovement ()
 
void enableMovement ()
 
bool isMovementEnabled () const
 
virtual void setActions ()
 
void clearActions ()
 
std::list< Tactics3D::Action * > * getActions ()
 
const std::list
< Tactics3D::Action * > * 
getActions () const
 
virtual bool canAddAction (const Tactics3D::Action *action_) const
 
virtual bool updateContinuousAction (Tactics3D::Action *&action_)
 
SPECIAL_MOVE getSpecialMoveJustPerformed () const
 
virtual void addCounterableMove (Warrior *attacker_, SPECIAL_MOVE move_)
 
virtual bool canCounter (Warrior *attacker_, SPECIAL_MOVE move_) const
 
virtual void getPointInSpread (float spread_, OpenSkyNet::Math::Point< float, 2 > &p_)
 
const OpenSkyNet::Math::Point
< float, 2 > & 
getCachedPointInSpread ()
 
virtual void getAim (float spread_, OpenSkyNet::Math::Point<> &origin_, OpenSkyNet::Math::Point<> &dir_)
 
float getDist (const Warrior *warrior_) const
 
virtual void onPrePerformAnyAction (const std::vector< Warrior * > &warriors_)
 
virtual void onPostPerformAction (const Action *action_)
 
virtual void onDefend ()
 
virtual void onAttacked (const std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
 
virtual void onDefended ()
 
virtual void onRoundEnd ()
 
OpenSkyNet::Utils::uint getNetworkId () const
 
- Public Member Functions inherited from OpenSkyNet::Core::ABCObject
 ABCObject ()
 
virtual ~ABCObject ()
 
virtual bool getHasVelChanged () const
 
virtual void setHasVelChanged (bool val_)
 
virtual void setAngVel (const Math::Point<> &angVel_)
 
virtual bool getHasAngVelChanged () const
 
virtual void setHasAngVelChanged (bool val_)
 
virtual const std::string & getName () const
 
virtual void setName (const std::string &name_)
 
- Public Member Functions inherited from OpenSkyNet::Core::Object
 Object ()
 
virtual ~Object ()
 
- Public Member Functions inherited from OpenSkyNet::Core::CollisionListener
virtual bool handleCollisions (Object *collidee_, std::vector< CD::HitInfo > &collisions_, float &dt_)
 
virtual void handleNewCollisions (Object *collidee_, std::vector< Object * > &colliders_)
 
virtual void handleDeletedCollisions (Object *collidee_, std::vector< Object * > &colliders_)
 
virtual bool handleWrongSidedness (Object *collidee_, std::vector< CD::HitInfo > &collisions_)
 

Static Public Member Functions

static void recvAttributes (OpenSkyNet::Utils::Socket *socket_)
 
static void resetAll (OpenSkyNet::Utils::Socket *socket_)
 
- Static Public Member Functions inherited from Tactics3D::Warrior
static void setEvent (OpenSkyNet::Utils::SyncEvent &event_, bool ignoreIfQuitting_)
 
static void waitForEvent (OpenSkyNet::Utils::SyncEvent &event_, bool ignoreIfQuitting_)
 
static void setPerformEvent (bool ignoreIfQuitting_)
 
static void waitForPerformEvent (bool ignoreIfQuitting_)
 
static OpenSkyNet::Utils::uint getAttributesBufferLen ()
 
static OpenSkyNet::Utils::uint serializeAttributes (const Warrior *warrior_, char(&buffer_)[MAX_STRING_SIZE])
 
static void assembleAttributes (char(&buffer_)[MAX_STRING_SIZE], std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
 
static OpenSkyNet::Utils::uint getActionsBufferLen ()
 
static OpenSkyNet::Utils::uint serializeActions (const Warrior *warrior_, char(&buffer_)[MAX_STRING_SIZE])
 
static void assembleActions (char(&buffer_)[MAX_STRING_SIZE], const std::vector< Warrior * > &warriors_, OpenSkyNet::Utils::uint warriorIndex_, std::list< Action * > &actions_)
 
static OpenSkyNet::Utils::uint getMoveUpdateBufferLen ()
 
static OpenSkyNet::Utils::uint serializeMoveUpdate (const Warrior *warrior_, int flags_, char(&buffer_)[MAX_STRING_SIZE])
 
static void assembleMoveUpdate (char(&buffer_)[MAX_STRING_SIZE], OpenSkyNet::Utils::uint warriorIndex_, int &flags_, OpenSkyNet::Math::Point<> &pos_, OpenSkyNet::Math::Point<> &axis_, float &radians_)
 
static OpenSkyNet::Utils::uint getAttackBufferLen ()
 
static OpenSkyNet::Utils::uint serializeAttack (const std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_, char(&buffer_)[MAX_STRING_SIZE])
 
static void assembleAttack (char(&buffer_)[MAX_STRING_SIZE], std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
 

Protected Member Functions

void recvAttack (std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
 

Protected Attributes

OpenSkyNet::Utils::Socket_socket
 
- Protected Attributes inherited from Tactics3D::Warrior
OpenSkyNet::Utils::uint _networkId
 
OpenSkyNet::Core::PhysVisObject_pVO
 
OpenSkyNet::Math::Point _prevPos
 
int _gp
 
int _lvl
 
int _dex
 
int _str
 
int _end
 
int _initDex
 
int _initStr
 
int _initEnd
 
TEAM _team
 
int _oO
 
int _oD
 
int _prevOD
 
int _initOD
 
int _dmgAdj
 
int _speed
 
int _flags
 
int _numRoundEndEventsSinceTempOD
 
FightingStyleContextMap _fightingStyleContexts
 
SuperPowerContextMap _superPowerContexts
 
bool _isTurn
 
bool _isGrounded
 
bool _isGrappling
 
bool _isDead
 
SPECIAL_MOVE _specialMoveJustPerformed
 
std::set< CounterableMove_counterableMoves
 
float _movementLeftInAction
 
float _distMovedLastPosSet
 
std::vector< AttackRange * > _attackRanges
 
std::vector< EvocationObject * > _evocationObjects
 
std::list< Action * > _actions
 
Warrior_otherGrappler
 
OpenSkyNet::Math::Point< float, 2 > _cachedPointInSpread
 
std::list< ICollectible * > _inventory
 
- Protected Attributes inherited from OpenSkyNet::Core::ABCObject
std::string _name
 
bool _hasPosChanged
 
bool _hasRotChanged
 
bool _hasVelChanged
 
bool _hasAngVelChanged
 

Friends

voidrecvPCAttributes (void *arg)
 

Additional Inherited Members

- Public Types inherited from Tactics3D::Warrior
enum  TEAM { NO_TEAM, PHILOSOPHER, MUSICIAN, MAX_TEAM }
 
typedef std::map
< FIGHTING_STYLE,
FightingStyleContext
FightingStyleContextMap
 
typedef std::map< SUPER_POWER,
SuperPowerContext
SuperPowerContextMap
 
- Public Attributes inherited from Tactics3D::Warrior
struct Tactics3D::Warrior::Override _override
 
- Static Public Attributes inherited from Tactics3D::Warrior
static const
OpenSkyNet::Utils::uint 
MAX_FIGHTING_STYLES = 4
 
static const
OpenSkyNet::Utils::uint 
MAX_SUPER_POWERS = 2
 
static const
OpenSkyNet::Utils::uint 
MAX_ACTIONS = 3
 
static const volatile bool * _quit = 0
 
static bool _isSmokeTest = false
 
- Static Protected Attributes inherited from Tactics3D::Warrior
static OpenSkyNet::Utils::SyncEvent _performEvent
 

Detailed Description

A player character in the game controlled by a remote client.

Constructor & Destructor Documentation

RemotePC::RemotePC ( OpenSkyNet::Utils::uint  networkId_,
OpenSkyNet::Core::PhysVisObject pVO_,
int  gp_,
int  lvl_,
int  dex_,
int  str_,
int  end_,
TEAM  team_,
OpenSkyNet::Utils::Socket socket_ 
)
virtual Tactics3D::RemotePC::~RemotePC ( )
inlinevirtual

Member Function Documentation

bool RemotePC::onAttack ( std::vector< OpenSkyNet::Utils::TaggedUnion > &  eventParams_)
virtual

Reimplemented from Tactics3D::Warrior.

void RemotePC::onEvocation ( )
virtual
Todo:
check if creation failed for sender

Reimplemented from Tactics3D::Warrior.

void RemotePC::onHipFire ( OpenSkyNet::Core::Object intendedTarget_,
Action action_ 
)
virtual

Reimplemented from Tactics3D::Warrior.

void RemotePC::onIronSightsFire ( OpenSkyNet::Core::Object intendedTarget_,
Action action_ 
)
virtual

Reimplemented from Tactics3D::Warrior.

void RemotePC::onMove ( )
virtual
Todo:
Lerp to final position

Reimplemented from Tactics3D::Warrior.

void RemotePC::recvActions ( const std::vector< Warrior * > &  warriors_)
void RemotePC::recvAttack ( std::vector< OpenSkyNet::Utils::TaggedUnion > &  eventParams_)
protected
void RemotePC::recvAttributes ( OpenSkyNet::Utils::Socket socket_)
static
void RemotePC::resetAll ( OpenSkyNet::Utils::Socket socket_)
static
void RemotePC::setPos ( const OpenSkyNet::Math::Point<> &  pos_)
virtual

Reimplemented from Tactics3D::Warrior.

Friends And Related Function Documentation

void* recvPCAttributes ( void arg)
friend

This function will be threaded from a client or server to wait for PC data.

Todo:
Don't hardcode the number of expected PCs

Member Data Documentation

OpenSkyNet::Utils::Socket* Tactics3D::RemotePC::_socket
protected

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