forked from mirror/DotRecast
remove Tuple.Create
This commit is contained in:
parent
601526e053
commit
9d29d1f6c0
|
@ -1178,10 +1178,8 @@ namespace DotRecast.Detour.Crowd
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var nsnvel = _obstacleQuery.SampleVelocityGrid(ag.npos, ag.option.radius,
|
ns = _obstacleQuery.SampleVelocityGrid(ag.npos, ag.option.radius,
|
||||||
ag.desiredSpeed, ag.vel, ag.dvel, option, vod);
|
ag.desiredSpeed, ag.vel, ag.dvel, out ag.nvel, option, vod);
|
||||||
ns = nsnvel.Item1;
|
|
||||||
ag.nvel = nsnvel.Item2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_velocitySampleCount += ns;
|
_velocitySampleCount += ns;
|
||||||
|
|
|
@ -319,7 +319,7 @@ namespace DotRecast.Detour.Crowd
|
||||||
return penalty;
|
return penalty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tuple<int, RcVec3f> SampleVelocityGrid(RcVec3f pos, float rad, float vmax, RcVec3f vel, RcVec3f dvel,
|
public int SampleVelocityGrid(RcVec3f pos, float rad, float vmax, RcVec3f vel, RcVec3f dvel, out RcVec3f nvel,
|
||||||
DtObstacleAvoidanceParams option, DtObstacleAvoidanceDebugData debug)
|
DtObstacleAvoidanceParams option, DtObstacleAvoidanceDebugData debug)
|
||||||
{
|
{
|
||||||
Prepare(pos, dvel);
|
Prepare(pos, dvel);
|
||||||
|
@ -328,7 +328,7 @@ namespace DotRecast.Detour.Crowd
|
||||||
m_vmax = vmax;
|
m_vmax = vmax;
|
||||||
m_invVmax = vmax > 0 ? 1.0f / vmax : float.MaxValue;
|
m_invVmax = vmax > 0 ? 1.0f / vmax : float.MaxValue;
|
||||||
|
|
||||||
RcVec3f nvel = RcVec3f.Zero;
|
nvel = RcVec3f.Zero;
|
||||||
|
|
||||||
if (debug != null)
|
if (debug != null)
|
||||||
debug.Reset();
|
debug.Reset();
|
||||||
|
@ -359,7 +359,7 @@ namespace DotRecast.Detour.Crowd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Tuple.Create(ns, nvel);
|
return ns;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vector normalization that ignores the y-component.
|
// vector normalization that ignores the y-component.
|
||||||
|
|
Loading…
Reference in New Issue