ddnet/src/engine/client
bors[bot] fce6776c38
Merge #4095 #4176
4095: [Concept] Add new mouse state (ingame mouse) r=def- a=Jupeyy

This would remove ui_mousesense and use the desktop cursor position instead for menus and editor
This would also fix the editor cursor to not move faster than in menus.
That's probably how most games would handle menus, instead of using relative mouse mode
And this would work for touch inputs.

The normal gameplay relative mouse is ofc NOT affected by any kind

Opinions?

Missing:
- [x] m_MouseSlow in menus
- [x] Make desktop cursor invisible
- [x] Some components that use ui mouse
- [x] Remove focus in/out relative mouse state changes, fixed with next SDL version


## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] 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)


4176: Entity switch prediction r=def- a=trml

Adds the prediction for pickups and projectiles (based on #4108)

For blinking entities (deactivated by switch) I also used the extended info to make the blinking effect happen client-side. So instead of the server omitting the projectile/pickup from the snapshot every N ticks (which prevented some things like explosive bullets from being predicted correctly), the server will keep sending the item and let the client decide how to show it.

Added doors as well, and changed how they are sent (and rendered) in a similar way (by always sending both endpoints and using a fixed m_StartTick instead of updating it every tick).

An idea was that this could potentially reduce network traffic a bit (in addition to helping with prediction), especially for stationary items that are rarely/never have to be updated (doors and pickups).

This makes CItems::OnRender a bit more complex, and it could perhaps be cleaned up some way (either using something like CProjectileData, or by moving more of the logic into RenderProjectile/Laser/Pickup).

Some things missing:
- Add more entities (draggers, light, gun)
- Entities are not correctly shown when in super (e.g. doors are shown as closed, and should be open)

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] 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: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: trml <trml@users.noreply.github.com>
2021-10-16 16:38:18 +00:00
..
backend Fix text upload call, make invalid calls visible 2021-09-25 01:58:28 +02:00
backend_sdl.cpp Add new mouse state 2021-10-07 16:48:25 +02:00
backend_sdl.h Merge #4095 #4176 2021-10-16 16:38:18 +00:00
blocklist_driver.cpp Add Intel as vendor to the block list on windows 2021-05-06 12:23:40 +02:00
blocklist_driver.h Add Intel as vendor to the block list on windows 2021-05-06 12:23:40 +02:00
client.cpp Add new mouse state 2021-10-07 16:48:25 +02:00
client.h remove missused volatile 2021-10-15 12:15:39 +02:00
demoedit.cpp Run clang-format 2020-09-26 21:50:15 +02:00
demoedit.h Manual preparation for cleaner clang-format 2020-09-26 21:41:01 +02:00
discord.cpp Allow to dynamically load the Discord SDK on Linux 2021-02-01 12:20:11 +01:00
friends.cpp More colors from chat in console 2021-03-08 01:20:28 +01:00
friends.h Port CConfig API from the upstream (0.7.5) 2021-01-10 17:10:19 +03:00
ghost.cpp Add color for non chat(binds, ghost, client, demo) 2021-03-08 18:39:25 +01:00
ghost.h Move ghost code to client 2020-10-14 17:08:58 +02:00
graphics_defines.h Remove GL includes from headers 2021-05-01 23:56:30 +02:00
graphics_threaded.cpp Add new mouse state 2021-10-07 16:48:25 +02:00
graphics_threaded.h Add new mouse state 2021-10-07 16:48:25 +02:00
graphics_threaded_null.h Add new mouse state 2021-10-07 16:48:25 +02:00
http.cpp Add Android build scripts 2021-08-24 12:18:20 +02:00
http.h Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
input.cpp Add new mouse state 2021-10-07 16:48:25 +02:00
input.h Add new mouse state 2021-10-07 16:48:25 +02:00
keynames.h Enable most clang-tidy misc-* checks 2020-11-05 12:03:14 +01:00
notifications.cpp Further fixes for Haiku 2021-09-13 15:29:32 +02:00
notifications.h Libnotify support for linux client (#2099) 2020-04-14 17:53:53 +02:00
serverbrowser.cpp Use #include <> instead of #include "" for non-relative includes 2021-09-13 21:04:21 +02:00
serverbrowser.h Update server list silently 2021-09-13 16:50:40 +02:00
serverbrowser_http.cpp Add STATE_NO_MASTER 2021-08-16 18:27:43 +02:00
serverbrowser_http.h Save previously determined best serverlist 2021-05-14 01:01:09 +02:00
serverbrowser_ping_cache.cpp Add forgotten commit data from #3772 2021-05-27 21:48:04 +02:00
serverbrowser_ping_cache.h Add serverbrowser ping cache 2021-05-14 01:00:41 +02:00
sound.cpp fix style 2021-10-15 12:17:14 +02:00
sound.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
sqlite.cpp Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
steam.cpp Support ipv6 2021-05-05 17:32:37 +02:00
text.cpp Merge #4157 2021-10-06 15:16:00 +00:00
updater.cpp Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
updater.h Remove Windows XP code 2021-08-23 12:05:01 +02:00
video.cpp uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
video.h uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00