Commit graph

3330 commits

Author SHA1 Message Date
Jordy Ruiz 2762e6466c Resolve conflicts 2019-03-23 22:28:21 +01:00
oy 132cfa764f Merge branch 'master' of https://github.com/teeworlds/teeworlds 2019-03-22 20:05:11 +01:00
oy 975baecb3d made it possible to change the skin ingame. closes #2063 2019-03-22 20:04:57 +01:00
oy d436fdb426 added some online checks before trying to send messages to a server 2019-03-22 19:05:48 +01:00
Jordy Ruiz b31557ac88 Small code fixes 2019-03-22 17:17:10 +01:00
oy 6dc6fe343b
Merge pull request #2068 from heinrich5991/pr_translatable_teams
Make messages relating to teams more translatable
2019-03-20 21:40:56 +01:00
Henri Derycke 63f4b3ec3f check whisper messages
don't trust the server
2019-03-18 22:45:55 +01:00
heinrich5991 e5e8eb0840 Add "the" to the "you were moved to xyz" message 2019-03-18 21:15:24 +01:00
heinrich5991 e7f764383a Make messages relating to teams more translatable
Many languages other than English have cases that make it hard or
impossible to use the same "red team" or "blue team" formulation across
multiple sentences.

This allows these languages to translate the strings separately.

This comes at the cost of some code duplication.
2019-03-18 21:15:24 +01:00
heinrich5991 0edf336426 Use the secure RNG for network tokens
These tokens benefit from being unpredictable by an adversary, so let's
make them unpredictable.
2019-03-17 22:54:52 +01:00
oy 594796cd42
Merge pull request #2065 from Dune-jr/feature-stayasspec
Make it so that spectators stay as spectators when map changes
2019-03-17 19:15:30 +01:00
Jordy Ruiz a200bd380f Fix clients connecting as spec getting stuck on map download (@Oy) 2019-03-17 18:43:57 +01:00
Jordy Ruiz c9fc5c6cb6 Make it so that spectators stay as spectators when map changes 2019-03-16 21:57:02 +01:00
Jordy Ruiz 5b8ce27682 Fix sound notifs being displayed when client loads too quick 2019-03-16 19:22:24 +01:00
heinrich5991 963292d0f0 Fix clang warnings
src/engine/client/sound.cpp:54:43: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
static CSample m_aSamples[NUM_SAMPLES] = {0};
                                          ^
                                          {}
src/engine/client/sound.cpp:55:40: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
static CVoice m_aVoices[NUM_VOICES] = {0};
                                       ^
                                       {}
2019-03-10 18:53:27 +01:00
heinrich5991 dae85e244c Stop using deprecated APIs on macOS in server launcher
(cherry picked from commit dcbd8197a4)
2019-03-10 18:53:27 +01:00
oy e7a716aff4
Merge pull request #2039 from Dune-jr/feature-soundnotif
Implement audio toggling with visual effects
2019-03-08 19:35:59 +01:00
Jordy Ruiz bc430595eb Abort in RenderSoundNotification if no active notification 2019-03-08 19:18:37 +01:00
Jordy Ruiz 456c4ac79b Clean up notifications code, fix variable naming 2019-03-08 19:17:05 +01:00
heinrich5991 1f0b2f6ee5 Use more secure hash function for map downloads
SHA256 was chosen because it is reasonably standard, the file names
don't explode in length (this rules out SHA512) and it is supported by
basically all versions of OpenSSL (this rules out SHA512/256 and SHA3).

The protocol is changed in a backward compatible way: The supporting
server sends the SHA256 corresponding to the map in the `MAP_CHANGE`
message after the previously known fields.

For servers not supporting this protocol, the client falls back to
simply opening maps like in the previous scheme.

The filename scheme for downloaded maps changed from `{name}_{crc}.map`
to `{name}_{sha256}.map` if the SHA256 is known, otherwise it falls back
to the previous scheme.

