Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/AI/ActionInterface/Headers/AITeam.h

Diff revisions: vs.
  @@ -48,18 +48,19 @@
48 48 bool _locked;
49 49 };
50 50
51 - class AITeam : public GUIDWrapper{
51 + class AITeam : public GUIDWrapper {
52 52 public:
53 53
54 54 public:
55 - typedef hashMapImpl<AIEntity::PresetAgentRadius, Navigation::DivideDtCrowd*, hashAlg::hash<I32> > AITeamCrowd;
55 + typedef Navigation::DivideDtCrowd* CrowdPtr;
56 + typedef hashMapImpl<AIEntity::PresetAgentRadius, CrowdPtr, hashAlg::hash<I32> > AITeamCrowd;
56 57 typedef hashMapImpl<AIEntity*, F32 > MemberVariable;
57 58 typedef hashMapImpl<I64, AIEntity*> TeamMap;
58 59
59 60 AITeam(U32 id);
60 61 ~AITeam();
61 62
62 - inline Navigation::DivideDtCrowd* const getCrowd(AIEntity::PresetAgentRadius radius) const {
63 + inline CrowdPtr const getCrowd(AIEntity::PresetAgentRadius radius) const {
63 64 ReadLock r_lock(_crowdMutex);
64 65 AITeamCrowd::const_iterator it = _aiTeamCrowd.find(radius);
65 66 if (it != _aiTeamCrowd.end()) {
  @@ -121,18 +122,22 @@
121 122 void removeCrowd(AIEntity::PresetAgentRadius radius);
122 123
123 124 protected:
125 +
124 126 inline vectorImpl<Order* >::iterator findOrder(Order* const order) {
125 127 assert(order != nullptr);
126 128 U32 orderId = order->getId();
127 - return vectorAlg::find_if( _orders.begin(), _orders.end(), [&orderId]( Order* const order )->bool {
128 - return orderId == order->getId();
129 - });
129 + return vectorAlg::find_if(_orders.begin(), _orders.end(),
130 + [&orderId]( Order* const order )->bool {
131 + return orderId == order->getId();
132 + });
130 133 }
134 +
131 135 inline vectorImpl<U32 >::iterator AITeam::findEnemyTeamEntry(U32 enemyTeamID) {
132 136 ReadLock r_lock(_enemyTeamLock);
133 - return vectorAlg::find_if( _enemyTeams.begin(), _enemyTeams.end(), [&enemyTeamID]( U32 id )->bool {
134 - return id == enemyTeamID;
135 - });
137 + return vectorAlg::find_if(_enemyTeams.begin(), _enemyTeams.end(),
138 + [&enemyTeamID]( U32 id )->bool {
139 + return id == enemyTeamID;
140 + });
136 141 }
137 142
138 143 protected: