ddnet/src/engine/shared
bors[bot] 47874fb57f
Merge #5085
5085: New DDRace HUD r=def- a=C0D3D3V

If you want to test this PR, you have to test it on a Server that includes this PR too.

Textures are made by Ravie 

Here a showcase video with most parts shown: https://youtu.be/gPTVj-s3pgc 

Added to the new HUD
- A display of the weapons available to the player
- The weapon the player is carrying is highlighted
- Indicators for the special abilities of the player (Endless Hook, Endless Jumps, Jetpack, Teleport Weapons)
- Indicators for abilities taken away from the player (Deep/Life Freeze, No Hook, No Weapons collision, No Collision)
- Control indicators for dummy controls (dummy hammer, dummy copy) (bottom right)
- Jump indicator (max 10 jumps ar displayed, and greyed out as soon as a jump is used) 
- Ninja status bar that indicates how long a player is capable of using ninja (next to the ninja sword)
- Freeze status bar that indicates the thawing time of a player (below player)
- Movement Information can be displayed in a clean way above the mini score HUD (Position, Speed, Target Angle)
- Indicator if you are in practice mode

The complete HUD also works for players you spectate

I Added a new NetObj since the predicted values are not perfect and would make the display of the information a lot less good: DDNetCharacterDisplayInfo that contains the following information
```
NetIntRange("m_JumpedTotal", -2, 255),
NetTick("m_NinjaActivationTick"),
NetTick("m_FreezeTick"),
NetBool("m_IsInFreeze"),
NetBool("m_IsInPracticeMode"),

NetIntAny("m_TargetX"),  # used for the Movement Information display
NetIntAny("m_TargetY"),
NetIntAny("m_RampValue"),
```
So if someone has an idea what data we could also need in the client for making the display more nice, now is the right moment to add more data to this network object.

