fixed android compiling

This commit is contained in:
jeefo 2016-09-16 22:55:31 +03:00
commit 8527f0a34b
3 changed files with 3 additions and 7 deletions

View file

@ -47,6 +47,7 @@ typedef unsigned long uint32;
// Own min/max implementation
template <typename T> inline T A_min (T a, T b) { return a < b ? a : b; }
template <typename T> inline T A_max (T a, T b) { return a > b ? a : b; }
template <typename T> inline T A_clamp (T x, T a, T b) { return A_min (A_max (x, a), b); }
// Fast stricmp got somewhere from chromium
static inline int A_stricmp (const char *str1, const char *str2, int length = -1)
@ -386,11 +387,6 @@ namespace Math
{
return AngleNormalize (destAngle - srcAngle);
}
template <typename Type> Type Clamp (Type x, Type a, Type b)
{
return (x < a) ? a : ((x > b) ? b : x);
}
}
//

View file

@ -1271,7 +1271,7 @@ void Bot::Kick (bool keepQuota)
// keep quota number up to date
if (!keepQuota)
yb_quota.SetInt (Clamp <int> (yb_quota.GetInt () - 1, 0, yb_quota.GetInt ()));
yb_quota.SetInt (A_clamp <int> (yb_quota.GetInt () - 1, 0, yb_quota.GetInt ()));
}
void Bot::StartGame (void)

View file

@ -3162,7 +3162,7 @@ void Bot::UpdateBodyAngles (void)
void Bot::UpdateLookAngles (void)
{
const float delta = Clamp <float> (engine.Time () - m_lookUpdateTime, MATH_EQEPSILON, 0.05f);
const float delta = A_clamp <float> (engine.Time () - m_lookUpdateTime, MATH_EQEPSILON, 0.05f);
m_lookUpdateTime = engine.Time ();
// adjust all body and view angles to face an absolute vector