Skip to content

Commit

Permalink
Fix test controls mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeday0 committed Jun 25, 2024
1 parent 7cba6c1 commit 89b5bf2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/doom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,15 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
if (strafe && !cmd->angleturn)
side += CarryMouseSide(CalcMouseSide(mousex));

if (mousex == 0)
mousex_angleturn = cmd->angleturn;

if (mousex_angleturn == 0)
{
// No movement in the previous frame

testcontrols_mousespeed = 0;
}

mousex_angleturn = cmd->angleturn;

if (angle)
{
cmd->angleturn = CarryAngle(cmd->angleturn + angle);
Expand Down
6 changes: 3 additions & 3 deletions src/heretic/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,13 +892,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic)

// No mouse movement in previous frame?

if (mousex == 0)
mousex_angleturn = cmd->angleturn;

if (mousex_angleturn == 0)
{
testcontrols_mousespeed = 0;
}

mousex_angleturn = cmd->angleturn;

if (angle)
{
cmd->angleturn = CarryAngle(cmd->angleturn + angle);
Expand Down
6 changes: 3 additions & 3 deletions src/hexen/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic)
side += CarryMouseSide(CalcMouseSide(mousex));
}

if (mousex == 0)
mousex_angleturn = cmd->angleturn;

if (mousex_angleturn == 0)
{
testcontrols_mousespeed = 0;
}

mousex_angleturn = cmd->angleturn;

if (angle)
{
cmd->angleturn = CarryAngle(cmd->angleturn + angle);
Expand Down
6 changes: 3 additions & 3 deletions src/strife/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,15 +862,15 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
if (strafe && !cmd->angleturn)
side += CarryMouseSide(CalcMouseSide(mousex));

if (mousex == 0)
mousex_angleturn = cmd->angleturn;

if (mousex_angleturn == 0)
{
// No movement in the previous frame

testcontrols_mousespeed = 0;
}

mousex_angleturn = cmd->angleturn;

if (angle)
{
cmd->angleturn = CarryAngle(cmd->angleturn + angle);
Expand Down

0 comments on commit 89b5bf2

Please sign in to comment.