mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
increase node search radius for walking around
This commit is contained in:
parent
e823af2e22
commit
a889c0780c
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,8 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
|
|||
public float TimeSinceStartedSurrendering => Time.time - _timeWhenStartedSurrendering;
|
||||
public bool IsSurrendering => this.TimeSinceStartedSurrendering < 4f;
|
||||
|
||||
public float nodeSearchRadius = 500f;
|
||||
|
||||
|
||||
protected internal override void OnAwake(PedAI pedAI)
|
||||
{
|
||||
|
@ -87,7 +89,7 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
|
|||
|
||||
if (!_pathMovementData.destinationNode.HasValue)
|
||||
{
|
||||
PedAI.FindClosestWalkableNode(_pathMovementData, _ped.transform.position);
|
||||
PedAI.FindClosestWalkableNode(_pathMovementData, _ped.transform.position, this.nodeSearchRadius);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue