Commit graph

8120 commits

Author SHA1 Message Date
c0d3d3v bd9a04b1d2
fix HUD assets Tab 2022-05-20 17:35:22 +02:00
heinrich5991 6b65ccb945 Add HTTP masterserver registering and HTTP masterserver
Registering
-----------

The idea is that game servers push their server info to the
masterservers every 15 seconds or when the server info changes, but not
more than once per second.

The game servers do not support the old registering protocol anymore,
the backward compatibility is handled by the masterserver.

The register call is a HTTP POST to a URL like
`https://master1.ddnet.tw/ddnet/15/register` and looks like this:
```json
POST /ddnet/15/register HTTP/1.1
Address: tw-0.6+udp://connecting-address.invalid:8303
Secret: 81fa3955-6f83-4290-818d-31c0906b1118
Challenge-Secret: 81fa3955-6f83-4290-818d-31c0906b1118:tw0.6/ipv6
Info-Serial: 0

{
	"max_clients": 64,
	"max_players": 64,
	"passworded": false,
	"game_type": "TestDDraceNetwork",
	"name": "My DDNet server",
	"map": {
		"name": "dm1",
		"sha256": "0b0c481d77519c32fbe85624ef16ec0fa9991aec7367ad538bd280f28d8c26cf",
		"size": 5805
	},
	"version": "0.6.4, 16.0.3",
	"clients": []
}
```

The `Address` header declares that the server wants to register itself as
a `tw-0.6+udp` server, i.e. a server speaking a Teeworlds-0.6-compatible
protocol.

The free-form `Secret` header is used as a server identity, the server
list will be deduplicated via this secret.

The free-form `Challenge-Secret` is sent back via UDP for a port forward
check.  This might have security implications as the masterserver can be
asked to send a UDP packet containing some user-controlled bytes. This
is somewhat mitigated by the fact that it can only go to an
attacker-controlled IP address.

The `Info-Serial` header is an integer field that should increase each
time the server info (in the body) changes. The masterserver uses that
field to ensure that it doesn't use old server infos.

The body is a free-form JSON object set by the game server. It should
contain certain keys in the correct form to be accepted by clients. The
body is optional if the masterserver already confirmed the reception of
the info with the given `Info-Serial`.

Not shown in this payload is the `Connless-Token` header that is used
for Teeworlds 0.7 style communication.

Also not shown is the `Challenge-Token` that should be included once the
server receives the challenge token via UDP.

The masterserver responds with a `200 OK` with a body like this:

```
{"status":"success"}
```

The `status` field can be `success` if the server was successfully
registered on the masterserver, `need_challenge` if the masterserver
wants the correct `Challenge-Token` header before the register process
is successful, `need_info` if the server sent an empty body but the
masterserver doesn't actually know the server info.

It can also be `error` if the request was malformed, only in this case
an HTTP status code except `200 OK` is sent.

Synchronization
---------------

The masterserver keeps state and outputs JSON files every second.

```json
{
	"servers": [
		{
			"addresses": [
				"tw-0.6+udp://127.0.0.1:8303",
				"tw-0.6+udp://[::1]:8303"
			],
			"info_serial": 0,
			"info": {
				"max_clients": 64,
				"max_players": 64,
				"passworded": false,
				"game_type": "TestDDraceNetwork",
				"name": "My DDNet server",
				"map": {
					"name": "dm1",
					"sha256": "0b0c481d77519c32fbe85624ef16ec0fa9991aec7367ad538bd280f28d8c26cf",
					"size": 5805
				},
				"version": "0.6.4, 16.0.3",
				"clients": []
			}
		}
	]
}
```

`servers.json` (or configured by `--out`) is a server list that is
compatible with DDNet 15.5+ clients. It is a JSON object containing a
single key `servers` with a list of game servers. Each game server is
represented by a JSON object with an `addresses` key containing a list
of all known addresses of the server and an `info` key containing the
free-form server info sent by the game server. The free-form `info` JSON
object re-encoded by the master server and thus canonicalized and
stripped of any whitespace characters outside strings.

