#include "movetypes.qh"
-#include "../player.qh"
-
-#if defined(CSQC)
- #include <client/defs.qh>
- #include <common/stats.qh>
- #include <common/util.qh>
- #include <lib/csqcmodel/common.qh>
- #include <common/t_items.qh>
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include <server/autocvars.qh>
-#endif
#ifdef SVQC
void set_movetype(entity this, int mt)
vector planes[MAX_CLIP_PLANES];
int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight) // SV_FlyMove
{
- int blocked = 0, bumpcount;
+ int blocked = 0;
int i, j, numplanes = 0;
float time_left = dt, grav = 0;
vector push;
original_velocity = primal_velocity = restore_velocity = this.velocity;
- for(bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
+ for(int bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
{
if(this.velocity == '0 0 0')
break;
break;
}
float trace2_fraction = trace_fraction;
- steppush = '0 0 1' * (org_z - this.origin_z);
+ steppush = '0 0 1' * (org.z - this.origin_z);
_Movetype_PushEntity(this, steppush, true);
if(trace_startsolid)
{
}
// accept the new position if it made some progress...
- if(fabs(this.origin_x - org_x) >= 0.03125 || fabs(this.origin_y - org_y) >= 0.03125)
+ if(fabs(this.origin_x - org.x) >= 0.03125 || fabs(this.origin_y - org.y) >= 0.03125)
{
trace_endpos = this.origin;
time_left *= 1 - trace2_fraction;
#define SET_ONSLICK(s) ((s).flags |= FL_ONSLICK)
#define UNSET_ONSLICK(s) ((s).flags &= ~FL_ONSLICK)
+#define GAMEPLAYFIX_DOWNTRACEONGROUND(s) STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
+#define GAMEPLAYFIX_EASIERWATERJUMP(s) STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
+#define GAMEPLAYFIX_STEPDOWN(s) STAT(GAMEPLAYFIX_STEPDOWN, s)
+#define GAMEPLAYFIX_STEPMULTIPLETIMES(s) STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
+#define GAMEPLAYFIX_UNSTICKPLAYERS(s) STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
+#define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION, s)
+
#ifdef CSQC
.float bouncestop;
.float bouncefactor;
#define BUFFS_STAT(s) STAT(BUFFS, s)
-#define GAMEPLAYFIX_DOWNTRACEONGROUND(s) STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
-#define GAMEPLAYFIX_EASIERWATERJUMP(s) STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
-#define GAMEPLAYFIX_STEPDOWN(s) STAT(GAMEPLAYFIX_STEPDOWN, s)
-#define GAMEPLAYFIX_STEPMULTIPLETIMES(s) STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
-#define GAMEPLAYFIX_UNSTICKPLAYERS(s) STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
-#define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION, s)
-
#define PHYS_ACCELERATE(s) STAT(MOVEVARS_ACCELERATE, s)
#define PHYS_AIRACCELERATE(s) STAT(MOVEVARS_AIRACCELERATE, s)
#define PHYS_AIRACCEL_QW(s) STAT(MOVEVARS_AIRACCEL_QW, s)