-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUtil.h
32 lines (28 loc) · 1013 Bytes
/
Util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <hlsdk/public/mathlib/mathlib.h>
#include <cstdint>
#include <vector>
class Player;
struct edict_t;
class Bot;
class CGameTrace;
class ITraceFilter;
typedef CGameTrace trace_t;
namespace Util
{
int RandomInt(int min, int max);
float RandomFloat(float min, float max);
void Log(const char* text, ...);
void DebugLog(const char* text, ...);
float DistanceToNoZ(Vector a, Vector b);
void DrawBeam(Vector startPos, Vector endPos, uint8_t r, uint8_t g, uint8_t b, float lifeTime);
std::vector<Player> GetAllPlayers();
void TraceLine(Vector startPos, Vector targetPos, unsigned int fMask, ITraceFilter* traceFilter,
trace_t* traceResult);
Player GetPlayerFromUserId(int userId);
QAngle GetLookAtAngleForPos(Bot* bot, Vector lookAtPos);
Vector2D GetIdealMoveSpeedsToPos(Bot* bot, Vector targetPos);
QAngle CorrectViewAngle(QAngle viewAngle);
static vec_t _NormalizeAngle(vec_t angle);
static vec_t _ClampAngle(vec_t angle, float min, float max);
}