A few screenshots:
Assets Tab:
![grafik](https://user-images.githubusercontent.com/14315968/167703792-f0fa86be-159d-4e11-baf4-9539cee38aae.png)
HUD Settings:
![grafik](https://user-images.githubusercontent.com/14315968/167704336-dc7a314e-5603-40a2-98b4-9c03377906dd.png)
Mini Debug HUD:
![grafik](https://user-images.githubusercontent.com/14315968/168302791-c377d93e-33a2-4eb2-9d8d-b78f0808a009.png)
Speed.X is calculated using the players ramp vaule


## Checklist

- [x] Tested the change ingame
- [x] 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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-05-16 22:23:08 +00:00
..
assertion_logger.cpp Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
assertion_logger.h Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
compression.cpp Use std::size instead of sizeof(a) / sizeof(a[0]) 2022-03-30 18:55:04 +02:00
compression.h Add size checks to CVariableInt::Pack and ::Unpack 2022-03-05 20:49:55 +01:00
config.cpp Sync the config file replacement to disk before renaming 2022-02-01 02:33:20 +01:00
config.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
config_variables.h Merge branch 'master' into New_HUD 2022-05-10 19:03:09 +02:00
console.cpp Show "No such command" and "Invalid arguments" 2022-05-15 13:37:30 +02:00
console.h Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
csv.cpp Add a simple CSV writer for Python's "excel" csv dialect 2020-06-23 09:11:59 +02:00
csv.h Fix some variable name's style 2020-11-08 17:15:48 +01:00
datafile.cpp Remove some useless conditions around free 2022-03-01 23:19:49 +01:00
datafile.h Fix duplicate uuid index in maps edited by tools 2021-05-03 12:02:18 +02:00
demo.cpp Remove a couple of game/-includes from the engine code 2022-05-13 09:04:39 +02:00
demo.h Remove unnecessary trailing semicolons after method declarations 2022-03-08 20:01:26 +01:00
econ.cpp Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
econ.h Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
engine.cpp Unify logging infrastructure between IConsole and dbg_msg 2022-04-29 15:21:26 +02:00
fifo.cpp Fix clang-format 2022-02-15 00:32:04 +01:00
fifo.h Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
filecollection.cpp Add more readability checks 2022-01-22 17:45:25 +01:00
filecollection.h Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
global_uuid_manager.cpp Move teehistorian UUIDs into engine 2018-01-11 16:01:13 +01:00
http.cpp Add @Learath2's suggestion about buffer size handling 2022-05-13 13:57:35 +02:00
http.h Add HTTP header and plain HTTP post feature 2022-05-13 09:16:15 +02:00
huffman.cpp Move declaration of loop variable 2022-04-02 13:35:24 +02:00
huffman.h Mark CHuffman::Compress and ::Decompress as const 2022-04-02 13:35:24 +02:00
image_manipulation.cpp Update missing file from dilate 2021-02-13 14:04:42 +01:00
image_manipulation.h Enable readability-inconsistent-declaration-parameter-name 2022-01-22 14:12:59 +01:00
jobs.cpp Allow more precise Destroy call to Job pool 2022-03-12 13:52:13 +01:00
jobs.h Allow more precise Destroy call to Job pool 2022-03-12 13:52:13 +01:00
json.cpp Run clang-format 2020-09-26 21:50:15 +02:00
json.h Run clang-format 2020-09-26 21:50:15 +02:00
kernel.cpp Fix some variable name's style 2020-11-08 17:15:48 +01:00
linereader.cpp Add modernize-use-bool-literals 2022-02-15 00:12:52 +01:00
linereader.h Don't access out of bounds in linereader (fixes #4308) 2021-11-07 01:10:34 +01:00
map.cpp Fix clang-format 2022-02-15 00:32:04 +01:00
map.h Add menu background map 2020-09-23 23:38:28 +02:00
masterserver.cpp Add modernize-deprecated-headers 2022-02-15 00:22:52 +01:00
memheap.cpp Add CHeap::StoreString method 2022-05-06 23:21:26 +02:00
memheap.h Add CHeap::StoreString method 2022-05-06 23:21:26 +02:00
netban.cpp Enable -Wshadow=local 2022-03-20 13:24:34 +01:00
netban.h Enable readability-inconsistent-declaration-parameter-name 2022-01-22 14:12:59 +01:00
network.cpp Added external linkage instead of static const 2022-04-03 01:12:27 +02:00
network.h Added external linkage instead of static const 2022-04-03 01:12:27 +02:00
network_client.cpp Close sockets 2022-04-14 11:50:10 +02:00
network_conn.cpp Add modernize-use-bool-literals 2022-02-15 00:12:52 +01:00
network_console.cpp Remove unused Flags argument in network code 2022-03-04 19:33:06 +01:00
network_console_conn.cpp Move NETSOCKET behind a pointer so it can grow 2022-03-04 19:33:06 +01:00
network_server.cpp Close sockets 2022-04-14 11:50:10 +02:00
packer.cpp Add size checks to CVariableInt::Pack and ::Unpack 2022-03-05 20:49:55 +01:00
packer.h Run clang-format 2020-09-26 21:50:15 +02:00
protocol.h make spectators team independent 2022-03-14 13:25:47 +01:00
protocol_ex.cpp Run clang-format 2020-09-26 21:50:15 +02:00
protocol_ex.h Only use configured prediction margin on servers with predictable/synced weapon input 2022-01-11 01:30:05 +01:00
protocol_ex_msgs.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
ringbuffer.cpp Add modernize-use-bool-literals 2022-02-15 00:12:52 +01:00
ringbuffer.h Fix some variable name's style 2020-11-08 17:15:48 +01:00
serverinfo.cpp Remove a couple of game/-includes from the engine code 2022-05-13 09:04:39 +02:00
serverinfo.h Support 128 players in serverbrowser 2022-01-02 13:41:59 +01:00
snapshot.cpp Add size checks to CVariableInt::Pack and ::Unpack 2022-03-05 20:49:55 +01:00
snapshot.h Remove unnecessary trailing semicolons after method declarations 2022-03-08 20:01:26 +01:00
storage.cpp Merge branch 'master' into New_HUD 2022-05-10 19:03:09 +02:00
teehistorian_ex.cpp Run clang-format 2020-09-26 21:50:15 +02:00
teehistorian_ex.h Run clang-format 2020-09-26 21:50:15 +02:00
teehistorian_ex_chunks.h Record player_ready event in teehistorian 2022-02-07 23:31:46 +01:00
uuid_manager.cpp Add modernize-deprecated-headers 2022-02-15 00:22:52 +01:00
uuid_manager.h Allow ParseUuid to report errors and add tests 2021-01-23 01:21:20 +01:00
video.cpp uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
video.h Multithreaded video rendering 2022-03-20 18:03:33 +01:00
websockets.cpp Convert char array to string 2022-03-26 18:31:32 -03:00
websockets.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00