Closed wrefgtzweve closed 3 weeks ago
At what point do you not have access to a player object, but have access to CUserCmd?
The angles are provided for you via https://wiki.facepunch.com/gmod/Player:GetAimVector
The UserCmd:GetWorldClicking var is not set during CreateMove, it will always be false. It is set just after that hook is called.
Details
Currently
Player:IsWorldClicking()
exists but it requires getting the player entity and you wont be able to get the angle. Having a direct way of getting these from usercmds would allow for some simpler checks/logic for those who usePlayer:IsWorldClicking
. It's internally already stored inside the usercmd so it should be rather easy to implement.For reference, i know this issue exists https://github.com/Facepunch/garrysmod-requests/issues/2111 but the issue regarding not being able to get the angle wasn't answer so i figured i'd open an issue for it alongside a direct usercmd implementation.
Player:IsWorldClicking()
also seems to be inconsistent compared to getting it directly from the usercmd Example:cmd:GetWorldClicking()
is a feature added by a DLL, as you can see it somehow returns true despite it not being set at that moment.