{"action":"created","issue":{"url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/1998","labels_url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/1998/labels{/name}","comments_url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/1998/comments","events_url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/1998/events","html_url":"https://github.com/Facepunch/garrysmod-issues/issues/1998","id":72080978,"number":1998,"title":"Bugginess with pose parameters","user":{"login":"theJ8910","id":7379724,"avatar_url":"https://avatars.githubusercontent.com/u/7379724?v=3","gravatar_id":"","url":"https://api.github.com/users/theJ8910","html_url":"https://github.com/theJ8910","followers_url":"https://api.github.com/users/theJ8910/followers","following_url":"https://api.github.com/users/theJ8910/following{/other_user}","gists_url":"https://api.github.com/users/theJ8910/gists{/gist_id}","starred_url":"https://api.github.com/users/theJ8910/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theJ8910/subscriptions","organizations_url":"https://api.github.com/users/theJ8910/orgs","repos_url":"https://api.github.com/users/theJ8910/repos","events_url":"https://api.github.com/users/theJ8910/events{/privacy}","received_events_url":"https://api.github.com/users/theJ8910/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-30T06:57:41Z","updated_at":"2015-05-01T11:23:00Z","closed_at":"2015-04-30T08:38:52Z","body":"I'm creating a scripted entity that uses \"models/combine_turrets/floor_turret.mdl\" as its model.\r\nInside of its Think hook, I am running self:SetPoseParameter( \"aim_yaw\", x ), where x is a number between -60 and 60. Calling turret:GetPoseParameter( \"aim_yaw\" ) on the server returns x as expected, but on the client this returns y (where y = ( x - min ) / ( max - min )), a value between 0 and 1.\r\n\r\nI've also noticed if the pose parameter isn't set every frame, when I attempt to move the turret with the physgun or clip out of the bounds of the map, the pose parameters change clientside to a different value for seemingly no reason."},"comment":{"url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/comments/98105057","html_url":"https://github.com/Facepunch/garrysmod-issues/issues/1998#issuecomment-98105057","issue_url":"https://api.github.com/repos/Facepunch/garrysmod-issues/issues/1998","id":98105057,"user":{"login":"theJ8910","id":7379724,"avatar_url":"https://avatars.githubusercontent.com/u/7379724?v=3","gravatar_id":"","url":"https://api.github.com/users/theJ8910","html_url":"https://github.com/theJ8910","followers_url":"https://api.github.com/users/theJ8910/followers","following_url":"https://api.github.com/users/theJ8910/following{/other_user}","gists_url":"https://api.github.com/users/theJ8910/gists{/gist_id}","starred_url":"https://api.github.com/users/theJ8910/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theJ8910/subscriptions","organizations_url":"https://api.github.com/users/theJ8910/orgs","repos_url":"https://api.github.com/users/theJ8910/repos","events_url":"https://api.github.com/users/theJ8910/events{/privacy}","received_events_url":"https://api.github.com/users/theJ8910/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T11:23:00Z","updated_at":"2015-05-01T11:23:00Z","body":"@Nyaaaa Typically the way things work in Source, the server acts an authority on important things such as entity states (which include things related to animation like pose parameters) and synchronizes values that have changed to all clients who can \"see\" the entity (which is determined by the engine based on the entity's configuration, whether or not it is in the player's PVS, etc) each tick.\r\n\r\nBecause of latency and other factors, however, these updates may be delayed or occur at irregular intervals. To compensate for this, clients predict what is going to happen on the server, typically by running the same code the server is running.\r\n\r\nAs long as both the client and server share the same state and are running the same deterministic code, the client's simulation should be perfectly in sync with the server's simulation. In that case, why not just run it entirely on the client? That's possible, but what happens when you throw player inputs into the mix? For example, lets say your entity is using full clientside simulation, and if you use, it causes it to start animating. If you were the person who used the entity, it would start animating immediately for you, but at a later time for everyone else on the server as news that you had used the entity reached them. In other words, you would desync. The server acts as an authority to correct desynchronizations, in this sense.\r\n\r\n@robotboy655 There's still the issue of self:GetPoseParameter() returning different values on the client and server. If you do self:SetPoseParameter( \"aim_yaw\", 30 ) on either the client or server, it behaves as expected. If you follow that up with print( self:GetPoseParameter( \"aim_yaw\" ) ) on the server, it returns \"30\" as expected, but on the client this will return 0.75 instead (it's always a number between 0 and 1). How is this inconsistent behavior not a bug?"}}