2932: Don't change SpectatorID when not spectating r=def- a=Fireball-Teeworlds
This prevents a confusing situation where /pause and /spec lead to spectating yourself: https://youtu.be/9MzvDoXtMLc (looks as if /pause is broken unless you notice that you are spectating yourself).
This could've happened when you pressed spectate_next button while playing and SpectatorID got changed to yourself. I think it doesn't make sense to allow changing SpectatorID when playing at all.
I've also tried to simplify the code: the number of `for` loops in the updated code goes down from 10 to 3.
Things tested with this change:
1. Cycling through players when spectating (works)
2. Changing SpectatorID when not spectating (no longer possible)
3. Spectating yourself (still possible with "spectate N" command but no longer happens accidentally because of 2)
4. "spectate_closest" command (works)
5. Replaying demos where player goes into spectators (works)
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2933: Handle rcon cmd completion properly with dummy r=heinrich5991 a=def-
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.
as reported by Betz@lel-$h@l0m on Discord
Co-authored-by: def <dennis@felsin9.de>
2889: Allow specifying texture LOD BIAS r=def- a=Jupeyy
For Ravie, and others that want the old renderer opengl 3.3 feeling back xd
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2936: Fix cutting of one character when showing ips in rcon r=def- a=Zwelf
The buffer size passed to `str_append` includes the null terminator.
Co-authored-by: Zwelf <zwelf@strct.cc>
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.
as reported by Betz@lel-$h@l0m on Discord
Not planning to do this automatically, but at least cleaning it up once
provides some benefit. Every header should include what it uses.
$ for i in src/**/*.h; do j=${i#"src/"}; echo $j; echo "#include <$j>\nint main() { return 0; }" | /usr/bin/c++ -DCONF_OPENSSL -DCONF_SQL -DCONF_VIDEORECORDER -DCONF_WAVPACK_CLOSE_FILE -DCONF_WAVPACK_OPEN_FILE_INPUT_EX -DGAME_RELEASE_VERSION=\"15.0.5\" -DGLEW_STATIC -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -I/usr/include/opus -I/usr/include/SDL2 -I/usr/include/wavpack -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -Isrc -I/usr/include/mysql -I/home/deen/sys/include/ -O2 -g -DNDEBUG -fdiagnostics-color=always -fstack-protector-all -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wno-nullability-completeness -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -std=gnu++11 -o /dev/null -x c++ -; done
Ignored: tuning.h, variables.h, config_common.h, mapitems_ex_types.h, mapbugs_list.h, protocol7.h, teehistorian_ex_chunks.h, protocol_ex_msgs.h, config.h, config_variables.h, external, keynames.h
to filter out automatic clang-formats for better git blame information,
for example:
$ git blame --ignore-revs-file formatting-revs.txt src/antibot/antibot_null.cpp
You can also set it in your .git/config:
[blame]
ignoreRevsFile = formatting-revs.txt
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:
$ python scripts/fix_style.py