Pathfinding algorithm start. Currently freezes in pathfinding loop

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-07-05 21:14:36 +00:00
parent fac52ec521
commit 408c1d3950
6 changed files with 147 additions and 1 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ bool Wizard::RightClickAbility(){
dist--;
teleportPoint=p.GetPos()+pointTowardsMouse*dist;
}
if(dist>0){
if(dist>0&&p.CanPathfindTo(p.GetPos(),teleportPoint)){
p.SetState(State::TELEPORT);
p.teleportAnimationTimer=0.35;
p.teleportTarget=teleportPoint;