garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

Change CUserCmd.impulse to int and increase number of bits written/read to 32

Open LeQuackers opened this issue 4 years ago • 2 comments

As the title says. Using CUserCmd:SetImpulse/impulse num for sending player input is nice because it's generated by the client and predicted. The only problem with it is that you're limited to sending a single byte of information, of which some of the possible values are already reserved by Valve and other addons. Increasing it's size would greatly mitigate this and allow more flexibility with user input.

https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/usercmd.h#L154 https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/usercmd.cpp#L122 https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/usercmd.cpp#L266

LeQuackers avatar Nov 07 '20 13:11 LeQuackers