2243: Workaround for client crash on predicted explosion r=def- a=trml
I haven't been able to find the exact source of the problem yet, but at least this seems to get rid of the segfault. The crash only happened with with recent versions of gcc and -O3 for me.
Co-authored-by: trml <trml@users.noreply.github.com>
2231: Don't clamp values that have no reasonable values r=Learath2 a=def-
Still affects many values in editor, for example colors in tiles and quads.
Thanks to Pipou for report.
Co-authored-by: def <dennis@felsin9.de>
2226: Fix image/sound selection in editor r=heinrich5991 a=def-
Follow-up to https://github.com/ddnet/ddnet/pull/2186 by @BannZay
Thanks to Cøke for notifying me
Co-authored-by: def <dennis@felsin9.de>
2202: Send DDNet version early in the connection process r=Learath2 a=heinrich5991
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2212: Use a consistent PRNG on all platforms r=Learath2 a=heinrich5991
I just used glibc's because that is what we use on all the servers. Based on https://www.mscs.dal.ca/~selinger/random/.
Behavior change: The PRNG is actually seeded now.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
As discussed on Discord today, can be enabled inside of teams on the fly
during each run on any server. Finishes don't count. I haven't tested
save/load yet, would do that live on the server if this can be merged.
The following member variables:
* m_name to m_aName
* m_String to m_aString
* m_CpCurrent to m_aCpCurrent
* m_Switchers to m_pSwitchers
* SavedTees to m_pSavedTees
This came from a long discussion comparing PCG-* against xoroshiro*. Do
not generate integers without bias because it doesn't affect us very
much and it is easier to reimplement with modulo.
2208: Implement /load without params to show some info r=Learath2 a=def-
about your existing saves. Not the code of course, but only how many saves you have and when you last saved on this map.
Co-authored-by: def <dennis@felsin9.de>
src/game/editor/auto_map.h:47:9: warning: ‘*((void*)& NewConf +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
I don't think it's an actual problem
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
2191: write automapper version, was not initialized r=heinrich5991 a=Patiga
write automapper version, was not initialized
Co-authored-by: patiga <patigatus21@gmail.com>
2180: Don't count freshly loaded map as modified (fixes#2178) r=Learath2 a=def-
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
Co-authored-by: def <dennis@felsin9.de>
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
2161: Small prediction fixes/update r=def- a=trml
I looked through the latest changes in the server code, and made some updates to the prediction with it. This includes the hammer-out-of-freeze server fix and a small fix for stopper prediction. Also cleaned up some code, and fixed predicted smoke-trails slightly so they don't go through walls in certain cases.
Co-authored-by: trml <trml@users.noreply.github.com>
2164: Fix empty sound (fixes#2163) r=heinrich5991 a=def-
The problem was that the string is empty after going through the trim, thus the main displaying loop doesn't run, but the sound still does. Verified that it works.
Co-authored-by: def <dennis@felsin9.de>
Add libnotify support for linux client
Also unify notification management
Make libnotify mandatory for the client. It is installed on 100% of Arch
Linux systems and on 70% of Debian systems. I'd guess the remaining
Debian systems are servers.
Detect dependent libraries of `libnotify` using `pkg-config`. Remove
library-specific code from the game module. Decrement refcount for
libnotify notification object before leaving the function.
2104: Add spectate_closest now works when in Free-View r=def- a=d3fault
sry for the general refactor along with it xD
Co-authored-by: d3fault <d3fault@d3fault.net>
2103: Add spectate_closest r=def- a=d3fault
Spectates the tee closest to the one you are currently spectating.
This commit brought to you by COVID-19 lockdown boredom.
Fix#1793
Co-authored-by: d3fault <d3fault@d3fault.net>
2096: Fix the double-free of the antibot r=def- a=heinrich5991
I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2078: Fix cl_showrecord with dummy (fixes#2077) r=heinrich5991 a=def-
Shows best time of either dummy or main player depending on which is selected
Co-authored-by: def <dennis@felsin9.de>
I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.
2069: Move global configuration out of client interface r=heinrich5991 a=ChillerDragon
2076: Allow editing multiple tile layer props r=heinrich5991 a=Learath2
Requested by Ravie on discord
2095: Fix `AntibotDestroy` being called twice r=def- a=heinrich5991
The resource deallocation needs to happen in symmetry with the
allocation, otherwise we get unmatched dealloctions leading to crashes.
Allocations happened in `CAntibot::Init`, but it was not guaranteed that
this was called before the destructor.
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2071: Add an option to only start a new demo when connect while automatically record demos r=def- a=sirius1242
Origin auto demo recording of ddnet will generate lots of demo files especially when playing in mods which have shorter rounds, such as infclass. I added a new option to open a new demo file only when connect to server (include map changing), this is disabled by default, and can use `cl_auto_demo_on_connect 1` to open. It works only when `cl_auto_demo_record` open.
Co-authored-by: sirius <sirius.ustc@gmail.com>
The resource deallocation needs to happen in symmetry with the
allocation, otherwise we get unmatched dealloctions leading to crashes.
Allocations happened in `CAntibot::Init`, but it was not guaranteed that
this was called before the destructor.
./src/game/client/components/maplayers.h:15:9: error: 'uintptr_t' does not name a type; did you mean 'uint64_t'?
15 | typedef uintptr_t offset_ptr;
| ^~~~~~~~~
| uint64_t
../src/game/client/components/maplayers.h:61:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
61 | offset_ptr IndexBufferByteOffset()
| ^~~~~~~~~~
| offset_ptr32
In file included from ../src/game/client/components/background.cpp:8:
../src/game/client/components/maplayers.h:105:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
105 | offset_ptr m_IndexBufferByteOffset;
| ^~~~~~~~~~
| offset_ptr32
../src/game/client/components/maplayers.h: In constructor 'CMapLayers::SQuadLayerVisuals::SQuadVisual::SQuadVisual()':
../src/game/client/components/maplayers.h:103:20: error: class 'CMapLayers::SQuadLayerVisuals::SQuadVisual' does not have any field named 'm_IndexBufferByteOffset'
103 | SQuadVisual() : m_IndexBufferByteOffset(0) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
2048: Display envelope name in popups r=12pm a=Learath2
A dropdown would've worked better, but we don't have one
Co-authored-by: Learath <learath2@gmail.com>
2026: Only start showing emoticons after their start tick has passed (fixes#2025) r=Learath2 a=def-
Since we can go back in time in demo player
Co-authored-by: def <dennis@felsin9.de>
src/game/server/score/file_score.cpp: In member function ‘CFileScore::CPlayerScore* CFileScore::SearchName(const char*, int*, bool)’:
src/game/server/score/file_score.cpp:169:9: error: ‘strcmp’ was not declared in this scope
169 | if (!strcmp(r.front().m_aName, pName))
| ^~~~~~
src/game/server/score/file_score.cpp:12:1: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
11 | #include <engine/shared/console.h>
+++ |+#include <cstring>
12 |¬