]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/physics/movetypes/movetypes.qh
Merge branch 'terencehill/cl_forceplayercolors_2' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / movetypes.qh
1 #ifndef MOVETYPES_H
2 #define MOVETYPES_H
3
4 .float move_ltime;
5 .void()move_think;
6 .float move_nextthink;
7 .void()move_blocked;
8
9 .float move_movetype;
10 .float move_time;
11 .vector move_origin;
12 .vector move_angles;
13 .vector move_velocity;
14 .vector move_avelocity;
15 .int move_flags;
16 .int move_watertype;
17 .int move_waterlevel;
18 .void()move_touch;
19 .void(float, float)contentstransition;
20 .float move_bounce_factor;
21 .float move_bounce_stopspeed;
22 .float move_nomonsters;  // -1 for MOVE_NORMAL, otherwise a MOVE_ constant
23
24 .entity move_aiment;
25 .vector move_punchangle;
26
27 // should match sv_gameplayfix_fixedcheckwatertransition
28 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
29
30 .entity move_groundentity;  // FIXME add move_groundnetworkentity?
31 .float move_suspendedinair;
32 .float move_didgravity;
33
34 void _Movetype_WallFriction(entity this, vector stepnormal);
35 int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight);
36 void _Movetype_CheckVelocity(entity this);
37 void _Movetype_CheckWaterTransition(entity ent);
38 float _Movetype_CheckWater(entity ent);
39 void _Movetype_LinkEdict_TouchAreaGrid(entity this);
40 void _Movetype_LinkEdict(entity this, float touch_triggers);
41 float _Movetype_TestEntityPosition(entity this, vector ofs);
42 float _Movetype_UnstickEntity(entity this);
43 vector _Movetype_ClipVelocity(vector vel, vector norm, float f);
44 void _Movetype_PushEntityTrace(entity this, vector push);
45 float _Movetype_PushEntity(entity this, vector push, float failonstartsolid);
46 void makevectors_matrix(vector myangles);
47
48 void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy);
49 void Movetype_Physics_MatchServer(entity this, bool sloppy);
50 void Movetype_Physics_NoMatchServer(entity this);
51 void _Movetype_LinkEdict(entity this, float touch_triggers);
52 void _Movetype_LinkEdict_TouchAreaGrid(entity this);
53
54 float _Movetype_UnstickEntity(entity this);
55
56 const int MAX_CLIP_PLANES = 5;
57
58 #ifdef CSQC
59 const int MOVETYPE_NONE             = 0;
60 const int MOVETYPE_ANGLENOCLIP      = 1;
61 const int MOVETYPE_ANGLECLIP        = 2;
62 const int MOVETYPE_WALK             = 3;
63 const int MOVETYPE_STEP             = 4;
64 const int MOVETYPE_FLY              = 5;
65 const int MOVETYPE_TOSS             = 6;
66 const int MOVETYPE_PUSH             = 7;
67 const int MOVETYPE_NOCLIP           = 8;
68 const int MOVETYPE_FLYMISSILE       = 9;
69 const int MOVETYPE_BOUNCE           = 10;
70 const int MOVETYPE_BOUNCEMISSILE    = 11;  // Like bounce but doesn't lose speed on bouncing
71 const int MOVETYPE_FOLLOW           = 12;
72 const int MOVETYPE_PHYSICS          = 32;
73 const int MOVETYPE_FLY_WORLDONLY    = 33;
74
75 const int FL_ITEM                   = 256;
76 const int FL_ONGROUND                           = 512;
77 #endif
78
79 const int MOVETYPE_FAKEPUSH         = 13;
80
81 const int MOVEFLAG_VALID = BIT(23);
82 const int MOVEFLAG_Q2AIRACCELERATE = BIT(0);
83 const int MOVEFLAG_NOGRAVITYONGROUND = BIT(1);
84 const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = BIT(2);
85
86 #ifdef CSQC
87 #define moveflags STAT(MOVEFLAGS)
88 #endif
89
90 #endif