blob: e1f27cb7790c9013e0f6a5e6f680ab5d4ee3b242 (
plain)
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
|
#pragma once
#include "../../util/aabb.h"
#include "../world/bsp.h"
#include "../player.h"
#include "../vars.h"
extern CVAR* mv_gravity;
extern CVAR* mv_friction;
extern CVAR* mv_accelerate;
extern CVAR* mv_airaccelerate;
extern CVAR* mv_wallboost;
extern CVAR* mv_maxspeed;
extern CVAR* mv_stopspeed;
extern CVAR* mv_jump_impulse;
struct GAME_MOVEMENT {
PLAYER* pl;
PLAYER_INPUT* input;
GAME_DATA* game;
VEC3 velocity;
VEC3 pos;
VEC3 angle;
F32 maxspeed;
F32 walkspeed;
AABB aabb;
OBJECT* ground{};
BSP* bsp{};
F32 out_step;
VEC3 unstuck_vel{};
VEC3 unstuck_pos{};
};
extern void gmove_init( GAME_DATA* game );
extern void gmove_set_player( PLAYER* player );
extern void gmove_tick();
extern void gmove_process_move();
extern GAME_MOVEMENT* gmove;
|