X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fmovetypes%2Fmovetypes.qh;h=d3de0ba9cf3de35617c8604c8d9023fc92631926;hb=68cd1984c5251d0a371de0aa338bd423f4d20c6c;hp=85912ee1c33f915ebdf59f907c616ef2f571c4f3;hpb=678127044857fb9b89f06faf7a3313bdeb43205c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics/movetypes/movetypes.qh b/qcsrc/common/physics/movetypes/movetypes.qh index 85912ee1c..d3de0ba9c 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qh +++ b/qcsrc/common/physics/movetypes/movetypes.qh @@ -1,5 +1,10 @@ #pragma once +#ifdef SVQC +// undefined on client, engine cvar +bool autocvar_physics_ode; +#endif + // water levels const int WATERLEVEL_NONE = 0; const int WATERLEVEL_WETFEET = 1; @@ -16,16 +21,25 @@ const int WATERLEVEL_SUBMERGED = 3; #define GAMEPLAYFIX_DOWNTRACEONGROUND(s) STAT(GAMEPLAYFIX_DOWNTRACEONGROUND) #define GAMEPLAYFIX_EASIERWATERJUMP(s) STAT(GAMEPLAYFIX_EASIERWATERJUMP) #define GAMEPLAYFIX_STEPDOWN(s) STAT(GAMEPLAYFIX_STEPDOWN) +#define GAMEPLAYFIX_STEPDOWN_MAXSPEED(s) STAT(GAMEPLAYFIX_STEPDOWN_MAXSPEED) #define GAMEPLAYFIX_STEPMULTIPLETIMES(s) STAT(GAMEPLAYFIX_STEPMULTIPLETIMES) #define GAMEPLAYFIX_UNSTICKPLAYERS(s) STAT(GAMEPLAYFIX_UNSTICKPLAYERS) #define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION) +#define GAMEPLAYFIX_SLIDEMOVEPROJECTILES(s) STAT(GAMEPLAYFIX_SLIDEMOVEPROJECTILES) +#define GAMEPLAYFIX_GRENADEBOUNCESLOPES(s) STAT(GAMEPLAYFIX_GRENADEBOUNCESLOPES) +#define GAMEPLAYFIX_NOAIRBORNCORPSE(s) STAT(GAMEPLAYFIX_NOAIRBORNCORPSE) +#define NOAIRBORNCORPSE_ALLOWSUSPENDED(s) STAT(NOAIRBORNCORPSE_ALLOWSUSPENDED) #define UPWARD_VELOCITY_CLEARS_ONGROUND(s) STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND) +#define GAMEPLAYFIX_DELAYPROJECTILES(s) STAT(GAMEPLAYFIX_DELAYPROJECTILES) + #define PHYS_STEPHEIGHT(s) STAT(MOVEVARS_STEPHEIGHT) #define PHYS_NOSTEP(s) STAT(NOSTEP) #define PHYS_JUMPSTEP(s) STAT(MOVEVARS_JUMPSTEP) #define PHYS_WALLFRICTION(s) STAT(MOVEVARS_WALLFRICTION) +#define PHYS_WALLCLIP(s) STAT(MOVEVARS_WALLCLIP) + #ifdef CSQC .float bouncestop; .float bouncefactor; @@ -55,6 +69,8 @@ const int WATERLEVEL_SUBMERGED = 3; void set_movetype(entity this, int mt); +.float pm_time; + .float move_movetype; .float move_time; //.vector move_origin; @@ -76,16 +92,26 @@ void set_movetype(entity this, int mt); .float move_suspendedinair; .float move_didgravity; +// unsticking +const int UNSTICK_FINE = 0; +const int UNSTICK_FIXED = 1; +const int UNSTICK_STUCK = 2; + +// set by _Movetype_FlyMove +vector move_stepnormal; + +bool _Movetype_NudgeOutOfSolid_PivotIsKnownGood(entity this, vector pivot); void _Movetype_WallFriction(entity this, vector stepnormal); -int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight); +int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepnormal, float stepheight); void _Movetype_CheckVelocity(entity this); void _Movetype_CheckWaterTransition(entity ent); +void _Movetype_CheckStuck(entity this); float _Movetype_CheckWater(entity ent); void _Movetype_LinkEdict_TouchAreaGrid(entity this); void _Movetype_LinkEdict(entity this, float touch_triggers); vector _Movetype_ClipVelocity(vector vel, vector norm, float f); void _Movetype_PushEntityTrace(entity this, vector push); -float _Movetype_PushEntity(entity this, vector push, float failonstartsolid); +bool _Movetype_PushEntity(entity this, vector push, float failonstartsolid, bool dolink); void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient); void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy); @@ -94,7 +120,7 @@ void Movetype_Physics_NoMatchServer(entity this); void _Movetype_LinkEdict(entity this, float touch_triggers); void _Movetype_LinkEdict_TouchAreaGrid(entity this); -float _Movetype_UnstickEntity(entity this); +int _Movetype_UnstickEntity(entity this); const int MAX_CLIP_PLANES = 5; @@ -115,14 +141,13 @@ const int MOVETYPE_FOLLOW = 12; const int MOVETYPE_PHYSICS = 32; const int MOVETYPE_FLY_WORLDONLY = 33; -const int FL_ITEM = 256; -const int FL_ONGROUND = 512; #elif defined(SVQC) const int MOVETYPE_ANGLENOCLIP = 1; const int MOVETYPE_ANGLECLIP = 2; #endif -const int FL_ONSLICK = BIT(20); +const int MOVETYPE_QCPLAYER = 150; // QC-driven player physics, no think functions! +const int MOVETYPE_QCENTITY = 151; // QC-driven entity physics, some think functions! const int MOVETYPE_FAKEPUSH = 13;