forked from bit/DotRecastNetSim
remove Tuple<int, Vector3f>
This commit is contained in:
parent
bf07c8f3ff
commit
ba89398253
|
@ -1183,10 +1183,8 @@ namespace DotRecast.Detour.Crowd
|
|||
|
||||
if (adaptive)
|
||||
{
|
||||
var nsnvel = _obstacleQuery.SampleVelocityAdaptive(ag.npos, ag.option.radius,
|
||||
ag.desiredSpeed, ag.vel, ag.dvel, option, vod);
|
||||
ns = nsnvel.Item1;
|
||||
ag.nvel = nsnvel.Item2;
|
||||
ns = _obstacleQuery.SampleVelocityAdaptive(ag.npos, ag.option.radius, ag.desiredSpeed,
|
||||
ag.vel, ag.dvel, out ag.nvel, option, vod);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -383,8 +383,9 @@ namespace DotRecast.Detour.Crowd
|
|||
|
||||
static readonly float DT_PI = 3.14159265f;
|
||||
|
||||
public Tuple<int, Vector3f> SampleVelocityAdaptive(Vector3f pos, float rad, float vmax, Vector3f vel,
|
||||
Vector3f dvel, ObstacleAvoidanceParams option, ObstacleAvoidanceDebugData debug)
|
||||
public int SampleVelocityAdaptive(Vector3f pos, float rad, float vmax, Vector3f vel, Vector3f dvel, out Vector3f nvel,
|
||||
ObstacleAvoidanceParams option,
|
||||
ObstacleAvoidanceDebugData debug)
|
||||
{
|
||||
Prepare(pos, dvel);
|
||||
m_params = option;
|
||||
|
@ -392,7 +393,7 @@ namespace DotRecast.Detour.Crowd
|
|||
m_vmax = vmax;
|
||||
m_invVmax = vmax > 0 ? 1.0f / vmax : float.MaxValue;
|
||||
|
||||
Vector3f nvel = Vector3f.Zero;
|
||||
nvel = Vector3f.Zero;
|
||||
|
||||
if (debug != null)
|
||||
debug.Reset();
|
||||
|
@ -490,7 +491,7 @@ namespace DotRecast.Detour.Crowd
|
|||
|
||||
nvel = res;
|
||||
|
||||
return Tuple.Create(ns, nvel);
|
||||
return ns;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue