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);
131 STRINGIZE(VehiclePassengerIsTransitionAllowed),
182 template<
class Flags,
int N>
183 void PrintFlags(Flags t,
char const* (&names)[N], std::string& str)
185 for (
int i = 0; i < N; ++i)
187 if ((t & Flags(1 << i)) && names[i] !=
nullptr)
188 str.append(
" ").append(names[i]);
std::string ToString() const
float constexpr terminalVelocity
Velocity bounds that makes fall speed limited.
char const * SplineFlagNames[32]
char const * MovementFlagNames[]
float computeFallTime(float path_length, bool isSafeFall)
TC_GAME_API UInt32Counter splineIdGen
float constexpr terminalSafefallVelocity
float constexpr terminal_safeFall_length
float constexpr terminal_fallTime
float constexpr terminal_safeFall_fallTime
TC_GAME_API std::string MovementFlags_ToString(uint32 flags)
float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity=0.0f)
TC_GAME_API std::string MovementFlagsExtra_ToString(uint32 flags)
void PrintFlags(Flags t, char const *(&names)[N], std::string &str)
char const * MovementFlagExtraNames[]
float constexpr terminal_length