13 .vector move_velocity;
14 .vector move_avelocity;
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
25 .vector move_punchangle;
27 // should match sv_gameplayfix_fixedcheckwatertransition
28 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
31 .int stat_gameplayfix_upvelocityclearsonground;
33 #define GRAVITY_UNAFFECTED_BY_TICRATE autocvar_sv_gameplayfix_gravityunaffectedbyticrate
34 #define UPWARD_VELOCITY_CLEARS_ONGROUND autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag
36 #define TICRATE sys_frametime
38 #define GRAVITY_UNAFFECTED_BY_TICRATE (getstati(STAT_MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
39 #define UPWARD_VELOCITY_CLEARS_ONGROUND getstati(STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
41 #define TICRATE ticrate
44 .entity move_groundentity; // FIXME add move_groundnetworkentity?
45 .float move_suspendedinair;
46 .float move_didgravity;
48 void _Movetype_WallFriction(entity this, vector stepnormal);
49 int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight);
50 void _Movetype_CheckVelocity(entity this);
51 void _Movetype_CheckWaterTransition(entity ent);
52 float _Movetype_CheckWater(entity ent);
53 void _Movetype_LinkEdict_TouchAreaGrid(entity this);
54 void _Movetype_LinkEdict(entity this, float touch_triggers);
55 float _Movetype_TestEntityPosition(entity this, vector ofs);
56 float _Movetype_UnstickEntity(entity this);
57 vector _Movetype_ClipVelocity(vector vel, vector norm, float f);
58 void _Movetype_PushEntityTrace(entity this, vector push);
59 float _Movetype_PushEntity(entity this, vector push, float failonstartsolid);
60 void makevectors_matrix(vector myangles);
62 void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy);
63 void Movetype_Physics_MatchServer(entity this, bool sloppy);
64 void Movetype_Physics_NoMatchServer(entity this);
65 void _Movetype_LinkEdict(entity this, float touch_triggers);
66 void _Movetype_LinkEdict_TouchAreaGrid(entity this);
68 float _Movetype_UnstickEntity(entity this);
70 const int MAX_CLIP_PLANES = 5;
73 const int MOVETYPE_NONE = 0;
74 const int MOVETYPE_ANGLENOCLIP = 1;
75 const int MOVETYPE_ANGLECLIP = 2;
76 const int MOVETYPE_WALK = 3;
77 const int MOVETYPE_STEP = 4;
78 const int MOVETYPE_FLY = 5;
79 const int MOVETYPE_TOSS = 6;
80 const int MOVETYPE_PUSH = 7;
81 const int MOVETYPE_NOCLIP = 8;
82 const int MOVETYPE_FLYMISSILE = 9;
83 const int MOVETYPE_BOUNCE = 10;
84 const int MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing
85 const int MOVETYPE_FOLLOW = 12;
86 const int MOVETYPE_FLY_WORLDONLY = 33;
88 const int FL_ITEM = 256;
89 const int FL_ONGROUND = 512;
92 const int MOVETYPE_FAKEPUSH = 13;
94 const float MOVEFLAG_Q2AIRACCELERATE = 1;
95 const float MOVEFLAG_NOGRAVITYONGROUND = 2;
96 const float MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
99 // TODO: figure out server's version of this
100 #define moveflags (getstati(STAT_MOVEFLAGS))