forked from mirror/DotRecast
Optimisation: getting portal points unsafe
This commit is contained in:
parent
62ebb2298e
commit
f5fc9f6c2f
|
@ -2077,19 +2077,11 @@ namespace DotRecast.Detour
|
||||||
fromType = 0;
|
fromType = 0;
|
||||||
toType = 0;
|
toType = 0;
|
||||||
|
|
||||||
var status = m_nav.GetTileAndPolyByRef(from, out var fromTile, out var fromPoly);
|
m_nav.GetTileAndPolyByRefUnsafe(from, out var fromTile, out var fromPoly);
|
||||||
if (status.Failed())
|
|
||||||
{
|
|
||||||
return DtStatus.DT_FAILURE | DtStatus.DT_INVALID_PARAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
fromType = fromPoly.GetPolyType();
|
fromType = fromPoly.GetPolyType();
|
||||||
|
|
||||||
status = m_nav.GetTileAndPolyByRef(to, out var toTile, out var toPoly);
|
m_nav.GetTileAndPolyByRefUnsafe(to, out var toTile, out var toPoly);
|
||||||
if (status.Failed())
|
|
||||||
{
|
|
||||||
return DtStatus.DT_FAILURE | DtStatus.DT_INVALID_PARAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
toType = toPoly.GetPolyType();
|
toType = toPoly.GetPolyType();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue