]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/movetypes/movetypes.qh
Split movetypes into separate files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / movetypes / movetypes.qh
1 #ifndef MOVETYPES_H
2 #define MOVETYPES_H
3
4 .float move_ltime;
5 .void(void) move_think;
6 .float move_nextthink;
7 .void(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(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 // should match sv_gameplayfix_fixedcheckwatertransition
25 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
26
27 #ifdef SVQC
28 #define GRAVITY_UNAFFECTED_BY_TICRATE autocvar_sv_gameplayfix_gravityunaffectedbyticrate
29
30 #define TICRATE sys_frametime
31 #elif defined(CSQC)
32 #define GRAVITY_UNAFFECTED_BY_TICRATE (getstati(STAT_MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
33
34 #define TICRATE ticrate
35 #endif
36
37 .entity move_groundentity; // FIXME add move_groundnetworkentity?
38 .float move_suspendedinair;
39 .float move_didgravity;
40
41 void _Movetype_CheckVelocity();
42 void _Movetype_CheckWaterTransition(entity ent);
43 void _Movetype_LinkEdict_TouchAreaGrid();
44 void _Movetype_LinkEdict(float touch_triggers);
45 float _Movetype_TestEntityPosition(vector ofs);
46 float _Movetype_UnstickEntity();
47 vector _Movetype_ClipVelocity(vector vel, vector norm, float f);
48 void _Movetype_PushEntityTrace(vector push);
49 float _Movetype_PushEntity(vector push, float failonstartsolid);
50 void makevectors_matrix(vector myangles);
51
52 void Movetype_Physics_MatchTicrate(float tr, bool sloppy);
53 void Movetype_Physics_MatchServer(bool sloppy);
54 void Movetype_Physics_NoMatchServer();
55 void _Movetype_LinkEdict(float touch_triggers);
56 void _Movetype_LinkEdict_TouchAreaGrid();
57
58 float _Movetype_UnstickEntity();
59
60 const int MAX_CLIP_PLANES = 5;
61
62 #ifdef CSQC
63 const int MOVETYPE_NONE                         = 0;
64 const int MOVETYPE_ANGLENOCLIP      = 1;
65 const int MOVETYPE_ANGLECLIP        = 2;
66 const int MOVETYPE_WALK                         = 3;
67 const int MOVETYPE_STEP                         = 4;
68 const int MOVETYPE_FLY                          = 5;
69 const int MOVETYPE_TOSS                         = 6;
70 const int MOVETYPE_PUSH                         = 7;
71 const int MOVETYPE_NOCLIP                   = 8;
72 const int MOVETYPE_FLYMISSILE       = 9;
73 const int MOVETYPE_BOUNCE                   = 10;
74 const int MOVETYPE_BOUNCEMISSILE        = 11;   // Like bounce but doesn't lose speed on bouncing
75 const int MOVETYPE_FOLLOW           = 12;
76 const int MOVETYPE_FLY_WORLDONLY    = 33;
77
78 const int FL_ITEM                   = 256;
79 const int FL_ONGROUND                           = 512;
80 #endif
81
82 const int MOVETYPE_FAKEPUSH         = 13;
83
84 const float MOVEFLAG_Q2AIRACCELERATE            = 1;
85 const float MOVEFLAG_NOGRAVITYONGROUND          = 2;
86 const float MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
87
88 #ifdef CSQC
89 // TODO: figure out server's version of this
90 #define moveflags (getstati(STAT_MOVEFLAGS))
91 #endif
92
93 #endif