Fixes #1691.
2019-03-08 18:59:20 +01:00
heinrich5991 b986e54039 Add the SHA256 cryptographic hash function
Use the OpenSSL implementation of SHA256 if it is supported, otherwise
fall back to a public domain one.
2019-03-08 02:22:57 +01:00
oy 993c21dff5
Merge pull request #2053 from heinrich5991/pr_fix_findfile
Fix `IStorage::FindFile` in case no CRC or size are specified
2019-03-07 19:29:31 +01:00
oy b7823b2886
Merge pull request #2047 from tsoding/joystick-support
Add Joystick Support
2019-03-07 19:11:25 +01:00
rexim 9e7762113d Make default joystick axis assume the standard left stick 2019-03-07 22:09:16 +07:00
rexim b42d26f611 Move m_pJoystick zeroing to ctor 2019-03-07 22:02:48 +07:00
rexim 9af7fca265 Fix code style 2019-03-07 22:01:18 +07:00
heinrich5991 00cfc4f205 Fix IStorage::FindFile in case no CRC or size are specified
Previously, it only returned files with CRC 0 and size 0 (so empty
files) in case you didn't specify CRC and size.

Also add some tests covering that behavior.
2019-03-07 13:05:47 +01:00
oy 9e16b376bb reset reason field after calling a vote. closes #2041 2019-03-06 18:49:23 +01:00
masahirotoyomura b6c0abe993 added Padding to some dialogs 2019-03-06 17:37:20 +01:00
rexim 23b8508352 Remove verbose debug logging 2019-03-06 02:50:23 +07:00
rexim ca56cba2a7 Replace NULL with 0 2019-03-06 02:48:57 +07:00
rexim aab993f7d9 Match config variable name with console variable name 2019-03-06 02:40:33 +07:00
rexim 78e16d9238 m_Joystick -> m_pJoystick 2019-03-06 02:38:04 +07:00
rexim bd4d5e047d Add Joystick Support 2019-03-06 00:46:54 +07:00
oy 4e14318cd1 fixed resetting player stats when a player leaves and joins 2019-02-27 18:56:24 +01:00
oy 05fe3e2694 fixed some mingw warnings 2019-02-27 18:53:59 +01:00
Jordy Ruiz 81f8a03be7 Fix Com_TEAM not copying parameter properly and some minor code issues 2019-02-21 18:34:34 +01:00
Jordy Ruiz b6f086dfea Keep parameter as text when using /all, /team, /r. Remove CHAT_NONE check in EnableMode 2019-02-21 18:05:05 +01:00
Jordy Ruiz 2fd4abb2c2 Fix /r selecting the wrong whisper target 2019-02-21 16:07:08 +01:00
Jordy Ruiz ccddc035e1 Subtly differenciate server-generated and client-generated messages in the chat 2019-02-21 16:06:44 +01:00
oy bfee7275c7
Merge pull request #2044 from Dune-jr/fix-screen-clamp
Fix clamping of screen index value
2019-02-21 12:06:39 +01:00
Jordy Ruiz a9b4f8ad8c Fix clamping of screen index value 2019-02-21 11:58:15 +01:00
oy ea4427d4ea
Merge pull request #2040 from nheir/fix/scroll_detail_scoreboard
fix scrollbar in serverbrowser's detail scoreboard
2019-02-21 08:33:01 +01:00
Jordy Ruiz 305e04e597 Implement chat commands 2019-02-20 11:20:40 +01:00
nheir d82d5f2049 fix scrollbar in serverbrowser's detail scoreboard 2019-02-18 21:39:38 +01:00
Jordy Ruiz 3d787ceada Add str_clean_whitespaces_simple and str_skip_to_whitespace_const 2019-02-18 11:39:42 +01:00
Jordy Ruiz ce54eca85d Extend default key binds to support modifiers, add ctrl+s as a default for sound toggle, update controls settings 2019-02-16 19:33:21 +01:00
Jordy Ruiz e7c502e537 Add a notifications component, implement sound toggling effects, and add a couple of icons for that 2019-02-16 19:32:35 +01:00
Jordy Ruiz 2f5ca88b4d Adjust spectator notification to show up for non-empty servers only 2019-02-16 13:12:12 +01:00
oy d0294dbe5f let SDL use the X11 XRandR window manager per default. there's a command "gfx_use_x11xrandr_wm" to turn that off. this should help with override redirect issues 2019-02-10 19:13:32 +01:00