Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Possibility of key press and mouse movements being added? #42

Open
Crayder opened this issue Nov 16, 2015 · 1 comment
Open

Possibility of key press and mouse movements being added? #42

Crayder opened this issue Nov 16, 2015 · 1 comment

Comments

@Crayder
Copy link

Crayder commented Nov 16, 2015

Key Presses

A list of generally used keys would be scanned using GetKeyState and when their state changes call a pawn callback. (Obviously this would be much like OnPlayerKeyStateChange, but without the bitmask of keys.)

Mouse Movement

The mouse position would be repeatedly checked (every 20-50 ms if enabled?) when the mouse is enabled. When it is changed call a pawn callback. OnPlayerClick would still be called on clicks alongside this.

@Southclaws
Copy link

I think it would be better to register a set of keys to monitor, send that to the client when they connect so the client side only sends updates for those keys. This way, large servers can ensure no data is wasted (maybe even allow changing of this key set in runtime so if a player transitions to a state where they no longer need to use a certain key, that key is never sent (such as a different sub-gamemode or mission)).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants