Added userData pointer for dtCrowdAgent.

This commit is contained in:
Mikko Mononen 2011-02-06 13:13:42 +00:00
parent 5b4f8b6047
commit 496ee57897
3 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ struct dtCrowdAgentParams
float separationWeight; float separationWeight;
unsigned char updateFlags; unsigned char updateFlags;
unsigned char obstacleAvoidanceType; unsigned char obstacleAvoidanceType;
void* userData;
}; };
struct dtCrowdAgent struct dtCrowdAgent

View File

@ -325,6 +325,7 @@ void CrowdTool::handleClick(const float* s, const float* p, bool shift)
{ {
// Add // Add
dtCrowdAgentParams ap; dtCrowdAgentParams ap;
memset(&ap, 0, sizeof(ap));
ap.radius = m_sample->getAgentRadius(); ap.radius = m_sample->getAgentRadius();
ap.height = m_sample->getAgentHeight(); ap.height = m_sample->getAgentHeight();
ap.maxAcceleration = 8.0f; ap.maxAcceleration = 8.0f;