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/PathFinding/DivideCrowd.cpp

Diff revisions: vs.
  @@ -47,7 +47,8 @@
47 47 crowd->init(MAX_AGENTS, navMesh->getConfigParams().getAgentRadius(), nav);
48 48 // Make polygons with 'disabled' flag invalid.
49 49 crowd->getEditableFilter(0)->setExcludeFlags(SAMPLE_POLYFLAGS_DISABLED);
50 - // Create different avoidance settings presets. The crowd object can store multiple, identified by an index number.
50 + // Create different avoidance settings presets. The crowd object can store multiple,
51 + // identified by an index number.
51 52 // Setup local avoidance params to different qualities.
52 53 dtObstacleAvoidanceParams params;
53 54 // Use mostly default settings, copy from dtCrowd.
  @@ -131,7 +132,8 @@
131 132 I32 idx = _crowd->addAgent(p, &ap);
132 133 if (idx != -1) {
133 134 // If a move target is defined: move agent towards it
134 - // TODO do we want to set newly added agent's destination to previously set target? or remove this behaviour?
135 + // TODO: do we want to set newly added agent's destination to previously set target?
136 + // or remove this behaviour?
135 137 if (_targetRef)
136 138 _crowd->requestMoveTarget(idx, _targetRef, _targetPos);
137 139
  @@ -147,11 +149,11 @@
147 149 }
148 150
149 151 vectorImpl<dtCrowdAgent*> DivideDtCrowd::getActiveAgents() {
150 - dtCrowdAgent** resultEntries = New dtCrowdAgent*[getMaxNbAgents()];
152 + dtCrowdAgent** resultEntries = MemoryManager_NEW dtCrowdAgent*[getMaxNbAgents()];
151 153 I32 size = _crowd->getActiveAgents(resultEntries,getMaxNbAgents());
152 154
153 155 vectorImpl<dtCrowdAgent*> result(resultEntries, resultEntries + size);
154 - MemoryManager::SAFE_DELETE_ARRAY( resultEntries );
156 + MemoryManager::DELETE_ARRAY( resultEntries );
155 157 return result;
156 158 }
157 159