```json
{
	"kind": "mastersrv",
	"now": 1816002,
	"secrets": {
		"tw-0.6+udp://127.0.0.1:8303": {
			"ping_time": 1811999,
			"secret": "42d8f991-f2fa-46e5-a9ae-ebcc93846feb"
		},
		"tw-0.6+udp://[::1]:8303": {
			"ping_time": 1811999,
			"secret": "42d8f991-f2fa-46e5-a9ae-ebcc93846feb"
		}
	},
	"servers": {
		"42d8f991-f2fa-46e5-a9ae-ebcc93846feb": {
			"info_serial": 0,
			"info": {
				"max_clients": 64,
				"max_players": 64,
				"passworded": false,
				"game_type": "TestDDraceNetwork",
				"name": "My DDNet server",
				"map": {
					"name": "dm1",
					"sha256": "0b0c481d77519c32fbe85624ef16ec0fa9991aec7367ad538bd280f28d8c26cf",
					"size": 5805
				},
				"version": "0.6.4, 16.0.3",
				"clients": []
			}
		}
	}
}
```

`--write-dump` outputs a JSON file compatible with `--read-dump-dir`,
this can be used to synchronize servers across different masterservers.
`--read-dump-dir` is also used to ingest servers from the backward
compatibility layer that pings each server for their server info using
the old protocol.

The `kind` field describe that this is `mastersrv` output and not from a
`backcompat`. This is used for prioritizing `mastersrv` information over
`backcompat` information.

The `now` field contains an integer describing the current time in
milliseconds relative an unspecified epoch that is fixed for each JSON
file. This is done instead of using the current time as the epoch for
better compression of non-changing data.

`secrets` is a map from each server address and to a JSON object
containing the last ping time (`ping_time`) in milliseconds relative to
the same epoch as before, and the server secret (`secret`) that is used
to unify server infos from different addresses of the same logical
server.

`servers` is a map from the aforementioned `secret`s to the
corresponding `info_serial` and `info`.

```json
[
	"tw-0.6+udp://127.0.0.1:8303",
	"tw-0.6+udp://[::1]:8303"
]
```

`--write-addresses` outputs a JSON file containing all addresses
corresponding to servers that are registered to HTTP masterservers. It
does not contain the servers that are obtained via backward
compatibility measures.

This file can be used by an old-style masterserver to also list
new-style servers without the game servers having to register there.

An implementation of this can be found at
https://github.com/heinrich5991/teeworlds/tree/mastersrv_6_backcompat
for Teeworlds 0.5/0.6 masterservers and at
https://github.com/heinrich5991/teeworlds/tree/mastersrv_7_backcompat
for Teeworlds 0.7 masterservers.

All these JSON files can be sent over the network in an efficient way
using https://github.com/heinrich5991/twmaster-collect. It establishes a
zstd-compressed TCP connection authenticated by a string token that is
sent in plain-text. It watches the specified file and transmits it every
time it changes. Due to the zstd-compression, the data sent over the
network is similar to the size of a diff.

Implementation
--------------

The masterserver implementation was done in Rust.

The current gameserver register implementation doesn't support more than
one masterserver for registering.
2022-05-20 08:58:32 +02:00
bors[bot] 8b31dbb108
Merge #5155
5155: Remove cl_show_console and -c / --console command line options, attach to existing console r=heinrich5991 a=Robyt3

Alternative to #5154. 

Closes #5150.

If you want to open the client with a console window, instead create a new shortcut with the following target:

```
cmd /c "C:\path\to\your\DDNet.exe"
```

You can change the icon of the shortcut to the DDNet icon in the properties of the shortcut file.

## 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)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-05-20 06:49:41 +00:00
bors[bot] 0fbfcad242
Merge #5153
5153: keep input if chat is closed r=heinrich5991 a=C0D3D3V

fixes #4653

## 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
- [x] Considered possible null pointers and out of bounds array indexing
- [?] 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>
2022-05-20 06:32:44 +00:00
Dennis Felsing 7e5049e656 Version 16.1 2022-05-20 01:26:17 +02:00
c0d3d3v f5ff227561
fix inputs on vanilla server if chat is open 2022-05-19 23:18:14 +02:00
Robert Müller 2ebaa76194 Remove cl_show_console and -c / --console cmdline options 2022-05-19 21:24:19 +02:00
c0d3d3v 789d7d81fc
keep input if chat is closed 2022-05-19 19:50:51 +02:00
def f278399bd1 Ellipsis at end in scoreboard and hud 2022-05-18 23:46:11 +02:00
Jupeyy 3c597aff95 Switch to nanoseconds 2022-05-18 18:05:41 +02:00
bors[bot] 53d77e86b2
Merge #5119
5119: Use STUN to determine UDP connectivity and show diagnostics r=def- a=heinrich5991

