|
|
@@ -431,7 +431,7 @@ void HandleCrowdAgentFailure(StringHash eventType, VariantMap& eventData)
|
|
|
int state = eventData["CrowdAgentState"].GetInt();
|
|
|
|
|
|
// If the agent's state is invalid, likely from spawning on the side of a box, find a point in a larger area
|
|
|
- if (state == CrowdAgentState::CA_STATE_INVALID)
|
|
|
+ if (state == CA_STATE_INVALID)
|
|
|
{
|
|
|
// Get a point on the navmesh using more generous extents
|
|
|
Vector3 newPos = cast<DynamicNavigationMesh>(scene_.GetComponent("DynamicNavigationMesh")).FindNearestPoint(node.position, Vector3(5.0f,5.0f,5.0f));
|