]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed search for closest ally or weapon
authorCôme Chilliet <come@chilliet.eu>
Mon, 23 Jan 2017 16:18:33 +0000 (17:18 +0100)
committerCôme Chilliet <come@chilliet.eu>
Mon, 23 Jan 2017 16:18:33 +0000 (17:18 +0100)
Source/Objects/Person.cpp

index 073ad0b8737770dca97542883feed494f2724e79..7f279de859696dee81965ddddcb5b369c65c695e 100644 (file)
@@ -8144,7 +8144,6 @@ void Person::doAI()
                                 closestdist = distance;
                                 closest = k;
                             }
-                            closest = k;
                         }
                     }
                     if (closest != -1) {
@@ -8245,7 +8244,6 @@ void Person::doAI()
                                 closestdist = distance;
                                 closest = k;
                             }
-                            closest = k;
                         }
                     }
                     if (closest != -1) {