X-Git-Url: http://git.tdb.fi/?p=r2c2.git;a=blobdiff_plain;f=source%2Flibr2c2%2Faicontrol.cpp;fp=source%2Flibr2c2%2Faicontrol.cpp;h=e3ab1e47bf2886615c9cf7051be4b4e81a24395c;hp=f1f16bf1850a511c25059aa247356ec4445fbcee;hb=3b37ee041af581e47646c2487e7e302c55bd8cd7;hpb=7b4155fa0581d7c5fe198e4fb1dea61fa0846eec diff --git a/source/libr2c2/aicontrol.cpp b/source/libr2c2/aicontrol.cpp index f1f16bf..e3ab1e4 100644 --- a/source/libr2c2/aicontrol.cpp +++ b/source/libr2c2/aicontrol.cpp @@ -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