Move util functions to util.c

Move vec2_t to util.h
This commit is contained in:
8dcc
2023-07-22 16:15:57 +02:00
parent 0f473bba4e
commit 33494b415f
3 changed files with 66 additions and 40 deletions

18
src/include/util.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef _UTIL_H
#define _UTIL_H
#include "sdk.h"
#include "globals.h"
/* Vector 2 for 2d points */
typedef float vec2_t[2];
/*----------------------------------------------------------------------------*/
bool is_alive(cl_entity_t* ent);
bool valid_client(cl_entity_t* ent);
char* get_name(int ent_idx);
bool vec_is_zero(vec3_t v);
bool world_to_screen(vec3_t vec, vec2_t screen);
#endif /* _UTIL_H */