From: Mikko Rasa Date: Fri, 28 Jun 2013 19:23:03 +0000 (+0300) Subject: Activate allocator if an AI intends to move X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4529bf980cf3558d86c07266de7d890d3f5e06a6;p=r2c2.git Activate allocator if an AI intends to move --- diff --git a/source/libr2c2/train.cpp b/source/libr2c2/train.cpp index 74bc503..e8df4d8 100644 --- a/source/libr2c2/train.cpp +++ b/source/libr2c2/train.cpp @@ -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; }