All your codebase are belong to us.

This commit is contained in:
Drake Arconis
2014-08-22 00:15:09 -04:00
parent 2a64c07215
commit 948ebe5213
110 changed files with 661 additions and 611 deletions

View File

@@ -876,12 +876,12 @@ void LLMotionController::updateMotions(bool force_update)
//<singu>
// This old code is nonsense.
//S32 quantum_count = llmax(0, llround((update_time - time_interval) / mTimeStep)) + 1;
//S32 quantum_count = llmax(0, llmath::llround((update_time - time_interval) / mTimeStep)) + 1;
// (update_time - time_interval) / mTimeStep is an integer! We need llround to get rid of floating point errors, not llfloor.
// Moreover, just rounding off to the nearest integer with llround(update_time / mTimeStep) makes a lot more sense:
// Moreover, just rounding off to the nearest integer with llmath::llround(update_time / mTimeStep) makes a lot more sense:
// it is the best we can do to get as close to what we should draw as possible.
// However, mAnimTime may only be incremented; therefore make sure of that with the llmax.
S32 quantum_count = llmax(llround(update_time / mTimeStep), llceil(mAnimTime / mTimeStep));
S32 quantum_count = llmax(llmath::llround(update_time / mTimeStep), llceil(mAnimTime / mTimeStep));
//</singu>
if (quantum_count == mTimeStepCount)
{