-void Train::set_active(bool a)
-{
- if(a==active)
- return;
- if(!a && controller->get_speed())
- throw logic_error("moving");
-
- active = a;
- if(active)
- {
- stop_timeout = Time::TimeStamp();
- allocator.reserve_more();
- }
- else
- stop_timeout = Time::now()+2*Time::sec;
-}
-