forked from Bots-United/jk_botti
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplayer.h
47 lines (34 loc) · 764 Bytes
/
player.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// JK_Botti - be more human!
//
// player.h
//
#ifndef PLAYER_H
#define PLAYER_H
typedef struct posdata_s
{
qboolean inuse;
float time;
qboolean was_alive;
qboolean ducking;
Vector origin;
Vector velocity;
//Vector accel;
posdata_s * older;
posdata_s * newer;
} posdata_t;
// try store max 4sec of position data, server max fps is 100 -> 10ms/frame, 4000ms/10ms = 400
#define POSDATA_SIZE (4000/10)
typedef struct player_s
{
edict_t * pEdict;
int current_weapon_id;
int last_waypoint;
float last_time_not_facing_wall;
float last_time_dead;
posdata_t * position_latest;
posdata_t * position_oldest;
posdata_t posdata_mem[POSDATA_SIZE];
} player_t;
extern player_t players[32];
#endif