These diagnostics are supposed to guide the user to problem resolution.
They're displayed if no packet is received from the server within one
second of connecting.

No message if we don't have STUN servers.

"Trying to determine UDP connectivity..." if no answer has been received
from the STUN server yet and it hasn't timed out yet.

"UDP seems to be filtered." if the STUN request has timed out.

"UDP and TCP IP addresses seem to be different. Try disabling VPN,
proxy or network accelerators." if the STUN request has returned an IP
address different from the one obtained via HTTP from info2.ddnet.tw.

"No answer from server yet." otherwise, if the STUN request has returned
no interesting data, indicating that it's likely the game server's
fault.

## 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
- [ ] 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)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-18 07:43:55 +00:00
heinrich5991 4fb050ccb7 Use STUN to determine UDP connectivity and show diagnostics
These diagnostics are supposed to guide the user to problem resolution.
They're displayed if no packet is received from the server within one
second of connecting.

No message if we don't have STUN servers.

"Trying to determine UDP connectivity..." if no answer has been received
from the STUN server yet and it hasn't timed out yet.

"UDP seems to be filtered." if the STUN request has timed out.

"UDP and TCP IP addresses seem to be different. Try disabling VPN,
proxy or network accelerators." if the STUN request has returned an IP
address different from the one obtained via HTTP from info2.ddnet.tw.

"No answer from server yet." otherwise, if the STUN request has returned
no interesting data, indicating that it's likely the game server's
fault.
2022-05-18 09:21:31 +02:00
heinrich5991 407644deef Change IClient::ServerAddress to give the actual server address
Previously, it'd take the string entered by the user, before applying
its transformations. Add `IClient::ConnectAddressString` for the old
behavior.
2022-05-18 09:20:53 +02:00
bors[bot] 3d6e683fdd
Merge #5133 #5138
5133: Fix IPO build problems r=heinrich5991 a=def-

`@Kaffeine` 

Windows x86-64 with MinGW worked, previously:
```
-rwxr-xr-x 1 deen deen 755K May 15 11:38 config_retrieve.exe*
-rwxr-xr-x 1 deen deen 756K May 15 11:38 config_store.exe*
-rwxr-xr-x 1 deen deen 2.8M May 15 11:38 DDNet.exe*
-rwxr-xr-x 1 deen deen 2.1M May 15 11:38 DDNet-Server.exe*
-rwxr-xr-x 1 deen deen 761K May 15 11:38 dilate.exe*
-rwxr-xr-x 1 deen deen 763K May 15 11:38 map_convert_07.exe*
-rwxr-xr-x 1 deen deen 756K May 15 11:38 map_diff.exe*
-rwxr-xr-x 1 deen deen 761K May 15 11:38 map_extract.exe*
```
Now:
```
-rwxr-xr-x 1 deen deen 256K May 16 00:26 config_retrieve.exe*
-rwxr-xr-x 1 deen deen 282K May 16 00:26 config_store.exe*
-rwxr-xr-x 1 deen deen 2.8M May 16 00:26 DDNet.exe*
-rwxr-xr-x 1 deen deen 2.0M May 16 00:26 DDNet-Server.exe*
-rwxr-xr-x 1 deen deen 271K May 16 00:26 dilate.exe*
-rwxr-xr-x 1 deen deen 289K May 16 00:26 map_convert_07.exe*
-rwxr-xr-x 1 deen deen 261K May 16 00:26 map_diff.exe*
-rwxr-xr-x 1 deen deen 278K May 16 00:26 map_extract.exe*
```

## Checklist

- [ ] 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)


