Clean up force application code.
Bug #1272383 reported by
Rick Stovall
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_
bool base_object:
{
(....)
// 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
lp:~fpstovall/nrtb/fps-bugsfix-005
- Rick Stovall: Approve (code)
-
Diff: 121 lines (+57/-9)3 files modifiedcpp/sim_engine/base_object/base_object.cpp (+7/-6)
cpp/sim_engine/base_object/base_object.h (+4/-1)
cpp/sim_engine/base_object/base_object_test.cpp (+46/-2)
Changed in nrtb: | |
milestone: | none → sprint-005a |
To post a comment you must log in.