diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 25d806a..fe623fd 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -1496,6 +1496,14 @@ float FloatDifference(float f1, float f2) return f1 - f2; } +//----------------------------------------------------------- + +float FloatOffset(float f1, float f2) +{ + if(f1 >= f2) return f1 - f2; + else return (f2 - f1); +} + float DegToRad(float fDegrees) { if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f; diff --git a/saco/game/util.h b/saco/game/util.h index b2ecd2f..648403f 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -7,6 +7,7 @@ void ProcessLineOfSight(VECTOR *vecOrigin, VECTOR *vecLine, VECTOR *colPoint, int bIgnoreSomeObjectsForCamera, int bUnk1); float FloatDifference(float f1, float f2); +float FloatOffset(float f1, float f2); void __stdcall SetRadarColor(int nIndex,DWORD dwColor);