Add some Follow stuff to lua

You can also disallow following code from allowing the NPC to run if
they're far enough away
This commit is contained in:
Michael Cook (mackal)
2018-11-03 17:44:19 -04:00
parent 5e03d977d6
commit dbb368865c
5 changed files with 31 additions and 5 deletions
+2 -1
View File
@@ -1647,7 +1647,8 @@ void Mob::AI_Process() {
if (distance >= follow_distance) {
int speed = GetWalkspeed();
if (distance >= follow_distance + 150) {
// maybe we want the NPC to only walk doing follow logic
if (GetFollowCanRun() && distance >= follow_distance + 150) {
speed = GetRunspeed();
}