ddnet/src
bors[bot] 8d17670c67
Merge #6082
6082: Fix incorrect cursor position after exiting pause/spec r=def- a=Robyt3

The cursor position was not correctly restored when exiting pause or spec, when the mouse was on the left side of the tee (x being negative).

This is caused by a calculation introduced in #1637 and #1830 that tries to ensure that the mouse can still be moved if it ends up inside the minimum mouse distance (`cl_mouse_min_distance` and `cl_dyncam_min_distance`). However, this did not consider that the x position can become negative, so the x position was also incorrectly changed when exiting pause.

This is fixed by reverting the changes, as this code has become obsolete and has been superseded by #2009 and #3884. The `CControls::ClampMousePos` function, which is called directly after restoring the position, already ensures that mouse is not stuck within the minimum mouse distance.

Closes #2591.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [X] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-12-03 22:39:20 +00:00
..
android Add tests for overloaded hash operators, use operator instead 2022-11-12 20:36:38 +01:00
antibot Merge pull request #3961 from fokkonaut/pr-antibot 2021-12-19 19:33:56 +01:00
base Remove internal utf8 confusable functions from system.h 2022-11-12 20:56:35 +01:00
engine Fix client crash when launching with screenshot command 2022-11-29 23:08:52 +01:00
game Merge #6082 2022-12-03 22:39:20 +00:00
macos Huge variable naming format 2022-07-08 18:01:29 +02:00
mastersrv Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
rust-bridge Fix being run from rust-analyzer with a clean environment 2022-11-09 15:09:42 +01:00
steam Huge variable naming format 2022-07-08 18:01:29 +02:00
test Add tests for str_utf8_to_skeleton 2022-11-12 20:36:39 +01:00
tools Fix misspellings 2022-10-25 13:51:56 -03:00