1#pragma once 2 3#define IS_ONGROUND(s) boolean((s).flags & FL_ONGROUND) 4#define SET_ONGROUND(s) ((s).flags |= FL_ONGROUND) 5#define UNSET_ONGROUND(s) ((s).flags &= ~FL_ONGROUND) 6#define IS_ONSLICK(s) boolean((s).flags & FL_ONSLICK) 7#define SET_ONSLICK(s) ((s).flags |= FL_ONSLICK) 8#define UNSET_ONSLICK(s) ((s).flags &= ~FL_ONSLICK) 9 10#ifdef CSQC 11.float bouncestop; 12.float bouncefactor; 13#endif 14 15void set_movetype(entity this, int mt); 16 17.float move_movetype; 18.float move_time; 19//.vector move_origin; 20//.vector move_angles; 21//.vector move_velocity; 22//.vector move_avelocity; 23//.int move_flags; 24//.int move_watertype; 25//.int move_waterlevel; 26.void(float, float)contentstransition; 27//.float move_bounce_factor; 28//.float move_bounce_stopspeed; 29.float move_nomonsters; // -1 for MOVE_NORMAL, otherwise a MOVE_ constant 30 31.entity aiment; 32.vector punchangle; 33 34.entity groundentity; // FIXME add move_groundnetworkentity? 35.float move_suspendedinair; 36.float move_didgravity; 37 38void _Movetype_WallFriction(entity this, vector stepnormal); 39int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight); 40void _Movetype_CheckVelocity(entity this); 41void _Movetype_CheckWaterTransition(entity ent); 42float _Movetype_CheckWater(entity ent); 43void _Movetype_LinkEdict_TouchAreaGrid(entity this); 44void _Movetype_LinkEdict(entity this, float touch_triggers); 45vector _Movetype_ClipVelocity(vector vel, vector norm, float f); 46void _Movetype_PushEntityTrace(entity this, vector push); 47float _Movetype_PushEntity(entity this, vector push, float failonstartsolid); 48 49void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient); 50void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy); 51void Movetype_Physics_MatchServer(entity this, bool sloppy); 52void Movetype_Physics_NoMatchServer(entity this); 53void _Movetype_LinkEdict(entity this, float touch_triggers); 54void _Movetype_LinkEdict_TouchAreaGrid(entity this); 55 56float _Movetype_UnstickEntity(entity this); 57 58const int MAX_CLIP_PLANES = 5; 59 60#ifdef CSQC 61const int MOVETYPE_NONE = 0; 62const int MOVETYPE_ANGLENOCLIP = 1; 63const int MOVETYPE_ANGLECLIP = 2; 64const int MOVETYPE_WALK = 3; 65const int MOVETYPE_STEP = 4; 66const int MOVETYPE_FLY = 5; 67const int MOVETYPE_TOSS = 6; 68const int MOVETYPE_PUSH = 7; 69const int MOVETYPE_NOCLIP = 8; 70const int MOVETYPE_FLYMISSILE = 9; 71const int MOVETYPE_BOUNCE = 10; 72const int MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing 73const int MOVETYPE_FOLLOW = 12; 74const int MOVETYPE_PHYSICS = 32; 75const int MOVETYPE_FLY_WORLDONLY = 33; 76 77const int FL_ITEM = 256; 78const int FL_ONGROUND = 512; 79#elif defined(SVQC) 80const int MOVETYPE_ANGLENOCLIP = 1; 81const int MOVETYPE_ANGLECLIP = 2; 82#endif 83 84const int FL_ONSLICK = BIT(20); 85 86const int MOVETYPE_FAKEPUSH = 13; 87 88const int MOVEFLAG_VALID = BIT(23); 89const int MOVEFLAG_Q2AIRACCELERATE = BIT(0); 90const int MOVEFLAG_NOGRAVITYONGROUND = BIT(1); 91const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = BIT(2); 92 93#ifdef CSQC 94#define moveflags STAT(MOVEFLAGS) 95#endif 96