Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/SAIN/v17/.suo
Binary file not shown.
5 changes: 2 additions & 3 deletions Components/Bot Components/Classes/Core/SelfActionClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ public void DoStims()

public void DoReload()
{
var reload = BotOwner.WeaponManager.Reload;
if (!reload.Reloading)
var reloadClass = BotOwner.WeaponManager.Reload;
if (reloadClass.TryReload())
{
if (DebugBotDecisions.Value)
{
Logger.LogDebug($"Reloading!");
}
reload.Reload();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ private void Update()
}

private float DrawCollidersTimers = 0f;
private float CheckHitResetTimer = 0f;

public void LookForCover(Vector3 targetPosition, Vector3 originPoint)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public override void Update()
var target = TargetType;
if (target != null && UpdateCoverTimer < Time.time && (DestinationPosition - target.Position).sqrMagnitude > 1f)
{
UpdateCoverTimer = Time.time + 0.5f;
MoveToCoverPoint(target);
if (MoveToCoverPoint(target))
{
UpdateCoverTimer = Time.time + 1f;
}
}

if (Sprint)
Expand Down Expand Up @@ -89,17 +91,21 @@ private CoverPoint TargetType

private float UpdateCoverTimer = 0f;

private void MoveToCoverPoint(CoverPoint point)
private bool MoveToCoverPoint(CoverPoint point)
{
if (point != null)
{
System.Console.WriteLine("Moving to cover");
DestinationPosition = point.Position;
NavigationPoint.GoToPoint(point.Position, -1f);
SAIN.Mover.SetTargetMoveSpeed(1f);
SAIN.Mover.SetTargetPose(1f);
BotOwner.DoorOpener.Update();
if (GoToPoint(point.Position, -1f))
{
System.Console.WriteLine("Moving to cover");
DestinationPosition = point.Position;
SAIN.Mover.SetTargetMoveSpeed(1f);
SAIN.Mover.SetTargetPose(1f);
//BotOwner.DoorOpener.Update();
return true;
}
}
return false;
}

private Vector3 DestinationPosition;
Expand Down Expand Up @@ -140,7 +146,8 @@ public bool GoToPoint(Vector3 point, float reachDist = -1f)
{
reachDist = BotOwner.Settings.FileSettings.Move.REACH_DIST;
}
BotOwner.Mover.GoToByWay(Path.corners, reachDist, Vector3.zero);
//BotOwner.Mover.GoToByWay(Path.corners, reachDist, Vector3.zero);
BotOwner.Mover.GoToPoint(navHit.position, false, reachDist, false, false, false);
return true;
}
}
Expand All @@ -153,11 +160,11 @@ public bool GoToPoint(Vector3 point, float reachDist = -1f)

public override void Start()
{
MoveToCoverPoint(SAIN.Cover.ClosestPoint);
}

public override void Stop()
{
ToggleSprint(false);
}

private readonly SAINComponent SAIN;
Expand Down
Binary file modified bin/x86/3.5.7/SAIN.dll
Binary file not shown.
Binary file modified bin/x86/3.5.7/SAIN.pdb
Binary file not shown.
Binary file modified obj/x86/3.5.7/SAIN.csproj.AssemblyReference.cache
Binary file not shown.
Binary file modified obj/x86/3.5.7/SAIN.dll
Binary file not shown.
Binary file modified obj/x86/3.5.7/SAIN.pdb
Binary file not shown.