Clean up force application code.

Bug #1272383 reported by Rick Stovall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
New Real Time Battle
Status tracked in Alpha
Alpha
Fix Released
Medium
Rick Stovall

Bug Description

In cpp/sim_engine/base_object/base_object.cpp:

bool base_object::apply(int time, float quanta)
{
 (....)

  // existing code (too ugly to live)
  velocity += (a * quanta) + (accel_mod * quanta);
  rotation += (ra * quanta) + (torque_mod * quanta);

  // should be
  velocity += (a + accel_mod) * quanta;
  rotation += (ra + torque_mod) * quanta;

(....)
};

This new code will be easier to understand and may run better.

Related branches

Rick Stovall (fpstovall)
Changed in nrtb:
milestone: none → sprint-005a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.