mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-25 05:11:03 +00:00
Fix analog movement being eaten with anub move
This commit is contained in:
parent
18c95d3c0e
commit
dce67b8ea1
1 changed files with 5 additions and 16 deletions
|
@ -327,27 +327,13 @@ void SV_AirMove (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
vec3_t wishvel;
|
vec3_t wishvel;
|
||||||
float fmove, smove, newmove;
|
float fmove, smove;
|
||||||
|
|
||||||
AngleVectors (sv_player->v.angles, forward, right, up);
|
AngleVectors (sv_player->v.angles, forward, right, up);
|
||||||
|
|
||||||
fmove = cmd.forwardmove;
|
fmove = cmd.forwardmove;
|
||||||
smove = cmd.sidemove;
|
smove = cmd.sidemove;
|
||||||
|
|
||||||
if (fmove != 0 && smove != 0)
|
|
||||||
{
|
|
||||||
newmove = sqrt(pow(fmove, 2)/2);
|
|
||||||
|
|
||||||
if (fmove < 0)
|
|
||||||
fmove = newmove*-1;
|
|
||||||
else
|
|
||||||
fmove = newmove;
|
|
||||||
|
|
||||||
if (smove < 0)
|
|
||||||
smove = newmove*-1;
|
|
||||||
else
|
|
||||||
smove = newmove;
|
|
||||||
}
|
|
||||||
// hack to not let you back into teleporter
|
// hack to not let you back into teleporter
|
||||||
if (sv.time < sv_player->v.teleport_time && fmove < 0)
|
if (sv.time < sv_player->v.teleport_time && fmove < 0)
|
||||||
fmove = 0;
|
fmove = 0;
|
||||||
|
@ -398,7 +384,10 @@ void SV_ClientThink (void)
|
||||||
if (sv_player->v.movetype == MOVETYPE_NONE)
|
if (sv_player->v.movetype == MOVETYPE_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
onground = (int)sv_player->v.flags & FL_ONGROUND;
|
if ((int)sv_player->v.flags & FL_ONGROUND)
|
||||||
|
onground = qtrue;
|
||||||
|
else
|
||||||
|
onground = qfalse;
|
||||||
|
|
||||||
origin = sv_player->v.origin;
|
origin = sv_player->v.origin;
|
||||||
velocity = sv_player->v.velocity;
|
velocity = sv_player->v.velocity;
|
||||||
|
|
Loading…
Reference in a new issue