From 1b2703aaba9ef21b8fca7c12b299fcd0fd4b9251 Mon Sep 17 00:00:00 2001 From: GreYFoXGTi Date: Sat, 12 Feb 2011 12:40:36 +0200 Subject: Refactoring & fixed WEAPONSPEC_GUN in content.py --- src/game/gamecore.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/game/gamecore.h') diff --git a/src/game/gamecore.h b/src/game/gamecore.h index 43456c90..6e86d988 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -54,19 +54,19 @@ inline vec2 GetDirection(int Angle) return vec2(cosf(a), sinf(a)); } -inline vec2 GetDir(float a) +inline vec2 GetDir(float A) { - return vec2(cosf(a), sinf(a)); + return vec2(cosf(A), sinf(A)); } inline float GetAngle(vec2 Dir) { if(Dir.x == 0 && Dir.y == 0) return 0.0f; - float a = atanf(Dir.y/Dir.x); + float A = atanf(Dir.y/Dir.x); if(Dir.x < 0) - a = a+pi; - return a; + A = A+pi; + return A; } inline void StrToInts(int *pInts, int Num, const char *pStr) @@ -105,13 +105,13 @@ inline void IntsToStr(const int *pInts, int Num, char *pStr) -inline vec2 CalcPos(vec2 p, vec2 v, float Curvature, float Speed, float t) +inline vec2 CalcPos(vec2 P, vec2 V, float Curvature, float Speed, float T) { - vec2 n; - t *= Speed; - n.x = p.x + v.x*t; - n.y = p.y + v.y*t + Curvature/10000*(t*t); - return n; + vec2 N; + T *= Speed; + N.x = P.x + V.x*T; + N.y = P.y + V.y*T + Curvature/10000*(T*T); + return N; } -- cgit 1.4.1