Skip to content

Commit

Permalink
Fixed|Server|All Games: Spurious warnings re unknown "resetctlaccum" …
Browse files Browse the repository at this point in the history
…command
  • Loading branch information
danij-deng committed Jan 29, 2015
1 parent caa6df5 commit 0fd3a34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 6 additions & 1 deletion doomsday/plugins/common/include/g_controls.h
Expand Up @@ -150,7 +150,12 @@ void G_ControlRegister(void);
void G_DefineControls(void);
void G_DefaultBindings(void);
void G_RegisterBindClasses(void);
void G_ControlReset(int pnum);

/**
* Reset controls for all local players.
*/
void G_ControlReset(void);

float G_GetLookOffset(int pnum);
void G_ResetLookOffset(int pnum);

Expand Down
10 changes: 2 additions & 8 deletions doomsday/plugins/common/src/g_controls.c
Expand Up @@ -1092,15 +1092,9 @@ static void G_UpdateCmdControls(ticcmd_t *cmd, int pnum,
}
#endif

/**
* Clear all controls for the given player.
*
* @param player Player number of whose controls to reset. If
* negative; clear ALL player's controls.
*/
void G_ControlReset(int player)
void G_ControlReset(void)
{
DD_Execute(true, "resetctlaccum");
if(IS_CLIENT) DD_Execute(true, "resetctlaccum");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/g_game.cpp
Expand Up @@ -1093,8 +1093,8 @@ void G_BeginMap()
R_ResizeViewWindow(RWF_FORCE|RWF_NO_LERP);
}

// Clear all controls for all local players.
G_ControlReset(-1);
// Reset controls for all local players.
G_ControlReset();

// Time can now progress in this map.
mapTime = actualMapTime = 0;
Expand Down

0 comments on commit 0fd3a34

Please sign in to comment.