Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 336 vs 337 for /trunk/Source Code/Managers/AIManager.cpp

Diff revisions: vs.
  @@ -28,14 +28,14 @@
28 28 void AIManager::Destroy() {
29 29 {
30 30 WriteLock w_lock(_updateMutex);
31 - for (AITeamMap::value_type& entity : _aiTeams) {
31 + for (AITeamMap::value_type& entity : _aiTeams) {
32 32 MemoryManager::DELETE( entity.second );
33 33 }
34 34 _aiTeams.clear();
35 35 }
36 36 {
37 37 WriteLock w_lock(_navMeshMutex);
38 - for (NavMeshMap::value_type& it : _navMeshes) {
38 + for (NavMeshMap::value_type& it : _navMeshes) {
39 39 MemoryManager::DELETE( it.second );
40 40 }
41 41 _navMeshes.clear();
  @@ -51,9 +51,9 @@
51 51 _previousTime = _currentTime;
52 52 _currentTime = GETUSTIME();
53 53 _deltaTime = _currentTime - _previousTime;
54 - if (_aiTeams.empty() || _pauseUpdate) {
55 - return; //nothing to do
56 - }
54 + if (_aiTeams.empty() || _pauseUpdate) {
55 + return; //nothing to do
56 + }
57 57 _updating = true;
58 58 if (_sceneCallback) {
59 59 _sceneCallback();
  @@ -69,28 +69,28 @@
69 69
70 70 void AIManager::signalInit() {
71 71 ReadLock r_lock(_updateMutex);
72 - for (AITeamMap::value_type& team : _aiTeams) {
72 + for (AITeamMap::value_type& team : _aiTeams) {
73 73 team.second->init();
74 74 }
75 75 }
76 76
77 77 void AIManager::processInput(const U64 deltaTime) { //sensors
78 78 ReadLock r_lock(_updateMutex);
79 - for (AITeamMap::value_type& team : _aiTeams) {
79 + for (AITeamMap::value_type& team : _aiTeams) {
80 80 team.second->processInput( deltaTime );
81 81 }
82 82 }
83 83
84 84 void AIManager::processData(const U64 deltaTime) { //think
85 85 ReadLock r_lock(_updateMutex);
86 - for (AITeamMap::value_type& team : _aiTeams) {
86 + for (AITeamMap::value_type& team : _aiTeams) {
87 87 team.second->processData( deltaTime );
88 88 }
89 89 }
90 90
91 91 void AIManager::updateEntities(const U64 deltaTime){//react
92 92 ReadLock r_lock(_updateMutex);
93 - for (AITeamMap::value_type& team : _aiTeams) {
93 + for (AITeamMap::value_type& team : _aiTeams) {
94 94 team.second->update( deltaTime );
95 95 }
96 96 }
  @@ -104,7 +104,7 @@
104 104 }
105 105
106 106 void AIManager::unregisterEntity(AIEntity* entity) {
107 - for (AITeamMap::value_type& team : _aiTeams) {
107 + for (AITeamMap::value_type& team : _aiTeams) {
108 108 unregisterEntity( team.second->getTeamID(), entity );
109 109 }
110 110 }
  @@ -127,7 +127,7 @@
127 127 w_lock.unlock();
128 128
129 129 WriteLock w_lock2(_updateMutex);
130 - for (AITeamMap::value_type& team : _aiTeams) {
130 + for (AITeamMap::value_type& team : _aiTeams) {
131 131 team.second->addCrowd( radius, navMesh );
132 132 }
133 133
  @@ -143,7 +143,7 @@
143 143 w_lock.unlock();
144 144
145 145 WriteLock w_lock2(_updateMutex);
146 - for (AITeamMap::value_type& team : _aiTeams) {
146 + for (AITeamMap::value_type& team : _aiTeams) {
147 147 team.second->removeCrowd( radius );
148 148 }
149 149 }
  @@ -166,7 +166,7 @@
166 166
167 167 void AIManager::toggleNavMeshDebugDraw(bool state) {
168 168 WriteLock w_lock(_navMeshMutex);
169 - for (NavMeshMap::value_type& it : _navMeshes) {
169 + for (NavMeshMap::value_type& it : _navMeshes) {
170 170 it.second->debugDraw( state );
171 171 }
172 172
  @@ -175,7 +175,7 @@
175 175
176 176 void AIManager::debugDraw(bool forceAll) {
177 177 WriteLock w_lock(_navMeshMutex);
178 - for (NavMeshMap::value_type& it : _navMeshes) {
178 + for (NavMeshMap::value_type& it : _navMeshes) {
179 179 it.second->update( _deltaTime );
180 180 if ( forceAll || it.second->debugDraw() ) {
181 181 it.second->render();