5138: No gold preference (fixes #5136) r=heinrich5991 a=def-

`@Kaffeine` lld is used on some systems, we also have instructions for mold in readme, both are faster than gold.

## Checklist

- [ ] 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)


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-05-18 07:12:29 +00:00
Chairn 583d6e6c01 Mark virtual function as override using a script:
while IFS= read -r line; do file=${line%%:*}; lineno=$(echo $line | cut
-d':' -f2); echo "Treating $file line $lineno"; sed -i -e
"${lineno}s/virtual //" -e "${lineno}s/);\$/) override;/" -e
"${lineno}s/)\$/) override/" -e "${lineno}s/const\$/const override/" -e
"${lineno}s/) {/) override {/" -e "${lineno}s/) const {/) const override
{/" -e "${lineno}s/const;$/const override;/" "$file"; done < a
2022-05-17 23:47:32 +02:00
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
c0d3d3v d6833b6fd6
fix jump display 2022-05-16 23:17:19 +02:00
c0d3d3v 796b2add95
Fix Weapon Shields rendering and Clean up Sprite Offsets in items.cpp 2022-05-16 15:31:46 +02:00
def dc03f410ad Disable IPO on mingw win32
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: DWARF error: could not find variable specification at offset 378
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/lib/../lib/libstdc++.a(string-inst.o): in function `ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag':
/build/mingw-w64-gcc/src/build-i686-w64-mingw32/i686-w64-mingw32/libstdc++-v3/include/bits/basic_string.tcc:206: multiple definition of `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)';
glsl_shader_compiler.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag+0x0): first defined here
...
2022-05-16 10:12:43 +02:00
def bbb1b42bb5 Fix -Walloc-size-larger-than= in maplayers.cpp
Fails on Linux x86 with IPO:

In member function '_ZN10CMapLayers17STileLayerVisuals4InitEjj.part.18',
    inlined from 'OnMapLoad' at /ddnet-source-steam/src/game/client/components/maplayers.cpp:301:6:
/ddnet-source-steam/src/game/client/components/maplayers.cpp:312:74: warning: argument 1 value '4294967295'
 exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
   m_pBorderTop = new CMapLayers::STileLayerVisuals::STileVisual[Width - 2];
                                                                          ^
2022-05-16 00:53:55 +02:00
bors[bot] a041ff8aed
Merge #5069
5069: Some HTTP fixes factored out of the HTTP masterserver PR r=def- a=heinrich5991

CC #5064

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-15 22:20:11 +00:00
bors[bot] fadcb344e4
Merge #5132
5132: Refactoring: Use std::swap in editor r=heinrich5991 a=Robyt3

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-05-15 20:31:11 +00:00
bors[bot] 61cca6ca16
Merge #5131
5131: Remove base/tl/base.h r=heinrich5991 a=Robyt3



## Checklist

- [ ] 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)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-05-15 20:11:13 +00:00
Robert Müller f0df8ad85a Use std::swap in editor 2022-05-15 21:00:14 +02:00
Robert Müller aeb8790649 Remove base/tl/base.h 2022-05-15 20:36:16 +02:00
Robert Müller f634f66008 Fix memory leaks in auto stat CSV output, refactoring
And fix stringop-overflow warning:

In function 'str_copy',
    inlined from 'FormatStats' at src\game\client\components\statboard.cpp:541:10:
src\base\system.cpp:2524:16: warning: 'strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=]
 2524 |         strncat(dst, src, dst_size - 1);
      |                ^
src\game\client\components\statboard.cpp: In member function 'FormatStats':
src\base\system.cpp:2557:27: note: length computed here
 2557 |         return (int)strlen(str);
      |                           ^
2022-05-15 20:24:26 +02:00
Robert Müller 52100dbbe7 Use qualified std::swap only 2022-05-15 19:25:36 +02:00
bors[bot] 1110e1592a
Merge #5123
5123: Add Cellegen, srdante, Nouaa to credits r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


Co-authored-by: def <dennis@felsin9.de>
2022-05-14 18:47:39 +00:00
def 17fe0ec8e3 Add Cellegen, srdante, Nouaa to credits 2022-05-14 19:56:08 +02:00
bors[bot] 3d244b728d
Merge #5122
5122: Cleanup CRenderTools r=heinrich5991 a=Robyt3



## 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)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-05-14 17:41:04 +00:00
Robert Müller 51d0d76e11 Rename parameters id -> Id 2022-05-14 19:08:43 +02:00
bors[bot] 92be4a67d7
Merge #4959
4959: Revert "CGameClient::LoadMapSettings: Load the default tuning params … r=heinrich5991 a=def-

…by default"

This reverts commit 754562ce0b.

This breaks rendering for ddnet mode, thanks to cheeser0613 for report

`@Kaffeine` I'd prefer to have it working with DDNet instead of vanilla. A fix that doesn't break DDNet demos would be welcome.

## Checklist

- [ ] 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)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-05-14 16:31:54 +00:00
Robert Müller 25c4270cb4 Fix comments 2022-05-14 13:44:12 +02:00
Robert Müller 485d61d4f8 Use std::swap 2022-05-14 13:43:26 +02:00
Robert Müller 1690a9703d Rename variable cs -> ColorScale 2022-05-14 13:40:46 +02:00
Robert Müller 3708abe8e0 Remove CRenderTools' pointers to CUI and CGameClient 2022-05-14 13:31:07 +02:00
bors[bot] ec75563dad
Merge #5109 #5110 #5112 #5115 #5117
5109: Only print zone messages when there is one r=heinrich5991 a=def-

