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
2758: Remove the rudimentary fuzzing since no one uses it anyway r=heinrich5991 a=def-
2769: Update front.png by Soreu r=heinrich5991 a=def-
2772: Dont predict camera position on spectator changed r=heinrich5991 a=BannZay
No reason to predict camera position in case when we just changed spectator.
But tbh I have not found a big reason to predict it at all.
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Andrii <bannzay3@gmail.com>
2742: Add str_utf8_copy that trim broken utf8 sequence at the end. r=heinrich5991 a=TsFreddie
Currently this replaces `str_copy` text input and clipboard paste in chat. Many places may need the same treatments, like steam names.
![image](https://user-images.githubusercontent.com/3797859/92263741-08b8e080-eed5-11ea-84a5-b7f070ded260.png)
Test string:
abcd今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打
2745: Update mapres by mind r=heinrich5991 a=def-
Adapted from 0.7 for new renderer. Not sure if this makes sense :D
Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
src/game/client/prediction/gameworld.h:62:90: error: ‘int64_t’ has not been declared
62 | void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
| ^~~~~~~
src/game/server/ddracecommands.cpp:743:39: warning: unknown conversion type character ‘l’ in format [-Wformat=]
743 | str_format(aBuf, sizeof(aBuf), "%s-%lld-%s.save", pSelf->Server()->GetMapName(), time_get(), pSelf->Server()->GetAuthName(pResult->m_ClientID));
See https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
Quoting the man page of vsnprintf:
RETURN VALUE
Upon successful return, these functions return the number of characters printed
(excluding the null byte used to end output to strings).
The functions snprintf() and vsnprintf() do not write more than size bytes (including
the terminating null byte ('\0')). If the output was truncated due to this limit,
then the return value is the number of characters (excluding the terminating null
byte) which would have been written to the final string if enough space had been
available. Thus, a return value of size or more means that the output was truncated.
(See also below under NOTES.)
If an output error is encountered, a negative value is returned.
[...]
The glibc implementation of the functions snprintf() and vsnprintf() conforms to the
C99 standard, that is, behaves as described above, since glibc version 2.1. Until
glibc 2.0.6, they would return -1 when the output was truncated.