[Sync] Some project sync

This commit is contained in:
Antz 2014-10-13 15:25:39 +01:00 committed by Antz
parent b25fa433fe
commit bbf0020c1a
98 changed files with 5866 additions and 2121 deletions

View file

@ -41,22 +41,22 @@ namespace Movement
float computeFallTime(float path_length, bool isSafeFall)
{
if (path_length < 0.f)
return 0.f;
{ return 0.f; }
float time;
if (isSafeFall)
{
if (path_length >= terminal_savefall_length)
time = (path_length - terminal_savefall_length) / terminalSavefallVelocity + terminalSavefallVelocity / gravity;
{ time = (path_length - terminal_savefall_length) / terminalSavefallVelocity + terminalSavefallVelocity / gravity; }
else
time = sqrtf(2.f * path_length / gravity);
{ time = sqrtf(2.f * path_length / gravity); }
}
else
{
if (path_length >= terminal_length)
time = (path_length - terminal_length) / terminalVelocity + terminalFallTime;
{ time = (path_length - terminal_length) / terminalVelocity + terminalFallTime; }
else
time = sqrtf(2.f * path_length / gravity);
{ time = sqrtf(2.f * path_length / gravity); }
}
return time;
@ -68,12 +68,12 @@ namespace Movement
float result;
if (isSafeFall)
termVel = terminalSavefallVelocity;
{ termVel = terminalSavefallVelocity; }
else
termVel = terminalVelocity;
{ termVel = terminalVelocity; }
if (start_velocity > termVel)
start_velocity = termVel;
{ start_velocity = termVel; }
float terminal_time = terminalFallTime - start_velocity / gravity; // the time that needed to reach terminalVelocity
@ -83,7 +83,7 @@ namespace Movement
start_velocity * terminal_time + gravity * terminal_time * terminal_time * 0.5f;
}
else
result = t_passed * (start_velocity + t_passed * gravity * 0.5f);
{ result = t_passed * (start_velocity + t_passed * gravity * 0.5f); }
return result;
}
@ -99,7 +99,7 @@ namespace Movement
result = terminalVelocity * (t_passed - terminalFallTime) + terminal_length;
}
else
result = t_passed * t_passed * gravity * 0.5f;
{ result = t_passed * t_passed * gravity * 0.5f; }
return result;
}
@ -201,7 +201,7 @@ namespace Movement
for (int i = 0; i < N; ++i)
{
if ((t & (Flags)(1 << i)) && names[i] != NULL)
str.append(" ").append(names[i]);
{ str.append(" ").append(names[i]); }
}
}