Commit graph

18401 commits

Author SHA1 Message Date
Robert Müller 15e4f9a886 Remove remaining obsolete // ignore_convention comments 2023-11-20 21:58:29 +01:00
heinrich5991 b6c0b31d1c
Merge pull request #7514 from Robyt3/Codecov-Patch-No-Target
Also set Codecov target for patch to 0%
2023-11-20 20:08:25 +00:00
Robert Müller 7b6a126b53 Also set Codecov target for patch to 0% 2023-11-20 20:48:05 +01:00
Dennis Felsing 375dd7da8b
Merge pull request #7511 from furo321/telecursor-fixes
Account for zoom when teleporting to cursor.
2023-11-20 12:25:54 +00:00
furo c2d02ad45c Account for zoom when teleporting to cursor. 2023-11-20 12:33:08 +01:00
Dennis Felsing d11a271f45
Merge pull request #7506 from trml/pr_predmargin_simplify
Make prediction margin take effect instantanously
2023-11-19 21:56:40 +00:00
Dennis Felsing 472c9f070b
Merge pull request #7507 from dobrykafe/pr-replace-sizeof
replace `sizeof x` with `sizeof(x)`
2023-11-19 21:56:15 +00:00
Dennis Felsing c15e9b17fa
Merge pull request #7505 from Chairn/pr_wastelefalse
Init vec2 members to 0 and small cleanup
2023-11-19 21:55:09 +00:00
dobrykafe 904abae6ac replace sizeof x with sizeof(x) 2023-11-19 22:36:47 +01:00
trml 717aad2677 Make prediction margin take effect immediately 2023-11-19 19:52:39 +01:00
Chairn 2dcbaf605e Small cleanup: simplify member type and computation 2023-11-19 17:36:17 +01:00
Chairn 5b27062ded Remove unused members 2023-11-19 17:36:16 +01:00
Chairn d6c7bcdbdc Init vec2 members to 0 following #6256 2023-11-19 17:36:16 +01:00
heinrich5991 b4567d6e25
Merge pull request #7502 from Robyt3/Browser-CommunityFilter-Fixes
Prevent community filters excluding all elements, fix server browser update on community filter change via console
2023-11-19 16:24:52 +00:00
Robert Müller 228810e01c
Merge pull request #7504 from def-/pr-codecov-annotations
codecov: Also disable annotations (fixes #7498)
2023-11-19 16:18:38 +00:00
Dennis Felsing ad7ad79082 codecov: Also disable annotations (fixes #7498) 2023-11-19 17:01:14 +01:00
Dennis Felsing 44d378c667
Merge pull request #7503 from ChillerDragon/pr_score_controller
Move `m_pLoadBestTimeResult` to `IGameController`
2023-11-19 15:56:41 +00:00
ChillerDragon 16c5a60b53 Move m_pLoadBestTimeResult to IGameController
Gets rid of more CGameControllerDDRace casts.
Those did not show up during compile time only during runtime
of another active controller when asan is active.
2023-11-19 16:23:17 +01:00
Robert Müller 9a652ecaae
Merge pull request #7501 from heinrich5991/pr_ddnet_antibot_kick
Allow antibot to kick people
2023-11-19 15:04:57 +00:00
Robert Müller ccc470ecc9 Fix server browser update on community filter change via console
Also update server browser filtering/sorting when changing the community/country/type filter config variables with the console.

Clean the filter config variables when they are changed instead of only when the community filter is rendered.
2023-11-19 15:34:50 +01:00
Robert Müller aba67f46ee Prevent community filters excluding all elements
Ensure that community/country/type filters do not exclude all allowed elements, which can happen when a previously selected community is not available anymore or when arbitrary community filter values are set with the console.
2023-11-19 15:34:33 +01:00
heinrich5991 a5b72fef42 Allow antibot to kick people 2023-11-19 14:59:14 +01:00
heinrich5991 4d00e8c0e3
Merge pull request #7496 from Robyt3/Base-cstring-Include-Fix
Add missing `<cstring>` include for `memset` to `system.h`
2023-11-19 13:05:35 +00:00
Robert Müller 2e7cb9e4bc Add missing <cstring> include for memset to system.h
Fix compilation with MinGW due to `memset` call added to `system.h` in #6256.
2023-11-19 13:04:04 +01:00
Robert Müller f9464d8144
Merge pull request #7498 from def-/pr-codecov-prs
coverage: Don't complain on PRs (fixes #7497)
2023-11-19 11:44:08 +00:00
Dennis Felsing 3d485a9640 coverage: Don't complain on PRs (fixes #7497) 2023-11-19 12:28:02 +01:00
Robert Müller 5ab96decc3
Merge pull request #6279 from def-/pr-headless-cov
Try to fix code coverage upload (fixes #6277)
2023-11-19 09:25:53 +00:00
Dennis Felsing d369238636
Merge pull request #7495 from heinrich5991/pr_ddnet_antibot_command
Allow more complex interaction with the antibot via the console
2023-11-19 08:45:34 +00:00
heinrich5991 28b00892f6 Allow more complex interaction with the antibot via the console
Allows the antibot to receive arbitrary console commands.
2023-11-19 04:41:56 +01:00
heinrich5991 9b024fcf97
Merge pull request #7476 from ChillerDragon/pr_const_char
Overload GetCharacter with const version
2023-11-19 03:08:03 +00:00
heinrich5991 d4713cbfe2
Merge pull request #7475 from ChillerDragon/pr_gametype_mod
Add sv_gametype and sample mod
2023-11-19 03:07:24 +00:00
ChillerDragon becffb9377 Add sv_gametype and sample mod 2023-11-19 03:00:21 +01:00
ChillerDragon d42513e843 Overload GetCharacter() with const version
Allows to do this

```C++
for(const CPlayer *pPlayer : GameServer()->m_apPlayers)
{
	if(!pPlayer)
		continue;
	if(!pPlayer->GetCharacter())
		continue;

	// your code that does not change the character state
}
```
2023-11-19 02:00:28 +01:00
Dennis Felsing 6c935eee91 Version 17.4 2023-11-19 00:50:29 +01:00
heinrich5991 8e75998138
Merge pull request #7451 from apelsin21/master
Appending in editor checks for duplicate images
2023-11-18 23:24:32 +00:00
Axel Vestin 1b7cee3888 Fixes duplicate images when appending maps in the editor 2023-11-19 00:07:31 +01:00
Dennis Felsing 4d40106818
Merge pull request #7337 from dobrykafe/pr-multi-view-qol
multi-view: dont zoom below `cl_default_zoom`
2023-11-18 23:04:27 +00:00
Dennis Felsing 97d64cdfea
Merge pull request #6256 from heinrich5991/pr_ddnet_typesafe_mem_zero
Typesafe `mem_zero` function
2023-11-18 23:00:48 +00:00
Dennis Felsing 5ea8a0f872 Try to fix code coverage upload (fixes #6277)
[2023-01-12T17:25:29.471Z] ['error'] There was an error running the uploader: No gcov files found

Broken in https://github.com/ddnet/ddnet/pull/5599 because the
cmake-init-env overwrites outside env variables
2023-11-18 23:15:15 +01:00
heinrich5991 7b16460334
Merge pull request #7493 from Robyt3/Community-Info-Condition-Fix
Fix inverted community parsing conditions
2023-11-18 22:10:45 +00:00
Chairn 5cdae502b8 Fix code scanning && clang-tidy false positive? 2023-11-18 22:55:17 +01:00
heinrich5991 0cba06d80f Don't use Mersenne Twister 2023-11-18 22:55:17 +01:00
heinrich5991 b951734c03 Don't allow mem_zero for nontrivial types
Initialize nontrivial types with a constructor instead. Make the
compiler aware that some of our constructors are indeed trivial.

This allows `mem_zero` calls to actually always zero the memory.
2023-11-18 22:55:17 +01:00
Robert Müller ddf935795d Fix inverted community parsing conditions 2023-11-18 22:55:08 +01:00
Chairn 6e629e1deb Type safe mem_zero function (fixes #5228)
Partially replaces #5690.
POD types are just memset. Other types are either destructed if not
trivial and/or constructed if not trivial. Types need to have a default
constructor.
Virtual classes can be mem_zeroed only if they already have been
constructed, otherwise it is UB.
2023-11-18 22:47:22 +01:00
Robert Müller ee04cd4dda
Merge pull request #7459 from heinrich5991/pr_ddnet_community_json
Add icon URL, remove `servers-key`/`ranks-key` from community JSON
2023-11-18 21:08:23 +00:00
heinrich5991 c7cd281aff Add icon URL, remove servers-key/ranks-key from community JSON
Previously:

```json
{
  "ddnet": {
    "name": "DDraceNetwork",
    "servers-key": "servers",
    "ranks-key": "maps",
    "icon-sha256": "162313eeb954e34495ad03066fee1418ed3c963e76cc83dff993e1c7856c742b"
  }
}
```

Now:
```json
[
  {
    "id": "ddnet",
    "name": "DDraceNetwork",
    "icon": {
      "sha256": "162313eeb954e34495ad03066fee1418ed3c963e76cc83dff993e1c7856c742b",
      "url": "https://info.ddnet.org/icons/ddnet.png"
    },
    "ranks": [
      …
    ],
    "servers": {
      …
    }
  }
]
```

Special case `ddnet` to look for the `servers`, `maps` in the top-level
and `kog` to look for `servers-kog` in the top-level.
2023-11-18 21:52:51 +01:00
Dennis Felsing ccd767aea4
Merge pull request #7474 from ChillerDragon/pr_mod_crash
Fix crash in mod controller
2023-11-18 19:59:22 +00:00
heinrich5991 43a58f05ae
Merge pull request #7492 from Robyt3/Console-DeadLock-Fix
Fix dead lock when printing log entry while rendering console line
2023-11-18 16:57:19 +00:00
Robert Müller fcddc165b2 Remove unnecessary mem_zero of ringbuffer memory
Zeroing the entire ringbuffer memory is unnecessary and inefficient. Only the first item in the ringbuffer has to be initialized properly.

It's unlikely that existing code depends on allocated memory being zeroed, as recycled ringbuffer items where never zeroed.
2023-11-18 17:40:36 +01:00