```
src/game/server/entities/character.cpp: In member function ‘void CCharacter::SendZoneMsgs()’:
src/game/server/entities/character.cpp:2013:78: warning: the address of ‘CGameContext::m_aaZoneLeaveMsg’ will never be NULL [-Waddress]
 2013 |         if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld])
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from src/game/server/entities/character.cpp:7:
src/game/server/gamecontext.h:179:14: note: ‘CGameContext::m_aaZoneLeaveMsg’ declared here
  179 |         char m_aaZoneLeaveMsg[NUM_TUNEZONES][256];
      |              ^~~~~~~~~~~~~~~~
src/game/server/entities/character.cpp:2028:53: warning: the address of ‘CGameContext::m_aaZoneEnterMsg’ will never be NULL [-Waddress]
 2028 |         if(GameServer()->m_aaZoneEnterMsg[m_TuneZone])
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/game/server/gamecontext.h:178:14: note: ‘CGameContext::m_aaZoneEnterMsg’ declared here
  178 |         char m_aaZoneEnterMsg[NUM_TUNEZONES][256]; // 0 is used for switching from or to area without tunings
      |              ^~~~~~~~~~~~~~~~
```
<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


5110: Assert client id in SetSolo r=heinrich5991 a=def-

I could not find a way that an invalid client ID is used here, but
compiler warns anyway:
```
In member function ‘void CTeamsCore::SetSolo(int, bool)’,
    inlined from ‘void CCharacter::SetSolo(bool)’ at src/game/client/prediction/entities/character.cpp:29:22,
    inlined from ‘void CCharacter::HandleTiles(int)’ at src/game/client/prediction/entities/character.cpp:882:10:
src/game/teamscore.h:45:34: warning: array subscript [0, 63] is outside array bounds of ‘bool [64]’ [-Warray-bounds]
   45 |                 m_IsSolo[ClientID] = Value;
      |                 ~~~~~~~~~~~~~~~~~^
src/game/teamscore.h: In member function ‘void CCharacter::HandleTiles(int)’:
src/game/teamscore.h:27:14: note: while referencing ‘CTeamsCore::m_IsSolo’
   27 |         bool m_IsSolo[MAX_CLIENTS];
      |              ^~~~~~~~
```
<!-- What is the motivation for the changes of this pull request -->

## 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)


5112: Update traditional_chinese.txt r=def- a=Cheeser0613

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


5115: Update simplified_chinese.txt r=def- a=Cheeser0613

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


5117: Update tooltip text after changing language r=Jupeyy a=def-

Thanks to cheeser0613 for report

<!-- What is the motivation for the changes of this pull request -->

## 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)


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-05-14 11:15:03 +00:00
def 0f2d464dbf Update tooltip text after changing language
Thanks to cheeser0613 for report
2022-05-14 12:49:12 +02:00
def 2f68b50fe1 Assert client id in SetSolo
I could not find a way that an invalid client ID is used here, but
compiler warns anyway:

In member function ‘void CTeamsCore::SetSolo(int, bool)’,
    inlined from ‘void CCharacter::SetSolo(bool)’ at src/game/client/prediction/entities/character.cpp:29:22,
    inlined from ‘void CCharacter::HandleTiles(int)’ at src/game/client/prediction/entities/character.cpp:882:10:
src/game/teamscore.h:45:34: warning: array subscript [0, 63] is outside array bounds of ‘bool [64]’ [-Warray-bounds]
   45 |                 m_IsSolo[ClientID] = Value;
      |                 ~~~~~~~~~~~~~~~~~^
src/game/teamscore.h: In member function ‘void CCharacter::HandleTiles(int)’:
src/game/teamscore.h:27:14: note: while referencing ‘CTeamsCore::m_IsSolo’
   27 |         bool m_IsSolo[MAX_CLIENTS];
      |              ^~~~~~~~
