source-sdk-2013
source-sdk-2013 copied to clipboard
game_controls: Fix model panels setting wrong mouse cursor position after manipulation
Description
This PR adds a check to CBaseModelPanel::OnMouseReleased to only restore cursor position when the panel is capturing the mouse.
This caused an issue where if the mouse was released when the press wasn't started on the model panel it caused the mouse cursor to warp to a wrong position, that either being: a) garbage memory caused by m_nClickStartX and m_nClickStartY not being initialized b) the position of where the panel was clicked on the last time
Demonstration video of the issue (had to make the cursor very large because otherwise Shadowplay wouldn't render it into the video (?)):
You are on fire with these!!