]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/train.cpp
Activate allocator if an AI intends to move
[r2c2.git] / source / libr2c2 / train.cpp
index 74bc50328ce8b6bb60f7f917c149b97989d5e7b7..e8df4d890ced6478c2e083776be81f9bc58564eb 100644 (file)
@@ -340,6 +340,8 @@ void Train::tick(const Time::TimeDelta &dt)
                        }
                }
        }
+       else if(intent_to_move && !allocator.is_active())
+               allocator.set_active(true);
        else if(allocator.is_active() && !intent_to_move && !stop_timeout)
                stop_timeout = 2*Time::sec;
 }