2022-05-14 11:28:01 +02:00
def b557e25650 Only print zone messages when there is one
src/game/server/entities/character.cpp: In member function ‘void CCharacter::SendZoneMsgs()’:
src/game/server/entities/character.cpp:2013:78: warning: the address of ‘CGameContext::m_aaZoneLeaveMsg’ will never be NULL [-Waddress]
 2013 |         if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld])
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from src/game/server/entities/character.cpp:7:
src/game/server/gamecontext.h:179:14: note: ‘CGameContext::m_aaZoneLeaveMsg’ declared here
  179 |         char m_aaZoneLeaveMsg[NUM_TUNEZONES][256];
      |              ^~~~~~~~~~~~~~~~
src/game/server/entities/character.cpp:2028:53: warning: the address of ‘CGameContext::m_aaZoneEnterMsg’ will never be NULL [-Waddress]
 2028 |         if(GameServer()->m_aaZoneEnterMsg[m_TuneZone])
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/game/server/gamecontext.h:178:14: note: ‘CGameContext::m_aaZoneEnterMsg’ declared here
  178 |         char m_aaZoneEnterMsg[NUM_TUNEZONES][256]; // 0 is used for switching from or to area without tunings
      |              ^~~~~~~~~~~~~~~~
2022-05-14 11:18:08 +02:00
def cfe8cce91d Add translation string "Adjust the opacity..."
Reported by cheeser0613
2022-05-14 11:05:32 +02:00
Robert Müller fc93ba0539 Remove unused DoButtonLogic pText argument 2022-05-14 00:26:15 +02:00
Robert Müller ca091d87b2 Support nesting editboxes, pickers and scrollbars in clipping areas 2022-05-13 21:39:25 +02:00
Robert Müller 1e8278ca95 Smooth clipping when scrolling in controls settings 2022-05-13 21:38:02 +02:00
Robert Müller 8c7cdb5936 Rename UiDoGetButtons to DoSettingsControlsButtons 2022-05-13 21:38:01 +02:00
Robert Müller 60347fde1a Use MouseHovered instead of clipping manually 2022-05-13 21:38:01 +02:00
Robert Müller 7bda9d4118 Fix variable spelling CheckAble -> Checkable 2022-05-13 20:46:54 +02:00
Robert Müller 8d12529f1e Move variable declaration 2022-05-13 20:46:54 +02:00
Robert Müller cae2b49ed6 Reuse MouseInside variable 2022-05-13 20:46:54 +02:00
Robert Müller 0f6572ebf6 Rename static variables ButtonUsed -> s_ButtonUsed 2022-05-13 20:46:54 +02:00
Robert Müller 6241c8483d Use bool instead of int with MouseInside 2022-05-13 20:46:50 +02:00
Robert Müller a248822ea5 Add CUI:MouseHovered and MouseInsideClip 2022-05-13 20:24:10 +02:00
Robert Müller 1855b4aea1 Support nested CUI clipping regions 2022-05-13 20:20:04 +02:00
bors[bot] d87edb9b41
Merge #5089
5089: Render tees in skin selector with default emote r=def- a=sjrc6

suggested in https://github.com/ddnet/ddnet/issues/5057
works for player and dummy

![image](https://user-images.githubusercontent.com/22122579/167973498-bccaac07-756e-4e59-a19d-66d3e24542d0.png)

## 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
- [ ] 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)


