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
Tactics3DWarrior.h
Go to the documentation of this file.
1 // Copyright (C) 2006-2015 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This file is part of Tactics3D.
7 //
8 // Tactics3D is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // Tactics3D is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 
23 #ifndef TACTICS3DWARRIOR_H
24 #define TACTICS3DWARRIOR_H
25 
26 #include "../Libs/OgreCore_LIB/OgrePhysVisObject.h"
27 #include "../Libs/Core_LIB/ICollisionListener.h"
28 #include "../Libs/Core_LIB/CLog.h"
29 #include "../Libs/Utils_LIB/UThread.h"
30 
31 #ifdef USE_EASTL
32 #include <EASTL/fixed_map.h>
33 #endif //USE_EASTL
34 
35 #include "Tactics3DAction.h"
36 #include "Tactics3DAttackRange.h"
37 #include "Tactics3DInventory.h"
39 
40 namespace Tactics3D {
44  public:
46  int _rank, _oO, _oD;
47  FightingStyleContext() : _rank(0), _oO(0), _oD(0) {}
48  FightingStyleContext(int rank_, int oO_, int oD_) : _rank(rank_), _oO(oO_), _oD(oD_) {}
49  };
50 
52  int _uses;
56  SuperPowerContext(int maxUses_) : _uses(maxUses_), _roundsRemaining(0) {}
57  };
58 
62 
64 #ifdef USE_EASTL
65  typedef eastl::fixed_map<FIGHTING_STYLE, FightingStyleContext, MAX_FIGHTING_STYLES> FightingStyleContextMap;
66  typedef eastl::fixed_map<SUPER_POWER, SuperPowerContext, MAX_SUPER_POWERS> SuperPowerContextMap;
67 #else
68  typedef std::map<FIGHTING_STYLE, FightingStyleContext> FightingStyleContextMap;
69  typedef std::map<SUPER_POWER, SuperPowerContext> SuperPowerContextMap;
70 #endif
71 
73 
74  #define WARRIOR_MOVEMENT_DISABLED (1 << 0)
75  protected:
79  int _gp, _lvl;
83  int _dmgAdj;
84  int _speed;
85  int _flags;
91  std::set<CounterableMove> _counterableMoves;
93  std::vector<AttackRange*> _attackRanges;
94  std::vector<EvocationObject*> _evocationObjects;
95  std::list<Action*> _actions;
98  std::list<ICollectible*> _inventory;
99 
101  public:
103  int gp_, int lvl_, int dex_, int str_, int end_, TEAM team_);
104 
105  virtual ~Warrior();
106 
109  virtual OpenSkyNet::Math::Point<> getPos() const { return _pVO->getPos(); }
110  virtual void getPos(OpenSkyNet::Math::Point<>& pos_) const { _pVO->getPos(pos_); }
111  virtual void setPos(const OpenSkyNet::Math::Point<>& pos_);
112  virtual bool getHasPosChanged() const { return _pVO->getHasPosChanged(); }
113  virtual void setHasPosChanged(bool val_) { _pVO->setHasPosChanged(val_); }
114 
115  virtual OpenSkyNet::Math::Matrix3x3 getRot() const { return _pVO->getRot(); }
116  virtual void getRot(OpenSkyNet::Math::Matrix3x3& rot_) const { _pVO->getRot(rot_); }
117  virtual void setRot(const OpenSkyNet::Math::Matrix3x3& rot_) { _pVO->setRot(rot_); }
118  virtual bool getHasRotChanged() const { return _pVO->getHasRotChanged(); }
119  virtual void setHasRotChanged(bool val_) { _pVO->setHasRotChanged(val_); }
120 
121  virtual OpenSkyNet::Math::Point<> getVel() const;
122  virtual void getVel(OpenSkyNet::Math::Point<>& vel_) const;
123  virtual void setVel(const OpenSkyNet::Math::Point<> &vel_) { _pVO->setVel(vel_); }
124 
125  virtual OpenSkyNet::Math::Point<> getAngVel() const;
126  virtual void getAngVel(OpenSkyNet::Math::Point<>& angVel_) const;
127 
133 
138  virtual bool handleCollisions(OpenSkyNet::Core::Object* collidee_, std::vector<OpenSkyNet::CD::HitInfo>& colliders_, float& dt_);
139  virtual bool handleOutOfGrid(OpenSkyNet::Core::Object* obj_);
141 
144  virtual void handleNewAttackRangeCollisions(AttackRange* collidee_, std::vector<OpenSkyNet::Core::Object*>& colliders_) {}
145  virtual void handleDeletedAttackRangeCollisions(AttackRange* collidee_, std::vector<OpenSkyNet::Core::Object*>& colliders_) {}
147 
150  virtual void setVisible(bool val_) { getVisibleObject()->setVisible(val_); }
151 
153  return static_cast<const OpenSkyNet::OgreCore::OgreVisibleObject*>(getVisibleObject());
154  }
157  }
158 
159  inline Ogre::SceneNode* getRenderNode() {
161 
162  if (ogreVisObj)
163  return ogreVisObj->getRenderNode();
164 
165  return 0;
166  }
167 
168  inline Ogre::Entity* getEntity() {
169  Ogre::SceneNode* node = getRenderNode();
170 
171  if (node)
172  return static_cast<Ogre::Entity*>(node->getAttachedObject(getName()));
173 
174  return 0;
175  }
177 
180  void clearFightingStyles();
181  void addFightingStyle(FIGHTING_STYLE style_, int rank_);
184 
187  inline void clearSuperPowers() { _superPowerContexts.clear(); }
188  void addSuperPower(SUPER_POWER power_);
190 
191  virtual bool setSuperPowerActive(SUPER_POWER power_, const SuperPower::Warriors& targets_);
192  bool isSuperPowerActive(SUPER_POWER power_);
194 
197  virtual const std::list<ICollectible*>& getInventory() const { return _inventory; }
198  virtual std::list<ICollectible*>& getInventory() { return _inventory; }
199 
200  virtual const IWeapon* getPrimaryWeapon() const;
201  virtual IWeapon* getPrimaryWeapon();
202 
203  virtual void setPrimaryWeapon(IWeapon* weapon_);
205 
208  inline int getGP() const { return _gp; }
209 
210  inline int getLvl() const { return _lvl; }
211 
212  virtual int getDex() const { return _dex; }
213  virtual int getInitDex() const { return _initDex; }
214  virtual void setDex(int dex_);
215  virtual void setInitDex(int dex_) { _initDex = dex_; }
216 
217  virtual int getStr() const { return _str; }
218  virtual int getInitStr() const { return _initStr; }
219  virtual void setStr(int str_);
220  virtual void setInitStr(int str_) { _initStr = str_; }
221 
222  virtual int getEnd() const { return _end; }
223  virtual int getInitEnd() const { return _initEnd; }
224  virtual void setEnd(int end_);
225  virtual void setInitEnd(int end_) { _initEnd = end_; }
226 
227  inline TEAM getTeam() const { return _team; }
228 
229  inline int getOO(FIGHTING_STYLE style_=HIGHEST_OO) const {
230  if (style_ == HIGHEST_OO) return _oO;
231  FightingStyleContextMap::const_iterator i = _fightingStyleContexts.find(style_);
232  assert(i != _fightingStyleContexts.end());
233  return i->second._oO;
234  }
235  inline int getOD() const { return _oD; }
236  inline int getInitOD() const { return _initOD; }
237 
238  inline int getDmgAdj() const { return _dmgAdj; }
239 
240  inline int getSpeed() const { return _speed; }
241  inline void setSpeed(int speed_) { _speed = speed_; }
242 
243  inline float getMovementLeftInAction() const { return _movementLeftInAction; }
246  inline bool isMovementEnabled() const { return !(_flags & WARRIOR_MOVEMENT_DISABLED); }
248 
251  void setTempOD(int oD_);
252 
255  virtual void setActions() {}
256 
257  inline void clearActions() { _actions.clear(); }
258 
259  inline std::list<Tactics3D::Action*>* getActions() { return &_actions; }
260  inline const std::list<Tactics3D::Action*>* getActions() const { return &_actions; }
261 
262  virtual bool canAddAction(const Tactics3D::Action* action_) const;
263 
265  virtual bool updateContinuousAction(Tactics3D::Action*& action_);
267 
268  void takeDamage(int dmg_);
269 
270  virtual void setIsTurn(bool isTurn_);
271 
272  inline bool isGrounded() const { return _isGrounded; }
273  void setGrounded(bool isGrounded_);
274 
275  inline bool isGrappling() const { return _isGrappling; }
276  inline Warrior* getOtherGrappler() const { return _otherGrappler; }
277  virtual bool grapple(Warrior* otherGrappler_);
278  virtual bool stopGrappling();
279 
283 
284  virtual void addCounterableMove(Warrior* attacker_, SPECIAL_MOVE move_) {
285  _counterableMoves.insert(CounterableMove(attacker_, move_));
286  }
287 
288  virtual bool canCounter(Warrior* attacker_, SPECIAL_MOVE move_) const {
289  CounterableMove counterableMove(attacker_, move_);
290  std::set<CounterableMove>::const_iterator i = _counterableMoves.find(counterableMove);
291  if (i != _counterableMoves.end() && attacker_->getSpecialMoveJustPerformed() == move_)
292  return true;
293  return false;
294  }
296 
297  inline bool isAlive() const { return !_isDead; }
298  void setDead();
299 
300  inline const std::vector<AttackRange*>& getAttackRanges() const { return _attackRanges; }
301  virtual const AttackRange* getAttackRange(SPECIAL_MOVE specialMove_) const;
302 
303  inline void addEvocationObject(EvocationObject* evoObj_) { _evocationObjects.push_back(evoObj_); }
304  inline std::vector<EvocationObject*>& getEvocationObjects() { return _evocationObjects; }
305 
308  virtual void getPointInSpread(float spread_, OpenSkyNet::Math::Point<float, 2>& p_);
310  virtual void getAim(float spread_, OpenSkyNet::Math::Point<>& origin_, OpenSkyNet::Math::Point<>& dir_);
311 
312  float getDist(const Warrior* warrior_) const;
314 
315  virtual bool doPerformAction(const Action* action_, bool& doDelay_, bool& doSubstitute_, Action*& substitute_);
316 
319  virtual void onPrePerformAnyAction(const std::vector<Warrior*>& warriors_);
320  virtual void onPostPerformAction(const Action* action_);
321  virtual void onMove() {}
322  virtual void onHipFire(OpenSkyNet::Core::Object* intendedTarget_, Action* action_) {}
323  virtual void onIronSightsFire(OpenSkyNet::Core::Object* intendedTarget_, Action* action_) {}
324  virtual void onEvocation() {}
325  virtual bool onAttack(std::vector<OpenSkyNet::Utils::TaggedUnion>& eventParams_) { return false; }
326  virtual void onDefend() {}
327  virtual void onAttacked(const std::vector<OpenSkyNet::Utils::TaggedUnion>& eventParams_) {}
328  virtual void onDefended();
329  virtual void onRoundEnd();
331 
332  void snapToGrid();
333 
337  static const volatile bool* _quit;
338 
340  static bool _isSmokeTest;
341 
342  static inline void setEvent(OpenSkyNet::Utils::SyncEvent& event_, bool ignoreIfQuitting_) {
343  if (ignoreIfQuitting_ && _quit && *_quit) return;
344  event_.set();
345  }
346  static inline void waitForEvent(OpenSkyNet::Utils::SyncEvent& event_, bool ignoreIfQuitting_) {
347  if (ignoreIfQuitting_ && _quit && *_quit) return;
348  event_.wait();
349  }
350 
352  static inline void setPerformEvent(bool ignoreIfQuitting_) {
353  setEvent(_performEvent,ignoreIfQuitting_);
354  }
355  static inline void waitForPerformEvent(bool ignoreIfQuitting_) {
356  waitForEvent(_performEvent,ignoreIfQuitting_);
357  }
358 
359  #define OVERRIDE_GROUNDED (1 << 0) // rendering thread -> game thread
360  #define OVERRIDE_DEAD (1 << 1) // rendering thread -> game thread
361  #define OVERRIDE_EVOCATION (1 << 2) // game thread -> rendering thread
362 
370  struct Override {
371  public:
372  int _flags;
374  std::string _name;
375  Override() : _flags(0), _isGrounded(false), _isDead(false) {}
376  } _override;
378 
382 
385  static OpenSkyNet::Utils::uint serializeAttributes(const Warrior* warrior_, char (&buffer_)[MAX_STRING_SIZE]);
386  static void assembleAttributes(char (&buffer_)[MAX_STRING_SIZE], std::vector<OpenSkyNet::Utils::TaggedUnion>& eventParams_);
387 
390  static OpenSkyNet::Utils::uint serializeActions(const Warrior* warrior_, char (&buffer_)[MAX_STRING_SIZE]);
391  static void assembleActions(char (&buffer_)[MAX_STRING_SIZE], const std::vector<Warrior*>& warriors_, OpenSkyNet::Utils::uint warriorIndex_, std::list<Action*>& actions_);
392 
393  #define MOVE_UPDATE_FINAL (1 << 0)
394 
397  static OpenSkyNet::Utils::uint serializeMoveUpdate(const Warrior* warrior_, int flags_, char (&buffer_)[MAX_STRING_SIZE]);
398  static void assembleMoveUpdate(char (&buffer_)[MAX_STRING_SIZE], OpenSkyNet::Utils::uint warriorIndex_, int& flags_, OpenSkyNet::Math::Point<>& pos_, OpenSkyNet::Math::Point<>& axis_, float& radians_);
399 
402  static OpenSkyNet::Utils::uint serializeAttack(const std::vector<OpenSkyNet::Utils::TaggedUnion>& eventParams_, char (&buffer_)[MAX_STRING_SIZE]);
403  static void assembleAttack(char (&buffer_)[MAX_STRING_SIZE], std::vector<OpenSkyNet::Utils::TaggedUnion>& eventParams_);
405  };
406 }
407 
408 #endif //TACTICS3DWARRIOR_H
int _uses
Definition: Tactics3DWarrior.h:52
const std::list< Tactics3D::Action * > * getActions() const
Definition: Tactics3DWarrior.h:260
std::list< ICollectible * > _inventory
Definition: Tactics3DWarrior.h:98
void setSpeed(int speed_)
Definition: Tactics3DWarrior.h:241
static void assembleActions(char(&buffer_)[MAX_STRING_SIZE], const std::vector< Warrior * > &warriors_, OpenSkyNet::Utils::uint warriorIndex_, std::list< Action * > &actions_)
Definition: Tactics3DNetwork.cpp:260
virtual bool getHasPosChanged() const
Definition: CPhysVisObject.h:46
Definition: CVisibleObject.h:28
SPECIAL_MOVE
Definition: Tactics3DFightingStyle.h:37
virtual void setVel(const Math::Point<> &vel_)
Definition: CPhysVisObject.h:57
virtual void handleNonCollidingTransformApplied(OpenSkyNet::Core::Object *obj_)
Definition: Tactics3DWarrior.cpp:137
Definition: CPhysVisObject.h:30
Ogre::SceneNode * getRenderNode()
Definition: Tactics3DWarrior.h:159
void set()
Definition: UThread.h:87
Warrior(OpenSkyNet::Utils::uint networkId_, OpenSkyNet::Core::PhysVisObject *pVO_, int gp_, int lvl_, int dex_, int str_, int end_, TEAM team_)
Definition: Tactics3DWarrior.cpp:21
virtual void onPrePerformAnyAction(const std::vector< Warrior * > &warriors_)
Definition: Tactics3DWarrior.cpp:551
Definition: Tactics3DAction.h:40
int _initOD
Definition: Tactics3DWarrior.h:82
Definition: Tactics3DFightingStyle.h:44
struct Tactics3D::Warrior::Override _override
virtual void onDefended()
Definition: Tactics3DWarrior.cpp:578
Definition: CPhysicalObject.h:33
FIGHTING_STYLE
Definition: Tactics3DFightingStyle.h:41
virtual OpenSkyNet::Core::PhysicalObject * getPhysicalObject()
Definition: Tactics3DWarrior.h:129
virtual void onAttacked(const std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
Definition: Tactics3DWarrior.h:327
int _flags
Definition: Tactics3DWarrior.h:85
int getOO(FIGHTING_STYLE style_=HIGHEST_OO) const
Definition: Tactics3DWarrior.h:229
virtual void onMove()
Definition: Tactics3DWarrior.h:321
virtual bool updateContinuousAction(Tactics3D::Action *&action_)
Definition: Tactics3DWarrior.cpp:281
FightingStyleContext(int rank_, int oO_, int oD_)
Definition: Tactics3DWarrior.h:48
static OpenSkyNet::Utils::uint getAttributesBufferLen()
Definition: Tactics3DNetwork.cpp:50
static const OpenSkyNet::Utils::uint MAX_FIGHTING_STYLES
Definition: Tactics3DWarrior.h:59
static OpenSkyNet::Utils::SyncEvent _performEvent
Definition: Tactics3DWarrior.h:100
virtual ~Warrior()
Definition: Tactics3DWarrior.cpp:49
void takeDamage(int dmg_)
Definition: Tactics3DWarrior.cpp:324
int _speed
Definition: Tactics3DWarrior.h:84
virtual int getInitStr() const
Definition: Tactics3DWarrior.h:218
SuperPowerContext()
Definition: Tactics3DWarrior.h:55
void clearActions()
Definition: Tactics3DWarrior.h:257
virtual OpenSkyNet::Math::Point getAngVel() const
Definition: Tactics3DWarrior.cpp:124
int getLvl() const
Definition: Tactics3DWarrior.h:210
Definition: Tactics3DInventory.h:50
virtual void setActions()
Definition: Tactics3DWarrior.h:255
void addFightingStyle(FIGHTING_STYLE style_, int rank_)
Definition: Tactics3DWarrior.cpp:168
float _movementLeftInAction
Definition: Tactics3DWarrior.h:92
std::map< FIGHTING_STYLE, FightingStyleContext > FightingStyleContextMap
Definition: Tactics3DWarrior.h:68
Definition: Tactics3DWarrior.h:370
bool isAlive() const
Definition: Tactics3DWarrior.h:297
static OpenSkyNet::Utils::uint serializeActions(const Warrior *warrior_, char(&buffer_)[MAX_STRING_SIZE])
Definition: Tactics3DNetwork.cpp:117
const FightingStyleContextMap & getFightingStyleContexts() const
Definition: Tactics3DWarrior.h:182
void snapToGrid()
Definition: Tactics3DWarrior.cpp:612
virtual Math::Point getPos() const
Definition: CPhysVisObject.h:43
virtual void setInitStr(int str_)
Definition: Tactics3DWarrior.h:220
SuperPower::Warriors _targets
Definition: Tactics3DWarrior.h:54
virtual void setRot(const Math::Matrix3x3 &rot_)
Definition: CPhysVisObject.h:51
Ogre::Entity * getEntity()
Definition: Tactics3DWarrior.h:168
virtual const IWeapon * getPrimaryWeapon() const
Definition: Tactics3DWarrior.cpp:219
Definition: Tactics3DWarrior.h:42
SPECIAL_MOVE getSpecialMoveJustPerformed() const
Definition: Tactics3DWarrior.h:282
int _oO
Definition: Tactics3DWarrior.h:82
virtual const OpenSkyNet::Core::VisibleObject * getVisibleObject() const
Definition: Tactics3DWarrior.h:130
int _gp
Definition: Tactics3DWarrior.h:79
int _prevOD
Definition: Tactics3DWarrior.h:82
virtual void setVisible(bool val_)
Definition: CVisibleObject.h:33
void clearFightingStyles()
Definition: Tactics3DWarrior.cpp:161
std::vector< Warrior * > Warriors
Definition: Tactics3DSuperPower.h:43
virtual void setVel(const OpenSkyNet::Math::Point<> &vel_)
Definition: Tactics3DWarrior.h:123
static OpenSkyNet::Utils::uint getMoveUpdateBufferLen()
Definition: Tactics3DNetwork.cpp:433
bool _isTurn
Definition: Tactics3DWarrior.h:89
virtual void setInitDex(int dex_)
Definition: Tactics3DWarrior.h:215
Definition: Tactics3DWarrior.h:72
SPECIAL_MOVE _specialMoveJustPerformed
Definition: Tactics3DWarrior.h:90
virtual int getStr() const
Definition: Tactics3DWarrior.h:217
void setDead()
Definition: Tactics3DWarrior.cpp:451
virtual const VisibleObject * getVisibleObject() const
Definition: CPhysVisObject.h:61
void wait()
Definition: UThread.h:98
void clearSuperPowers()
Definition: Tactics3DWarrior.h:187
OpenSkyNet::Utils::uint _networkId
Definition: Tactics3DWarrior.h:76
virtual const AttackRange * getAttackRange(SPECIAL_MOVE specialMove_) const
Definition: Tactics3DWarrior.cpp:469
static OpenSkyNet::Utils::uint getActionsBufferLen()
Definition: Tactics3DNetwork.cpp:112
virtual void setInitEnd(int end_)
Definition: Tactics3DWarrior.h:225
static void setPerformEvent(bool ignoreIfQuitting_)
Definition: Tactics3DWarrior.h:352
std::map< SUPER_POWER, SuperPowerContext > SuperPowerContextMap
Definition: Tactics3DWarrior.h:69
virtual void setHasRotChanged(bool val_)
Definition: CPhysVisObject.h:53
virtual std::list< ICollectible * > & getInventory()
Definition: Tactics3DWarrior.h:198
virtual void getPos(OpenSkyNet::Math::Point<> &pos_) const
Definition: Tactics3DWarrior.h:110
#define MAX_STRING_SIZE
Definition: UTypes.h:33
static const OpenSkyNet::Utils::uint MAX_ACTIONS
Definition: Tactics3DWarrior.h:61
bool _isDead
Definition: Tactics3DWarrior.h:89
Definition: Tactics3DFightingStyle.h:42
std::list< Action * > _actions
Definition: Tactics3DWarrior.h:95
Definition: Tactics3DEvocationObject.h:31
std::list< Tactics3D::Action * > * getActions()
Definition: Tactics3DWarrior.h:259
static void waitForPerformEvent(bool ignoreIfQuitting_)
Definition: Tactics3DWarrior.h:355
TEAM _team
Definition: Tactics3DWarrior.h:81
OpenSkyNet::Math::Point< float, 2 > _cachedPointInSpread
Definition: Tactics3DWarrior.h:97
virtual int getInitEnd() const
Definition: Tactics3DWarrior.h:223
int getDmgAdj() const
Definition: Tactics3DWarrior.h:238
virtual void onIronSightsFire(OpenSkyNet::Core::Object *intendedTarget_, Action *action_)
Definition: Tactics3DWarrior.h:323
FightingStyleContext()
Definition: Tactics3DWarrior.h:47
virtual void setIsTurn(bool isTurn_)
Definition: Tactics3DWarrior.cpp:350
virtual bool doPerformAction(const Action *action_, bool &doDelay_, bool &doSubstitute_, Action *&substitute_)
Definition: Tactics3DWarrior.cpp:515
int getSpeed() const
Definition: Tactics3DWarrior.h:240
std::string _name
Definition: Tactics3DWarrior.h:374
Definition: Tactics3DWarrior.h:72
std::vector< EvocationObject * > _evocationObjects
Definition: Tactics3DWarrior.h:94
Definition: OgreVisibleObject.h:33
const OpenSkyNet::OgreCore::OgreVisibleObject * getOgreVisibleObject() const
Definition: Tactics3DWarrior.h:152
float getDist(const Warrior *warrior_) const
Definition: Tactics3DWarrior.cpp:505
std::vector< AttackRange * > _attackRanges
Definition: Tactics3DWarrior.h:93
virtual void setHasPosChanged(bool val_)
Definition: CPhysVisObject.h:47
const Ogre::SceneNode * getRenderNode() const
Definition: OgreVisibleObject.h:59
void setGrounded(bool isGrounded_)
Definition: Tactics3DWarrior.cpp:359
virtual bool getHasRotChanged() const
Definition: CPhysVisObject.h:52
virtual void handleNewAttackRangeCollisions(AttackRange *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
Definition: Tactics3DWarrior.h:144
Definition: Tactics3DWarrior.h:45
virtual void onPostPerformAction(const Action *action_)
Definition: Tactics3DWarrior.cpp:568
virtual void setHasPosChanged(bool val_)
Definition: Tactics3DWarrior.h:113
int _numRoundEndEventsSinceTempOD
Definition: Tactics3DWarrior.h:86
virtual OpenSkyNet::Math::Point getVel() const
Definition: Tactics3DWarrior.cpp:111
Definition: Tactics3DWarrior.h:51
virtual int getEnd() const
Definition: Tactics3DWarrior.h:222
int _rank
Definition: Tactics3DWarrior.h:46
int _lvl
Definition: Tactics3DWarrior.h:79
Definition: Tactics3DAttackRange.h:33
TEAM getTeam() const
Definition: Tactics3DWarrior.h:227
bool _isGrappling
Definition: Tactics3DWarrior.h:89
bool _isDead
Definition: Tactics3DWarrior.h:373
bool isSuperPowerActive(SUPER_POWER power_)
Definition: Tactics3DWarrior.cpp:210
const SuperPowerContextMap & getSuperPowerContexts() const
Definition: Tactics3DWarrior.h:189
std::vector< EvocationObject * > & getEvocationObjects()
Definition: Tactics3DWarrior.h:304
virtual void getRot(OpenSkyNet::Math::Matrix3x3 &rot_) const
Definition: Tactics3DWarrior.h:116
virtual void getPointInSpread(float spread_, OpenSkyNet::Math::Point< float, 2 > &p_)
Definition: Tactics3DWarrior.cpp:484
virtual void setNonCollidingData(Object *obj_)
Definition: CPhysVisObject.h:67
virtual const std::list< ICollectible * > & getInventory() const
Definition: Tactics3DWarrior.h:197
unsigned int uint
Definition: UTypes.h:39
int _initStr
Definition: Tactics3DWarrior.h:80
virtual void onEvocation()
Definition: Tactics3DWarrior.h:324
static void setEvent(OpenSkyNet::Utils::SyncEvent &event_, bool ignoreIfQuitting_)
Definition: Tactics3DWarrior.h:342
Definition: UThread.h:68
static void waitForEvent(OpenSkyNet::Utils::SyncEvent &event_, bool ignoreIfQuitting_)
Definition: Tactics3DWarrior.h:346
Override()
Definition: Tactics3DWarrior.h:375
int getOD() const
Definition: Tactics3DWarrior.h:235
virtual void getAim(float spread_, OpenSkyNet::Math::Point<> &origin_, OpenSkyNet::Math::Point<> &dir_)
Definition: Tactics3DWarrior.cpp:489
int _oD
Definition: Tactics3DWarrior.h:46
virtual void setDex(int dex_)
Definition: Tactics3DWarrior.cpp:248
SUPER_POWER
Definition: Tactics3DSuperPower.h:35
virtual void handleDeletedAttackRangeCollisions(AttackRange *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
Definition: Tactics3DWarrior.h:145
virtual Math::Matrix3x3 getRot() const
Definition: CPhysVisObject.h:49
float _distMovedLastPosSet
Definition: Tactics3DWarrior.h:92
int _initEnd
Definition: Tactics3DWarrior.h:80
static const OpenSkyNet::Utils::uint MAX_SUPER_POWERS
Definition: Tactics3DWarrior.h:60
Definition: MPoint.h:33
virtual void setRot(const OpenSkyNet::Math::Matrix3x3 &rot_)
Definition: Tactics3DWarrior.h:117
static OpenSkyNet::Utils::uint getAttackBufferLen()
Definition: Tactics3DNetwork.cpp:491
void setTempOD(int oD_)
Definition: Tactics3DWarrior.cpp:262
bool isGrounded() const
Definition: Tactics3DWarrior.h:272
Definition: IObject.h:36
virtual const OpenSkyNet::Core::PhysicalObject * getPhysicalObject() const
Definition: Tactics3DWarrior.h:128
Definition: IObject.h:75
virtual OpenSkyNet::Math::Matrix3x3 getRot() const
Definition: Tactics3DWarrior.h:115
int _oO
Definition: Tactics3DWarrior.h:46
virtual OpenSkyNet::Core::VisibleObject * getVisibleObject()
Definition: Tactics3DWarrior.h:131
void addSuperPower(SUPER_POWER power_)
Definition: Tactics3DWarrior.cpp:180
virtual bool handleCollisions(OpenSkyNet::Core::Object *collidee_, std::vector< OpenSkyNet::CD::HitInfo > &colliders_, float &dt_)
Definition: Tactics3DWarrior.cpp:151
TEAM
Definition: Tactics3DWarrior.h:72
virtual const PhysicalObject * getPhysicalObject() const
Definition: CPhysVisObject.h:59
int _roundsRemaining
Definition: Tactics3DWarrior.h:53
SuperPowerContextMap _superPowerContexts
Definition: Tactics3DWarrior.h:88
OpenSkyNet::Core::PhysVisObject * _pVO
Definition: Tactics3DWarrior.h:77
virtual bool grapple(Warrior *otherGrappler_)
Definition: Tactics3DWarrior.cpp:387
static OpenSkyNet::Utils::uint serializeAttack(const std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_, char(&buffer_)[MAX_STRING_SIZE])
Definition: Tactics3DNetwork.cpp:496
bool isMovementEnabled() const
Definition: Tactics3DWarrior.h:246
virtual void setStr(int str_)
Definition: Tactics3DWarrior.cpp:242
bool _isGrounded
Definition: Tactics3DWarrior.h:373
int _dex
Definition: Tactics3DWarrior.h:80
static const volatile bool * _quit
Definition: Tactics3DWarrior.h:337
const std::vector< AttackRange * > & getAttackRanges() const
Definition: Tactics3DWarrior.h:300
#define WARRIOR_MOVEMENT_DISABLED
Definition: Tactics3DWarrior.h:74
int _dmgAdj
Definition: Tactics3DWarrior.h:83
float getMovementLeftInAction() const
Definition: Tactics3DWarrior.h:243
virtual bool getHasRotChanged() const
Definition: Tactics3DWarrior.h:118
virtual int getInitDex() const
Definition: Tactics3DWarrior.h:213
virtual const std::string & getName() const
Definition: IObject.h:104
static OpenSkyNet::Utils::uint serializeMoveUpdate(const Warrior *warrior_, int flags_, char(&buffer_)[MAX_STRING_SIZE])
Definition: Tactics3DNetwork.cpp:438
static void assembleAttributes(char(&buffer_)[MAX_STRING_SIZE], std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
Definition: Tactics3DNetwork.cpp:83
Definition: ICollisionListener.h:34
virtual void setNonCollidingData(OpenSkyNet::Core::Object *obj_)
Definition: Tactics3DWarrior.h:136
virtual void onHipFire(OpenSkyNet::Core::Object *intendedTarget_, Action *action_)
Definition: Tactics3DWarrior.h:322
virtual bool stopGrappling()
Definition: Tactics3DWarrior.cpp:416
int _str
Definition: Tactics3DWarrior.h:80
Definition: MMatrix3x3.h:32
virtual bool getHasPosChanged() const
Definition: Tactics3DWarrior.h:112
bool _isGrounded
Definition: Tactics3DWarrior.h:89
virtual void setHasRotChanged(bool val_)
Definition: Tactics3DWarrior.h:119
bool isGrappling() const
Definition: Tactics3DWarrior.h:275
virtual bool canAddAction(const Tactics3D::Action *action_) const
Definition: Tactics3DWarrior.cpp:268
static void assembleAttack(char(&buffer_)[MAX_STRING_SIZE], std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
Definition: Tactics3DNetwork.cpp:520
virtual void setPrimaryWeapon(IWeapon *weapon_)
Definition: Tactics3DWarrior.cpp:237
int _flags
Definition: Tactics3DWarrior.h:372
void addEvocationObject(EvocationObject *evoObj_)
Definition: Tactics3DWarrior.h:303
OpenSkyNet::Math::Point _prevPos
Definition: Tactics3DWarrior.h:78
SuperPowerContext(int maxUses_)
Definition: Tactics3DWarrior.h:56
int _oD
Definition: Tactics3DWarrior.h:82
OpenSkyNet::OgreCore::OgreVisibleObject * getOgreVisibleObject()
Definition: Tactics3DWarrior.h:155
float float rot_[3]
Definition: ViewerApp.h:31
Warrior * _otherGrappler
Definition: Tactics3DWarrior.h:96
virtual void setEnd(int end_)
Definition: Tactics3DWarrior.cpp:258
virtual void onDefend()
Definition: Tactics3DWarrior.h:326
Warrior * getOtherGrappler() const
Definition: Tactics3DWarrior.h:276
virtual bool setSuperPowerActive(SUPER_POWER power_, const SuperPower::Warriors &targets_)
Definition: Tactics3DWarrior.cpp:187
virtual void setPos(const OpenSkyNet::Math::Point<> &pos_)
Definition: Tactics3DWarrior.cpp:71
static OpenSkyNet::Utils::uint serializeAttributes(const Warrior *warrior_, char(&buffer_)[MAX_STRING_SIZE])
Definition: Tactics3DNetwork.cpp:55
OpenSkyNet::Utils::uint getNetworkId() const
Definition: Tactics3DWarrior.h:381
virtual bool canCounter(Warrior *attacker_, SPECIAL_MOVE move_) const
Definition: Tactics3DWarrior.h:288
std::set< CounterableMove > _counterableMoves
Definition: Tactics3DWarrior.h:91
const OpenSkyNet::Math::Point< float, 2 > & getCachedPointInSpread()
Definition: Tactics3DWarrior.h:309
int getInitOD() const
Definition: Tactics3DWarrior.h:236
virtual bool onAttack(std::vector< OpenSkyNet::Utils::TaggedUnion > &eventParams_)
Definition: Tactics3DWarrior.h:325
void disableMovement()
Definition: Tactics3DWarrior.h:244
static void assembleMoveUpdate(char(&buffer_)[MAX_STRING_SIZE], OpenSkyNet::Utils::uint warriorIndex_, int &flags_, OpenSkyNet::Math::Point<> &pos_, OpenSkyNet::Math::Point<> &axis_, float &radians_)
Definition: Tactics3DNetwork.cpp:466
Definition: Tactics3DWarrior.h:72
virtual OpenSkyNet::Math::Point getPos() const
Definition: Tactics3DWarrior.h:109
static bool _isSmokeTest
Definition: Tactics3DWarrior.h:340
int _initDex
Definition: Tactics3DWarrior.h:80
int _end
Definition: Tactics3DWarrior.h:80
virtual bool handleOutOfGrid(OpenSkyNet::Core::Object *obj_)
Definition: Tactics3DWarrior.cpp:155
virtual void addCounterableMove(Warrior *attacker_, SPECIAL_MOVE move_)
Definition: Tactics3DWarrior.h:284
float pos_[3]
Definition: ViewerApp.h:31
virtual void onRoundEnd()
Definition: Tactics3DWarrior.cpp:582
int getGP() const
Definition: Tactics3DWarrior.h:208
Definition: Tactics3DWarrior.h:72
void enableMovement()
Definition: Tactics3DWarrior.h:245
FightingStyleContextMap _fightingStyleContexts
Definition: Tactics3DWarrior.h:87
virtual int getDex() const
Definition: Tactics3DWarrior.h:212
virtual void setVisible(bool val_)
Definition: Tactics3DWarrior.h:150