]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/aicontrol.cpp
Export AI control parameters over the network
[r2c2.git] / source / libr2c2 / aicontrol.cpp
index f1f16bf1850a511c25059aa247356ec4445fbcee..e3ab1e47bf2886615c9cf7051be4b4e81a24395c 100644 (file)
@@ -29,6 +29,9 @@ void AIControl::set_target_speed(float s)
 void AIControl::set_reverse(bool r)
 {
        pending_reverse = r;
+       if(r==reverse)
+               return;
+
        if(train.get_controller().get_speed())
                set_target_speed(0);
        else