Co-authored-by: Tater <Mr.Potatooh@gmail.com>
2022-05-13 08:24:15 +00:00
heinrich5991 40bd85b552 Refactor HTTP code to no longer use inheritance
This gives us the same API interface for all different request types
(HEAD, GET, POST).
2022-05-13 09:16:15 +02:00
heinrich5991 0c2bb5a549 Fix /practice chat responses and a few others
Fixes #5087.
2022-05-13 09:14:05 +02:00
heinrich5991 1b233ab95c Add the HTTP client methods to the server 2022-05-13 09:04:39 +02:00
Tater b6a9389fe8 Render tees in skin selector with default emote 2022-05-12 17:17:19 -05:00
c0d3d3v fa2ac1bb64
Merge branch 'master' into New_HUD
* master: (87 commits)
  Remove base/tl/string.h
  Replace remaining usage of base/tl/string with std::string
  Remove unused includes of base/tl/string.h
  Store localized strings in a CHeap instead of using tl/string.h
  Mark methods as const
  Add CHeap::StoreString method
  Rules are chat responses too
  Add margins to demo slice popup, decrease error font size, UI scaling
  Remove redundant parameters which are overridden later
  Use Margin instead of both VMargin and HMargin
  Move variable declaration
  Only output messages intended for chat to the user of a chat command
  Remove unused chat response variables
  Don't print the first "Waiting for score threads to complete"
  fix usage of undefined behavior for default eyes
  remove duplicate HOOK_RETRACTED assignment
  do not send swap request notification to complete team 0
  make swap messages more personal
  Move ninja shield to other position (fixes #5047)
  do not release the hooks if you swap
  ...
2022-05-10 19:03:09 +02:00
c0d3d3v 0c4dfb694c
Add Options for new HUD
- Change FontSize of MovementInfo to 6 and add a little morre padding at
  the sides
2022-05-10 18:41:46 +02:00
Robert Müller a1d092be27 Replace remaining usage of base/tl/string with std::string 2022-05-07 00:17:29 +02:00
Robert Müller dee7393555 Remove unused includes of base/tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller 3e1cfcd306 Store localized strings in a CHeap instead of using tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller e2a049f0ca Mark methods as const 2022-05-06 23:24:58 +02:00
Dennis Felsing b42fad604e Rules are chat responses too
Thanks to bencie for report
2022-05-06 00:12:03 +02:00
bors[bot] 14927684eb
Merge #5060
5060: Only output messages intended for chat to the user of a chat command r=def- a=heinrich5991

Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.

## 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)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-01 15:01:02 +00:00
Robert Müller cc9ed7e9d3 Add margins to demo slice popup, decrease error font size, UI scaling 2022-05-01 12:03:56 +02:00
Robert Müller f4642472b2 Remove redundant parameters which are overridden later 2022-05-01 11:40:26 +02:00
Robert Müller a1614e4709 Use Margin instead of both VMargin and HMargin 2022-05-01 11:40:21 +02:00
Robert Müller e291a3a70c Move variable declaration 2022-05-01 11:38:58 +02:00
heinrich5991 d5f8bc2783 Only output messages intended for chat to the user of a chat command
Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.
2022-05-01 11:18:22 +02:00
heinrich5991 4061069b73 Remove unused chat response variables 2022-05-01 11:18:22 +02:00
bors[bot] 567aeb7d9e
Merge #5049
5049: do not release the hooks if you swap r=C0D3D3V a=C0D3D3V

Needs more testing, but first test looks good
https://streamable.com/ypra11

## 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
- [ ] 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>
2022-04-30 20:09:20 +00:00
c0d3d3v a289503411
remove duplicate HOOK_RETRACTED assignment 2022-04-30 21:41:13 +02:00
c0d3d3v eae74fe91e
do not send swap request notification to complete team 0 2022-04-30 21:24:25 +02:00
c0d3d3v 808526bdd8
make swap messages more personal 2022-04-30 12:16:38 +02:00
c0d3d3v 0ea811f70e
do not release the hooks if you swap 2022-04-30 10:21:38 +02:00
Edgar 4b25f8d63e
fix tooltips rendering when they shouldn't, fixes #5035 2022-04-30 10:05:28 +02:00
Dennis Felsing 1376dc2aa7 Revert "Get rid of optional, not available on Debian9 build"
This reverts commit 4e3d5c5626.

Should work again with clang++-7 and libc++-7. See
2534d627ac
2022-04-30 01:01:39 +02:00
Robert Müller da44ecd6eb Fix flashing colors in console when scrolling up continuously 2022-04-29 17:51:10 +02:00
bors[bot] ca4b6222da
Merge #5013
5013: Unify logging infrastructure between `IConsole` and `dbg_msg` r=def- a=heinrich5991

This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-04-29 14:17:07 +00:00
Jupeyy 53cb36bbe7 Fix wrong quad offset for (not caused by transparent) flushes 2022-04-29 15:51:25 +02:00
heinrich5991 fa4bcd5ec0 Unify logging infrastructure between IConsole and dbg_msg
This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.
2022-04-29 15:21:26 +02:00
bors[bot] 98bf721587
Merge #4726 #4727 #4728 #4880 #5022
4726: Display super with "super" string in scoreboard (fixes #4724) r=heinrich5991 a=def-

instead of showing the number 64

Alternative to https://github.com/ddnet/ddnet/pull/4725

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


4727: Increase MAX_IDS to 32k (fixes #4723) r=heinrich5991 a=def-

Not sure I like it, otherwise we have to edit Game City.

Maybe we should fail this in map editor already instead of allowing to
create a map which requires > MAX_IDS

<!-- What is the motivation for the changes of this pull request -->

## 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)


4728: Implement shields that remove specific weapon (fixes #4572) r=heinrich5991 a=def-

Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display (see screenshot), maybe someone can
quickly spot what I'm doing wrong

<img width="898" alt="Screenshot 2022-02-18 at 00 50 14" src="https://user-images.githubusercontent.com/2335377/154591108-d89cb475-daaf-4a6a-9748-17160a1e71a2.png">

## 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
- [ ] 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)


4880: Add mysql to github workflow in ubuntu 20.04 r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


5022: Use std::clamp r=heinrich5991 a=def-

Not sure if we want to, there are some easy functions like this we could
take from stdlib now

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-29 00:30:17 +00:00
Dennis Felsing 6a7c7ff4cc Use std::gcd 2022-04-28 17:01:53 +02:00
Jupeyy b8da817716 Return the quad offset of the first added quad, when adding new quads 2022-04-28 16:50:18 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
Dennis Felsing 15b8dc8d64 Remove dots in tooltip texts 2022-04-28 16:46:18 +02:00
Dennis Felsing 3ca86ee128 Display super with "super" string in scoreboard (fixes #4724)
instead of showing the number 64
2022-04-28 16:40:20 +02:00
def 487abbe1b7 Enable swapping in team 0 2022-04-28 16:35:46 +02:00
bors[bot] a8b842277a
Merge #5019
5019: remove cl_predict_ddrace r=heinrich5991 a=C0D3D3V

Since most of the predict code is only ddrace relevant anyway, I would suggest removing the cl_predict_ddrace option instead of checking if m_WorldConfig.m_PredictDDRace is set everywhere ddrace stuff is predicted. 

in case of conflicts with physics from other mods, the check on m_WorldConfig.m_PredictDDRace must however be implemented in the appropriate places (for example for the freeze and unfreeze functions). But since there are currently no conflicts apparently, this is sufficient for now.

fixes the bug I reported here: https://discord.com/channels/252358080522747904/293493549758939136/968114944878989363

`@trml`  what do you think about this?

## 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
- [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>
2022-04-28 12:34:04 +00:00
bors[bot] 6cce22d056
Merge #4813 #4905
4813: Don't allow infinite shotgun bounce (fixes #4809) r=heinrich5991 a=def-

I hope this kind of physic isn't used anywhere, I couldn't trigger it without being stuck in wall.

## 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)


4905: Fix move_sqlite (fixes #4902) r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


Co-authored-by: def <dennis@felsin9.de>
2022-04-28 12:11:05 +00:00
c0d3d3v 1a162c08be
remove unnecessary loop over the possible modifier combinations 2022-04-28 08:45:25 +02:00
bors[bot] e3eeec762d
Merge #4997
4997: Add option to change default eyes when joining server r=def- a=sjrc6

Risky Feat suggested this idea to me, I also thought it was good so I implemented it. 

If you press one of the eyes in the settings it will change which eyes you get when you join a server.

It saves a separate variable for dummy/player.

It will also change your eyes anytime you press one of them, but only if you are playing as the same Tee whose eyes you are trying to change. If someone could figure out the best way to make it change the opposite Tees eyes as well that would be nice but I don't think it's necessary. 

It also changes the "Your Skin:" Tee eyes on the left if you have one selected. 

I had to change the cl_run_on_join code a bit, I tested and I don't think it should ever break anything but it might be good for someone to double check. 

![image](https://user-images.githubusercontent.com/22122579/163762410-ec7aa67d-6417-433d-8707-e21cda2bcd5f.png)



## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] 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)


Co-authored-by: Tater <Mr.Potatooh@gmail.com>
2022-04-27 07:42:59 +00:00
bors[bot] 3d183fc16d
Merge #5027
5027: Fix tooltip locations after window resize (fixes #5026) r=edg-l a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] 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)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-27 06:05:59 +00:00
Tater 70311d5d4f Add option for default eyes when joining server 2022-04-26 19:47:38 -05:00
Dennis Felsing c174274edc Fix tooltip locations after window resize (fixes #5026) 2022-04-27 01:00:23 +02:00
Jupeyy b23e60c077 Allow onfly FSAA change under Vulkan 2022-04-26 21:09:55 +02:00
c0d3d3v bc80d83ec9
fix WalkTime for negativ positions 2022-04-26 09:58:31 +02:00
c0d3d3v 68036e6a19
remove cl_predict_ddrace 2022-04-25 15:57:10 +02:00