server-beta icon indicating copy to clipboard operation
server-beta copied to clipboard

IsPlayerUsingGamepad as built-in native

Open NexiusTailer opened this issue 2 years ago • 2 comments

Would be great to add a native like IsPlayerUsingGamepad or IsPlayerUsingJoypad as built-in native to detect if player keys have anything than 0 or |128| in up/down and left/right states (example of implementation). This will help adapting in-game control tips for players from android or real gamepads and make other gameplay improvements for mobile-only servers.

The propose was considered relevant since another native IsPlayerUsingOfficialClient was added recently.

NexiusTailer avatar Jan 17 '23 16:01 NexiusTailer

If we talk about gamepads, it's better to add more natives. Like for getting info about device: xinput or sony and etc...

Disinterpreter avatar Jan 17 '23 16:01 Disinterpreter

Like for getting info about device: xinput or sony and etc...

Well I doubt it's possible without client changes in near future. Checking keys sync parameter for intermediate values (which is a thing for gamepad sticks but not for keyboard keys) can be done even now as the key values (up/down/left/right) are already passed in every main synchronization.

NexiusTailer avatar Jan 17 '23 16:01 NexiusTailer