Fixes? and side channels.

This commit is contained in:
2022-05-17 19:09:50 +07:00
parent b5aff44f79
commit e976a3fbff
18 changed files with 454 additions and 90 deletions

View File

@ -47,7 +47,7 @@ public class MapManager : MonoBehaviour
var startNavPoint = _instance.IDToNavPoint[startPoint];
var endNavPoint = _instance.IDToNavPoint[endPoint];
float coef;
if (allDistance != 0)
if (Mathf.Abs(allDistance) > float.Epsilon)
{
coef = remainingDistance / allDistance;
startNavPoint.DeathAttr += 1 - coef;