23 float gravity =
static_cast<float>(19.29110527038574);
37 if (path_length < 0.0f)
46 time = std::sqrt(2.0f * path_length /
gravity);
53 time = std::sqrt(2.0f * path_length /
gravity);
69 if (start_velocity > termVel)
70 start_velocity = termVel;
74 if (t_passed > terminal_time)
76 result = termVel * (t_passed - terminal_time) +
77 start_velocity * terminal_time +
78 gravity * terminal_time * terminal_time * 0.5f;
81 result = t_passed * (start_velocity + t_passed *
gravity * 0.5f);
106 STR(PendingStrafeStop ),
107 STR(PendingForward ),
108 STR(PendingBackward ),
109 STR(PendingStrafeReft ),
110 STR(PendingStrafeRight ),
117 STR(Spline_Elevation ),
118 STR(Spline_Enabled ),
126 STR(FullSpeedTurning ),
127 STR(FullSpeedPitching ),
128 STR(Allow_Pitching ),
134 STR(Interp_Turning ),
135 STR(Interp_Pitching ),
177 template<
class Flags,
int N>
178 void print_flags(Flags t,
char const* (&names)[N], std::string& str)
180 for (
int i = 0; i < N; ++i)
182 if ((t & Flags(1 << i)) && names[i] !=
nullptr)
183 str.append(
" ").append(names[i]);
std::string ToString() const
TC_GAME_API float gravity
void print_flags(Flags t, char const *(&names)[N], std::string &str)
char const * g_MovementFlag_names[]
const float terminal_safeFall_fallTime
float computeFallTime(float path_length, bool isSafeFall)
const float terminal_safeFall_length
TC_GAME_API UInt32Counter splineIdGen
float terminalSafefallVelocity
const float terminal_length
float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity=0.0f)
float terminalVelocity
Velocity bounds that makes fall speed limited.
char const * g_SplineFlag_names[32]
const float terminal_fallTime