/* $Id$
This file is part of R²C²
-Copyright © 2010 Mikkosoft Productions, Mikko Rasa
+Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa
Distributed under the GPL
*/
speed_limit = 0;
else if(state==APPROACH)
speed_limit = approach_speed;
- else if(state==FOLLOW)
+ else if(state==FOLLOW && train.get_preceding_train()->is_active())
speed_limit = train.get_preceding_train()->get_speed();
if(speed_limit>=0 && target_speed.value>speed_limit)