CKeyQueue is used to introduce a certain amount of negative or positive lag to keystrokes.
More...
#include <Game.h>
List of all members.
Detailed Description
CKeyQueue is used to introduce a certain amount of negative or positive lag to keystrokes.
The keys are sent to the backend and the remote site set to a future time. The time is measured in the backend's game ticks. So if the current key is pressed at game time 80, and enqueued to game time 90, there will be an artificial lag of 10 game ticks.
The actual length of game ticks depends on the game speed (set in the menu), for a normal game its 1000/80 = 12.5 ms. This artificial lag is useful for network games.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
void CKeyQueue::DequeueKeys |
( |
int |
a_iToTime |
) |
|
|
void CKeyQueue::EnqueueKey |
( |
int |
a_iAtTime, |
|
|
int |
a_iPlayer, |
|
|
int |
a_iKey, |
|
|
bool |
a_bDown |
|
) |
|
|
void CKeyQueue::Reset |
( |
|
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following files: