]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/movetypes/movetypes.qh
Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / movetypes / movetypes.qh
index 85c07fce64222d5ed65837bc4d4a9c8f48f14c11..67cd51e16b7d1e1a153558c2a103dd2115c49663 100644 (file)
@@ -2,9 +2,9 @@
 #define MOVETYPES_H
 
 .float move_ltime;
-.void(void) move_think;
+.void(void)move_think;
 .float move_nextthink;
-.void(void) move_blocked;
+.void(void)move_blocked;
 
 .float move_movetype;
 .float move_time;
 .int move_flags;
 .int move_watertype;
 .int move_waterlevel;
-.void(void) move_touch;
-.void(float, float) contentstransition;
+.void(void)move_touch;
+.void(float, float)contentstransition;
 .float move_bounce_factor;
 .float move_bounce_stopspeed;
-.float move_nomonsters; // -1 for MOVE_NORMAL, otherwise a MOVE_ constant
+.float move_nomonsters;  // -1 for MOVE_NORMAL, otherwise a MOVE_ constant
+
+.entity move_aiment;
+.vector move_punchangle;
 
 // should match sv_gameplayfix_fixedcheckwatertransition
 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
 
 #ifdef SVQC
+.int stat_gameplayfix_upvelocityclearsonground;
+
 #define GRAVITY_UNAFFECTED_BY_TICRATE autocvar_sv_gameplayfix_gravityunaffectedbyticrate
+#define UPWARD_VELOCITY_CLEARS_ONGROUND autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag
 
 #define TICRATE sys_frametime
 #elif defined(CSQC)
 #define GRAVITY_UNAFFECTED_BY_TICRATE (getstati(STAT_MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
+#define UPWARD_VELOCITY_CLEARS_ONGROUND getstati(STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
 
 #define TICRATE ticrate
 #endif
 
-.entity move_groundentity; // FIXME add move_groundnetworkentity?
+.entity move_groundentity;  // FIXME add move_groundnetworkentity?
 .float move_suspendedinair;
 .float move_didgravity;
 
+void _Movetype_WallFriction(vector stepnormal);
+int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float stepheight);
 void _Movetype_CheckVelocity();
 void _Movetype_CheckWaterTransition(entity ent);
+float _Movetype_CheckWater(entity ent);
 void _Movetype_LinkEdict_TouchAreaGrid();
 void _Movetype_LinkEdict(float touch_triggers);
 float _Movetype_TestEntityPosition(vector ofs);
@@ -60,18 +70,18 @@ float _Movetype_UnstickEntity();
 const int MAX_CLIP_PLANES = 5;
 
 #ifdef CSQC
-const int MOVETYPE_NONE                                = 0;
-const int MOVETYPE_ANGLENOCLIP     = 1;
-const int MOVETYPE_ANGLECLIP       = 2;
-const int MOVETYPE_WALK                                = 3;
-const int MOVETYPE_STEP                                = 4;
-const int MOVETYPE_FLY                         = 5;
-const int MOVETYPE_TOSS                                = 6;
-const int MOVETYPE_PUSH                                = 7;
-const int MOVETYPE_NOCLIP                  = 8;
-const int MOVETYPE_FLYMISSILE      = 9;
-const int MOVETYPE_BOUNCE                  = 10;
-const int MOVETYPE_BOUNCEMISSILE       = 11;   // Like bounce but doesn't lose speed on bouncing
+const int MOVETYPE_NONE             = 0;
+const int MOVETYPE_ANGLENOCLIP      = 1;
+const int MOVETYPE_ANGLECLIP        = 2;
+const int MOVETYPE_WALK             = 3;
+const int MOVETYPE_STEP             = 4;
+const int MOVETYPE_FLY              = 5;
+const int MOVETYPE_TOSS             = 6;
+const int MOVETYPE_PUSH             = 7;
+const int MOVETYPE_NOCLIP           = 8;
+const int MOVETYPE_FLYMISSILE       = 9;
+const int MOVETYPE_BOUNCE           = 10;
+const int MOVETYPE_BOUNCEMISSILE    = 11;  // Like bounce but doesn't lose speed on bouncing
 const int MOVETYPE_FOLLOW           = 12;
 const int MOVETYPE_FLY_WORLDONLY    = 33;