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>
2204: Implement /practice for teams r=heinrich5991 a=def-
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.
Co-authored-by: def <dennis@felsin9.de>
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.
2213: Rename variables for consistency r=def- a=Zwelf
The following member variables:
* m_name to m_aName
* m_String to m_aString
* m_CpCurrent to m_aCpCurrent
* m_Switchers to m_paSwitchers
* SavedTees to m_paSavedTees
The first one is kind of obvious. The others followed while looking at the code. I am not sure if the m_pa prefix is the correct one, it's a pointer to a dynamically allocated array.
Co-authored-by: Zwelf <zwelf@strct.cc>
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>
2207: Silence GCC warning r=heinrich5991 a=def-
```
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
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.
2200: Break save/load string into multiple lines r=def- a=Zwelf
I checked if the format string has changed with this c file: https://gist.github.com/Zwelf/12eb85c47e3ca0691db7710bec497bd6
```bash
$ gcc check.c
$ ./a.out
load string compare: 0
get string compare: 0
```
I also checked if the variable names matched with vim (by concatenating the lines with J) and the browser search functionality.
Co-authored-by: Zwelf <zwelf@strct.cc>