#35 Wrong rotate limit applied to robot, fix included

closed
Code (26)
5
2005-08-11
2005-07-26
No

The following code is from Robot.cc, starting at line 1165:

-------------
rot_speed = fabs(rot_speed);

if( bits & 1 )
rot_speed = min( rot_speed,
the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) );
if( bits & 2 )
rot_speed = min( rot_speed,
the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) );
if( bits & 4 )
rot_speed = min( rot_speed,
the_opts.get_d(OPTION_ROBOT_RADAR_MAX_ROTATE) );

rot_speed *= rot_sign;
if( bits & 1 )
robot_angle.set_rot( robot_angle.pos, rot_speed, -infinity,
infinity, NORMAL_ROT );
if( bits & 2 )
cannon_angle.set_rot( cannon_angle.pos, rot_speed,
-infinity, infinity, NORMAL_ROT );
if( bits & 4 )
radar_angle.set_rot( radar_angle.pos, rot_speed, -infinity,
infinity, NORMAL_ROT );
--------------

I believe the first min() call at if(bits & 1) should be

min( rot_speed,the_opts.get_d(OPTION_ROBOT_MAX_ROTATE) );

to apply the robot rotation speed limit, not the cannon limit.

Discussion

  • John Kasunich

    John Kasunich - 2005-07-26

    Logged In: YES
    user_id=774940

    note, this is in RealTimeBattle-1.0.7-Ext

     
  • John Kasunich

    John Kasunich - 2005-07-26

    Logged In: YES
    user_id=774940

    same problem exists at line 1232

     
  • Johannes Nicolai

    Logged In: YES
    user_id=863272

    I think you are totally right with your assumption. I will
    investigate in this issue.
    Bug will be fixed in 1.0.8

    Thank you
    PS: Perhaps you like to join our project. We are always
    looking for more developers 8-)

     
  • Johannes Nicolai

    • assigned_to: nobody --> jonico
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks