Commit graph

7017 commits

Author SHA1 Message Date
Дядя Женя 6708a7a69d Chat visual update 2020-10-17 15:50:35 +02:00
Jupeyy 186206d40c Fix and change text cursor 2020-10-17 15:26:33 +02:00
bors[bot] 996270af18
Merge #3120
3120: Embed map sounds by default r=heinrich5991 a=Patiga

Not one ddnet map has a external map sound since there are none which would work that way

Co-authored-by: Patiga <dev@patiga.eu>
2020-10-17 13:16:55 +00:00
Patiga 17e531374c Embed sounds by default 2020-10-17 14:05:06 +02:00
def ae90bdf3f9 Show halloween skins only on Halloween
Making use of the skin downloader.

Skin choice is based on your name, only active on October 31 and November 1 with events 1 in settings
2020-10-17 12:10:56 +02:00
def 28250897d3 Version 15.1.3 2020-10-15 18:59:17 +02:00
Jupeyy 537f47d11d Make GL 1.5 default 2020-10-15 18:47:06 +02:00
Learath 85f385b37b Optimize nameplate rendering. Fix #3103 2020-10-15 15:35:25 +02:00
bors[bot] 9e060d78b0
Merge #3100
3100: Fix offline client that is not in menu r=heinrich5991 a=Jupeyy

E.g. popups like "ddnet-info.json" failed will cause weird NaN glitches, bcs the impl relys on ChangePosition to clean movetime and animation start

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:54:46 +00:00
bors[bot] 09549ebc85
Merge #3101
3101: Fix hookchains r=heinrich5991 a=Jupeyy

Its already increased by the for loop.
Might have made the hook shorter(for very very long hooks) the past 3 years xd

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:47:21 +00:00
bors[bot] 6ed79fff5f
Merge #3099
3099: Add missing UpdateRenderInfo call r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:27:28 +00:00
Jupeyy ca645bf53e Fix hookchains 2020-10-14 23:03:14 +02:00
Jupeyy 6eb6fad867 Fix offline client that is not in menu 2020-10-14 22:10:48 +02:00
Jupeyy fd0848291d Add missing UpdateRenderInfo call 2020-10-14 19:00:39 +02:00
heinrich5991 070504b5c8 Update ghost format to v6: Replace CRC with SHA256
To be friendly to other implementors of the format, the CRC field is now
zeroed out instead of completely gone.

Drop support for v2 and v3 of the ghost format, the ghost files should
have been automatically converted by the client already.
2020-10-14 17:08:58 +02:00
heinrich5991 6ff53358d3 Remove code for CRC in most places, except where needed for net compat
This should path the way to remove it altogether in the future.
2020-10-14 17:08:58 +02:00
heinrich5991 246d2ac3d6 Allow IServer users to check when client's names change
Use that available interface to process name change spam protection more
cleanly.
2020-10-14 16:42:35 +02:00
def 87b06d307f Fix clang-analyzer-core.UndefinedBinaryOperatorResult
/media/ddnet/src/game/client/animstate.cpp:54:27: warning: The left operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
        pSeq->m_X += pAdded->m_X * Amount;
                                 ^
2020-10-14 15:45:47 +02:00
def 6443e708b5 Fix clang-analyzer-core.CallAndMessage
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
                                int RunID = pCurrentConf->m_aRuns.add(NewRun);
                                            ^
2020-10-14 15:45:47 +02:00
def 0867424749 Fix clang-analyzer-security.insecureAPI.strcpy
/media/ddnet/src/engine/server/sql_string_helpers.cpp:74:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
2020-10-14 15:45:47 +02:00
def 98d4baabed Fix clang-analyzer-core.NonNullParamChecker
/media/ddnet/src/game/server/entities/projectile.cpp:201:37: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker]
                                        Found = GetNearestAirPosPlayer(pTargetChr->m_Pos, &PossiblePos);
                                                                       ^
2020-10-14 15:45:47 +02:00
def 5c1b8cd221 Fix clang-analyzer-deadcode.DeadStores
/media/ddnet/src/game/client/components/statboard.cpp:288:3: warning: Value stored to 'tw' is never read [clang-analyzer-deadcode.DeadStores]
2020-10-14 15:45:47 +02:00
def a4f13ed4a8 Fix clang-analyzer-optin.portability.UnixAPI
and mark some false positives

/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
2020-10-14 15:45:43 +02:00
def 911cb5cb9b CAutoMapper: Delete pUpdateLayer
/media/ddnet/src/game/editor/auto_map.cpp:433:1: warning: Potential leak of memory pointed to by 'pUpdateLayer' [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
2020-10-14 14:54:33 +02:00
def 7d476c3858 Fix clang-analyzer-security.FloatLoopCounter
[81/219] Building CXX object CMakeFiles/game-shared.dir/src/game/collision.cpp.o
/media/ddnet/src/game/collision.cpp:1197:2: warning: Variable 'f' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
        for(float f = 0; f < d; f++)
        ^
2020-10-14 14:54:33 +02:00
TsFreddie 6006c9d85b smooth camera 2020-10-14 08:43:30 +08:00
heinrich5991 5b4c64005f Disallow player name changes when the player is muted 2020-10-14 01:19:41 +02:00
Jupeyy 8e9baedf9a Use pointer directly for tile layer building 2020-10-13 19:52:14 +02:00
Jupeyy 4c87b0cf05 Make menu background camera impl more robust 2020-10-13 15:37:34 +02:00
Patiga a252097e9a Fix comments 2020-10-13 09:53:33 +02:00
Patiga 06e90505b1 Use the same value as vanilla 2020-10-13 09:50:03 +02:00
def fedb031250 Version 15.1.2 2020-10-12 15:13:22 +02:00
Jupeyy ec16abdb54 Fix skin load 2020-10-12 12:31:43 +02:00
bors[bot] 1d961a262f
Merge #3069
3069: Recreate score hud when any score changed r=Learath2 a=def-

Fixes problem with too long strings because we display the score centered

Thanks to ExP for report:
![screenshot_2020-10-11_17-18-45](https://user-images.githubusercontent.com/2335377/95682429-7a2b3380-0be5-11eb-8186-c1dbf922b960.png)

Fixed:
![screenshot-20201011@171419](https://user-images.githubusercontent.com/2335377/95682443-88794f80-0be5-11eb-9d10-79ea5df785c0.png)
![screenshot-20201011@171423](https://user-images.githubusercontent.com/2335377/95682441-857e5f00-0be5-11eb-805a-8312e43f5ba1.png)


Co-authored-by: def <dennis@felsin9.de>
2020-10-11 15:45:35 +00:00
def d0005d3866 Right-align hud scores 2020-10-11 17:27:55 +02:00
def 2a06b3ccb5 Recreate score hud when any score changed
Fixes problem with too long strings because we display the score centered

Thanks to ExP for report
2020-10-11 17:15:43 +02:00
bors[bot] ea1acfd22c
Merge #3067
3067: Document highest and lowest values for cl_video_crf r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:54:03 +00:00
bors[bot] 91619b9886
Merge #3051
3051: Fix some undefined behaviour r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:46:44 +00:00
bors[bot] 7e84e1ef43
Merge #3066
3066: Disallow more commands with testing mode r=def- a=heinrich5991

Also show some useful error message

Supersedes #2778.

Co-authored-by: Andrii <bannzay3@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-11 14:39:29 +00:00
def ae1a266dac CCharacterCore::Tick caused out of bounds
src/game/teamscore.cpp:27:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5b948 in CTeamsCore::CanKeepHook(int, int) const src/game/teamscore.cpp:27
    #1 0xf46fe1 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:325
    #2 0xaf7366 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2441
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)

src/game/teamscore.cpp:34:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5be68 in CTeamsCore::CanCollide(int, int) const src/game/teamscore.cpp:34
    #1 0xf46458 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:271
    #2 0xaf7374 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2442
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 476a912b3f Fix CRaceDemo + CGhost out of bounds access
#0 0x9f70dd in CRaceDemo::OnMessage(int, void*) src/game/client/components/race_demo.cpp:134
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)

src/game/client/components/ghost.cpp:600:35: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x78201a in CGhost::OnMessage(int, void*) src/game/client/components/ghost.cpp:600
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 6680ec388c Reset CCharacterCore at start
Hopefully fixes these by initializing m_Pos:

src/game/collision.cpp:345:10: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a8f0967 in CCollision::IntersectLineTeleHook(vector2_base<float>, vector2_base<float>, vector2_base<float>*, vector2_base<float>*, int*) /media/ddnet/src/game/collision.cpp:345:10
    #1 0x55e85a90767b in CCharacterCore::Tick(bool) /media/ddnet/src/game/gamecore.cpp:255:27
    #2 0x55e85af8e477 in CCharacter::Tick() /media/ddnet/src/game/client/prediction/entities/character.cpp:562:9
    #3 0x55e85afc867f in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:193:10
    #4 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #5 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #6 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #7 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)

src/base/math.h:22:40: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a900c2f in round_to_int(float) /media/ddnet/src/base/math.h:22:40
    #1 0x55e85a90cac1 in CCharacterCore::Write(CNetObj_CharacterCore*) /media/ddnet/src/game/gamecore.cpp:515:22
    #2 0x55e85a90e171 in CCharacterCore::Quantize() /media/ddnet/src/game/gamecore.cpp:574:2
    #3 0x55e85af90be9 in CCharacter::TickDefered() /media/ddnet/src/game/client/prediction/entities/character.cpp:580:9
    #4 0x55e85afc8a1b in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:201:10
    #5 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #6 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #7 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #8 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #9 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #10 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #11 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 60f4e078b7 Out of bounds access in RenderPlayer
src/game/client/components/players.cpp:197:5: runtime error: index -2 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x56548eec0487 in CPlayers::RenderPlayer(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /media/ddnet/src/game/client/components/players.cpp:197:37
    #1 0x56548ec97234 in CGhost::OnRender() /media/ddnet/src/game/client/components/ghost.cpp:344:26
    #2 0x56548ef92b26 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #3 0x56548ea4659e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #4 0x56548ea7b90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #5 0x56548ea9bb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7f7c844f1151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x56548e7e8e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 47299e8586 Out of bounds access in CMenus::RenderGame
src/game/client/components/menus_ingame.cpp:108:16: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a64c4 in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:108:73
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/game/client/components/menus_ingame.cpp:108:16 in
src/game/client/components/menus_ingame.cpp:109:14: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a699a in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:109:71
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def f94d476cf2 Don't divide by 0 in LoadSkin
src/game/client/components/skins.cpp:142:14: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55b6bd0f49e1 in CSkins::LoadSkin(char const*, char const*, int, int*) /media/ddnet/src/game/client/components/skins.cpp:142:14
    #1 0x55b6bd0f0942 in CSkins::SkinScan(char const*, int, int, void*) /media/ddnet/src/game/client/components/skins.cpp:55:16
    #2 0x55b6bcb33928 in fs_listdir /media/ddnet/src/base/system.c:2033:6
    #3 0x55b6bcb04024 in CStorage::ListDirectory(int, char const*, int (*)(char const*, int, int, void*), void*) /media/ddnet/src/engine/shared/storage.cpp:316:5
    #4 0x55b6bd0f9e2f in CSkins::Refresh() /media/ddnet/src/game/client/components/skins.cpp:222:13
    #5 0x55b6bd0f6e33 in CSkins::OnInit() /media/ddnet/src/game/client/components/skins.cpp:194:2
    #6 0x55b6bd14c63f in CGameClient::OnInit() /media/ddnet/src/game/client/gameclient.cpp:322:28
    #7 0x55b6bcc5f9f8 in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3089:16
    #8 0x55b6bcc84b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7f1144ded151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55b6bc9d1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 612f665a6e Document highest and lowest values for cl_video_crf 2020-10-11 16:29:39 +02:00
heinrich5991 a2b3f45f8b Reintroduce CMDFLAG_TEST
Add some more helpful messages for executing test/game commands.
2020-10-11 16:27:28 +02:00
def b7c8da54a3 Make clan plates fit & only show when name plates enabled
Thanks to HamidReza for report
2020-10-11 16:24:01 +02:00
Andrii 26a07c804f Disallow game-related commands unless testing is enabled 2020-10-11 16:02:10 +02:00
bors[bot] 6ab806fde8
Merge #3048 #3063
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-

As requested by Pipou

3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm

otherwise reason can be cut off

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-10-11 13:00:23 +00:00
Andrii 52efb23545 Update demo browser on demo save 2020-10-11 15:45:31 +03:00
bors[bot] e44df2d136
Merge #3059
3059: Add box offset to align better on spec tab r=def- a=ardadem

Old:
![2020-10-11-12:07:54-screenshot](https://user-images.githubusercontent.com/13207692/95674696-91a0f700-0bba-11eb-8291-275cc263b6c1.png)

New:
![2020-10-11-12:08:36-screenshot](https://user-images.githubusercontent.com/13207692/95674697-92d22400-0bba-11eb-8b60-36f0d85fbae4.png)

Very small visual change but heart fits better now for >32 players.

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-11 09:15:25 +00:00
def 4327194d27 Add GUI & Game sound volume sliders
As requested by Pipou
2020-10-11 10:16:38 +02:00
def 284c287c99 Version 15.1.1 2020-10-11 10:14:21 +02:00
bors[bot] a68fca6d7c
Merge #3036
3036: Consider as not-afk on emoticon, chat, vote, r=heinrich5991 a=def-

call vote, spectator mode, info change

Co-authored-by: def <dennis@felsin9.de>
2020-10-11 00:26:30 +00:00
def 507f7f6085 Version 15.1 2020-10-11 00:00:33 +02:00
Jupeyy 58bd8dcbb6 Fix virtual call in Constructor 2020-10-10 12:16:27 +02:00
bors[bot] 9d39e1da6d
Merge #3046
3046: Remove usages of qsort r=def- a=Learath2

Caught my eye while doing the integrity PR.

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-10 08:38:12 +00:00
Learath2 d8c9a71e18 Remove usages of qsort 2020-10-10 01:18:42 +02:00
bors[bot] 2917681bf5
Merge #3047
3047: Fix ui_page/ui_settings_page ranges r=Learath2 a=def-

For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 23:16:51 +00:00
def 10e7b2ed7b Fix ui_page/ui_settings_page ranges
For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered
2020-10-09 22:51:16 +02:00
Arda Demir 75cd653f4c Add box offset to align better on spec tab 2020-10-09 22:14:54 +03:00
ChillerDragon 263fdbd8e1 Use 0.7 gameskin by @Zatline
a5105264ff
db08239506
31c6d2684d
2020-10-09 21:04:06 +02:00
bors[bot] f93c8e4fdb
Merge #2987
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy

fixes #2203 

Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.

Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems

I also added the ninja bar analyzer for #2921


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 15:20:48 +00:00
bors[bot] ce9ba5ec09
Merge #3018
3018: Editor: Improve usability of server settings r=Jupeyy a=def-

- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 14:48:59 +00:00
def ea8bee4d34 Focus command field when something changed 2020-10-09 16:40:59 +02:00
bors[bot] b208ee3a81
Merge #3039
3039: Show friends on spectate tab r=def- a=ardadem

![2020-10-08-13:22:48-screenshot](https://user-images.githubusercontent.com/13207692/95447050-d5e98880-0969-11eb-923a-2b647933774d.png)
![2020-10-08-13:23:14-screenshot](https://user-images.githubusercontent.com/13207692/95447054-d71ab580-0969-11eb-8ace-a893cfa80a97.png)

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-09 14:38:12 +00:00
bors[bot] cf6ace1744
Merge #3022
3022: Text alignment r=def- a=Jupeyy

i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd

i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 14:31:25 +00:00
Jupeyy 8d6148b20b Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
Jupeyy 94a20d11fa Use renderinfo for player death effect 2020-10-08 21:54:53 +02:00
Arda Demir 84c36b3423 Show friends on spectate tab 2020-10-08 13:25:05 +03:00
bors[bot] 2d0c65bf53
Merge #3038
3038: Use std::sort instead of bubble_sort r=def- a=Jupeyy

Noticed, that its really slow, when you have alot of auto demos

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:36:53 +00:00
bors[bot] cbec1a5eb4
Merge #3037
3037: Init date for demo dirs r=def- a=Jupeyy

Just to not rely on uninitialized values

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:30:05 +00:00
Jupeyy 52911e4302 Use std::sort instead of bubble_sort 2020-10-08 08:00:01 +02:00
Jupeyy a4b32d19a1 Init date for demo dirs 2020-10-08 07:20:32 +02:00
bors[bot] 6376890fc1
Merge #3035
3035: Fix button rendering in "Render demo" r=Jupeyy a=def-

hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce

![screenshot-20201007@231230](https://user-images.githubusercontent.com/2335377/95388468-a3e90f80-08f2-11eb-8818-5b9e91116c49.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-08 04:59:34 +00:00
def 04b840f542 Consider as not-afk on emoticon, chat, vote,
call vote, spectator mode, info change
2020-10-07 23:24:50 +02:00
def 51b967085a Fix button rendering in "Render demo"
hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce
2020-10-07 23:12:18 +02:00
Arda Demir 9ead551b98 Render afk emote instead of chat emote 2020-10-07 22:04:07 +03:00
Tim Schumacher 29644780af
Redownload skins of other players on skin directory refresh (closes #3030) 2020-10-07 12:19:38 +02:00
Jupeyy 5ebabe2ece Text alignment 2020-10-07 04:44:35 +02:00
bors[bot] 4a30ef1e9a
Merge #3020
3020: Fix all Multiplication type alerts by CodeQL r=heinrich5991 a=def-

> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster

Co-authored-by: def <dennis@felsin9.de>
2020-10-07 00:56:19 +00:00
bors[bot] bbd87eb128
Merge #3025
3025: Don't make width depend on localized text r=heinrich5991 a=def-

or we end up with totally broken input boxes

As reported by Rezee:
![unknown](https://user-images.githubusercontent.com/2335377/95226414-31e2ce80-07fd-11eb-8ea6-a612bc2397bb.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 21:40:14 +00:00
def 6a0a1ce522 Don't make width depend on localized text
or we end up with totally broken input boxes
2020-10-06 17:55:24 +02:00
bors[bot] 1a4866182e
Merge #3023
3023: Add refresh button for skins, closes #2979 r=def- a=Blacksky780i

![image](https://user-images.githubusercontent.com/72441389/95212455-00163b80-07ee-11eb-953e-2e0593b8cfea.png)


Co-authored-by: Irisk <>
2020-10-06 15:14:46 +00:00
bors[bot] 4706b0f5be
Merge #3005
3005: Use rest instead of string in some commands r=heinrich5991 a=def-

where it makes sense, means you don't need to quote strings for those

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 15:06:45 +00:00
Irisk fb0372b97f Add refresh button for skins, closes #2979 2020-10-06 16:04:59 +02:00
bors[bot] 1f7d544349
Merge #3010 #3014
3010: Use hours in score hud and record r=Learath2 a=def-



3014: Scale auto mapper text size (partially fixes #3013) r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:22:06 +00:00
bors[bot] 25e025dd16
Merge #3008
3008: Censor string multiple times r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:04:45 +00:00
bors[bot] 79b5852e17
Merge #3021
3021: only load + save auto mappers for tile layers, not physics layers r=def- a=Patiga

If I'm not mistaken, loading a map without auto mappers, then saving would've caused uninitialized values to be written to the auto mappers of physics layers.

Co-authored-by: patiga <dev@patiga.eu>
2020-10-06 07:37:26 +00:00
bors[bot] ecb5e4c790
Merge #3015
3015: Allow quitting instantly with SDL_QUIT when non-warning dialog showing r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 00:33:04 +00:00
patiga 95fadea794 Fix style properly 2020-10-05 20:09:19 +02:00
patiga 09a9ca9699 Conform to style 2020-10-05 19:59:48 +02:00
patiga d123d928b4 only load + save auto mappers for tile layers, not physics layers 2020-10-05 19:44:26 +02:00
def 62dc12aacb Fix all Multiplication type alerts by CodeQL
> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster
2020-10-05 19:03:54 +02:00
bors[bot] 75bdcce3ce
Merge #2980
2980: Fix laser prediction for non ddrace mods r=def- a=Jupeyy

Correct me, if this is wrong, but only ddrace based mods cannot shot laser through itself.
Tested on vanilla, ictf and fng(with antiping on and prediction on)

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 16:29:35 +00:00
def 032ae67814 Editor: Improve usability of server settings
- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke
2020-10-05 17:16:48 +02:00
bors[bot] 1b253bfbfd
Merge #3002
3002: Make animations more consistent with high float values r=def- a=Jupeyy

fixes what is described in #2997

Old client animation when server time is huge:

[vid_old.zip](https://github.com/ddnet/ddnet/files/5322484/vid_old.zip)

 client animation when server time is huge:

[vid_new.zip](https://github.com/ddnet/ddnet/files/5322486/vid_new.zip)

@Fireball-Teeworlds maybe u can try, if that fixes the stuff for u

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 14:48:09 +00:00
def 5b06f54d06 censorlist without case 2020-10-05 10:55:32 +02:00
Jupeyy 50b20fb1cd Make animations more consistent with high float values 2020-10-05 02:32:50 +02:00
def 1a83651cf1 Allow quitting instantly with SDL_QUIT when non-warning dialog showing 2020-10-04 22:46:28 +02:00
def c25aede8ea Scale auto mapper text size (partially fixes #3013) 2020-10-04 22:39:43 +02:00
def d5fc613b8b Revert "Show File button in demo player"
As reported by Soreu, doesn't work on Windows (Can't open file warning
pops up)

This reverts commit 8efff70d88.
2020-10-04 18:24:15 +02:00
def 1067e2b844 Use hours in score hud and record
to be consistent with score board
2020-10-04 18:20:29 +02:00
def 5ec702ad2f Use rest instead of string in some commands
where it makes sense, means you don't need to quote strings for those
2020-10-04 17:52:05 +02:00
def 04f2fc5d41 Censor string multiple times 2020-10-04 17:49:19 +02:00
bors[bot] 2b7b92355f
Merge #3006
3006: Only ignore ctrl+shift for press, not release r=Jupeyy a=def-

@Jupeyy How about this?

Co-authored-by: def <dennis@felsin9.de>
2020-10-04 11:26:29 +00:00
def 6507b1b802 Only ignore ctrl+shift for press, not release 2020-10-04 12:14:16 +02:00
bors[bot] 9df4299bb5
Merge #2999 #3001 #3003
2999: Add Serbian Cyrillic translation r=def- a=cobisimo

This is adding Serbian Cyrillic translation and contain complete translation with latest strings.

by Veljko Radovanovic (VekiPro)

3001: Use skin pointer directly r=def- a=Jupeyy

Can't tell if setting the hot item in gui invalidly can potentially break stuff, also a skin refresh button would make this useless anyway

3003: Update brazilian_portuguese.txt r=def- a=rffontenelle



Co-authored-by: Nikola Radovanovic <nikola.r@toptal.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2020-10-04 08:01:53 +00:00
bors[bot] b33b3295c0
Merge #2997
2997: Make menu background animations smoother r=def- a=Fireball-Teeworlds

time_get_microseconds() can potentially return big numbers (on my system it seems to be equal to uptime) and at some point float's precision is no longer enough for every 1/60th of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.

Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-04 07:55:23 +00:00
bors[bot] 9717c4453f
Merge #2982 #2985 #2996
2982: Update french translation r=Jupeyy a=def-

by SunnyPistache & Pipou

2985: No country flag for Traditional Chinese r=Jupeyy a=def-



2996: Make types/countries fit ingame (fixes #2989) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 02:22:18 +00:00
Jupeyy 7f78ecde82 Use skin pointer directly 2020-10-04 00:56:19 +02:00
Fireball 88c31a4711 Make menu background animations smoother
time_get_microseconds() count starts from 1970-01-01 and float's precision is not enough for every 1/60 of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.
2020-10-03 20:07:14 +01:00
def 3a55ff86d6 Make types/countries fit ingame (fixes #2989) 2020-10-03 21:02:36 +02:00
bors[bot] 1040b59c05
Merge #2994
2994: Fix multiple layer editing r=def- a=Learath2

Idk how I thought this ever worked. Fixes #2981 

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-03 18:59:04 +00:00
Learath2 db9a762f58 Fix multiple layer editing. Close #2981 2020-10-03 18:35:45 +02:00
def 1e900af5fa Disable +xxx binds when pressing ctrl+shift
Seems a bit more general than hardcoding ctrl+shift+d, ctrl+shift+g, ctrl+shift+e
2020-10-03 10:03:20 +02:00
def 830352fd70 Revert "Fix ctrl+shift+d moving tee (fixes #2930)"
This reverts commit 9b0081de57.
2020-10-03 09:57:20 +02:00
Jupeyy 54bbf69488 Fix laser prediction for non ddrace mods 2020-10-03 03:10:54 +02:00
bors[bot] b27b54a051
Merge #2893 #2972 #2974
2893: Determine binary dir independently of data dir (fixes #2891) r=heinrich5991 a=def-

@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?

2972: Add explicit button for current map as BG r=heinrich5991 a=def-



2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991

Fix #2962.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-02 17:43:04 +00:00
bors[bot] 839f0862fb
Merge #2968 #2969
2968: Create codeql-analysis.yaml r=heinrich5991 a=def-



2969: Print error when opening config file for writing fails r=heinrich5991 a=def-



Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:35:09 +00:00
bors[bot] 663d60fa9a
Merge #2941
2941: Fix ctrl+shift+d moving tee (fixes #2930) r=heinrich5991 a=def-

@plsplsplslol ok from your side?

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:21:39 +00:00
bors[bot] d2df9c6a66
Merge #2948 #2956 #2965
2948: Show File button in demo player r=heinrich5991 a=def-

to easily get the file instead of having to search for it in the file browser again. Complements #2946

2956: Add Background music volume slider r=heinrich5991 a=def-

as requested by hussainx3

2965: Clean up some data r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:56:17 +00:00
bors[bot] 5dd1721e63
Merge #2958 #2961 #2963
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-



2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-



2963: Handle PNG read errors (fixes #2959) r=heinrich5991 a=def-

and print a more telling error message

I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:31:13 +00:00
bors[bot] 4383b8a7e7
Merge #2942 #2943
2942: Update swedish translations (by cur.ie) r=heinrich5991 a=def-



2943: Need to send info when updating skin in text field r=heinrich5991 a=def-

As reported by abcqwerty on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:23:49 +00:00
bors[bot] 2a76cddb4e
Merge #2922
2922: Don't show wrong decisecs in game time in HUD r=heinrich5991 a=def-

I think .me' reported this to me 7 years ago and I've been noticing that they're wrong since then. Time to remove I guess, they don't seem useful anyway.

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:16:55 +00:00
bors[bot] 4a6a299d2e
Merge #2973
2973: initialize physics layer pointer, layer item version (partially fixes #2971) r=def- a=Patiga

Note that the zlib compression still makes it non-deterministic across different machines/versions

Co-authored-by: patiga <patigatus21@gmail.com>
2020-10-02 15:59:38 +00:00
patiga fc9e1bc325 initialize physics layer pointer, layer item version 2020-10-02 17:45:28 +02:00
Dennis Felsing 317bf6bba4 Don't try to load %current% as a normal map 2020-10-02 16:23:16 +02:00
Dennis Felsing 2dc725e0f6 Rename CURRENT to CURRENT_MAP 2020-10-02 16:21:18 +02:00
Dennis Felsing 0f177bad46 Add explicit button for current map as BG 2020-10-02 16:20:19 +02:00
Dennis Felsing 6839e5f20d QUITING -> QUITTING 2020-10-02 16:06:21 +02:00
Dennis Felsing 2ba9535529 Use warnings popups for some io failures 2020-10-02 16:06:16 +02:00
bors[bot] 74550e2c45
Merge #2932
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>
2020-10-02 07:55:30 +00:00
def 134400158a Clean up MapLayers 2020-09-30 23:59:50 +02:00
def 12f150393b Free assets 2020-09-30 23:59:38 +02:00
Pure luck 9a89b6fc68 fix for a SixUp vote creator id which wasn't set 2020-09-30 18:01:50 +03:00
def 1560a88413 AntiPing limit is unintuitive, remove from settings 2020-09-30 10:17:17 +02:00
def ba258d7343 Add Background music volume slider
as requested by hussainx3
2020-09-30 10:06:55 +02:00
def 973a4caf4b Show days and hours in game time 2020-09-29 22:58:34 +02:00
def 1b1d8f7964 Don't show wrong decisecs in game time in HUD 2020-09-29 22:58:34 +02:00
def 9b0081de57 Fix ctrl+shift+d moving tee (fixes #2930) 2020-09-29 22:58:26 +02:00
def 10355851ca Need to send info when updating skin in text field
As reported by abcqwerty on Discord
2020-09-29 22:58:09 +02:00
def 8efff70d88 Show File button in demo player
to easily get the file instead of having to search for it in the file
browser again. Complements #2946
2020-09-29 22:57:55 +02:00
def b6e4626053 Add clear button to server address field
as suggested by Cøke
2020-09-29 22:41:41 +02:00
Dennis Felsing 1a7eed4937
Merge pull request #2951 from def-/pr-repeated
Reset m_TimesRepeated on new line
2020-09-29 19:02:34 +02:00
def 90211d18ef Reset m_TimesRepeated on new line
otherwise random lines will mistakenly show [2]
2020-09-29 17:01:57 +02:00
Learath 88c054261a Fix multiple layer selection for groups 2020-09-29 13:31:22 +03:00
bors[bot] 7432f569e2
Merge #2946
2946: Add directory buttons r=def- a=Jupeyy

fixes #2944

windows:

![screenshot_2020-09-29_03-16-32](https://user-images.githubusercontent.com/6654924/94502023-78d03300-0203-11eb-8807-ba9d9dca801b.png)

skin:

![screenshot_2020-09-29_03-20-32](https://user-images.githubusercontent.com/6654924/94502035-85548b80-0203-11eb-8105-d1e52593f1e5.png)


but no chance for demo:
![screenshot_2020-09-29_03-23-13](https://user-images.githubusercontent.com/6654924/94502044-8b4a6c80-0203-11eb-8161-4897082a5a66.png)

naming suggestions are welcome
theme directory, themes directory
whatever

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-29 09:30:39 +00:00
Jupeyy 456625893b Add directory buttons 2020-09-29 10:24:40 +02:00
def e4023cb18b Dynamic Camera button: Use g_Config.m_ClDyncam as pID 2020-09-29 08:25:38 +02:00
Dennis Felsing 16f965a0e6
Merge pull request #2940 from def-/pr-empty-lines
Fix empty lines in chat (fixes #1835)
2020-09-29 07:51:12 +02:00
Dennis Felsing b88b33cea4
Merge pull request #2928 from Jupeyy/pr_multiple_pngs
Add changeable assets
2020-09-29 07:46:43 +02:00
def 18ad5b58c0 Fix empty lines in chat (fixes #1835) 2020-09-28 23:25:04 +02:00
Jupeyy 0e71a47708 Add customization 2020-09-28 23:21:32 +02:00
Fireball d06e956739 Don't change SpectatorID when not spectating, simplify code
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2020-09-28 19:55:47 +01:00
plsplsplslol 236015c474 print out modifiers when unbinding 2020-09-27 17:38:50 -07:00
bors[bot] af958704ca
Merge #2887
2887: Join identical chat lines to prevent spam r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93714967-6f412e00-fb66-11ea-9b56-2ff2c053b8c1.png)

May fix https://github.com/ddnet/ddnet/issues/259

Needs a bit more testing

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-27 19:28:55 +00:00
Edgar 5391ff8cc9
fix auto rules scrollbar bugs 2020-09-27 17:20:41 +02:00
Edgar 12161cc55b
change and fix how counter is displayed 2020-09-27 13:28:50 +02:00
def 2deb8aa380 Fix Windows compilation 2020-09-27 11:05:54 +02:00
Edgar 1d8a20f17a join multiple identic chat lines 2020-09-27 00:39:16 +02:00
bors[bot] 6bb8cda483
Merge #2926
2926: clang-format entire repo r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-26 22:10:58 +00:00
def 3be8a592e5 Run clang-format
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
2020-09-26 21:50:15 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
bors[bot] 50b8771d04
Merge #2931
2931: Only auto dilate for transparent images r=def- a=Jupeyy

As reported by mind

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-26 19:37:32 +00:00
def f74cc43f4c Remove pure server filters, add space for Countries/Types
Not so relevant anymore
2020-09-26 21:33:25 +02:00
Jupeyy c69c765507 Only auto dilate for transparent images 2020-09-26 18:57:19 +02:00
def dcfa752e61 After initialization: Agressively try to grab window again
Since some users on Windows report window not being initially focussed
2020-09-26 09:09:05 +02:00
bors[bot] 8b399ba1be
Merge #2861
2861: Implement censoring words on server r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-25 23:07:15 +00:00
bors[bot] c6ade7eeeb
Merge #2917
2917: Create ALLOW_X_SKINS game info flag r=heinrich5991 a=def-

To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.

Co-authored-by: def <dennis@felsin9.de>
2020-09-25 21:22:38 +00:00
def f2386d5c02 Address reviewer comments 2020-09-25 22:25:45 +02:00
bors[bot] 5f6ba345b8
Merge #2923 #2924
2923: Don't str_copy into string itself r=Learath2 a=def-

when reconnecting after server was full:

[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
   at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
   by 0x249180: str_copy (system.c:2328)
   by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
   by 0x287864: CClient::Update() (client.cpp:2914)
   by 0x28891B: CClient::Run() (client.cpp:3216)
   by 0x28EDEC: main (client.cpp:4309)

2924: Fix Score/Time alignment r=def- a=Learath2

![screenshot_2020-09-25_16-52-30](https://user-images.githubusercontent.com/490500/94275676-e81dfc80-ff4f-11ea-9f21-dbf5d1cf73a9.png)

Also adds hours to the time

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
2020-09-25 14:55:51 +00:00
Learath 32c3cba4fa Fix scoreboard alignment issues 2020-09-25 17:44:37 +03:00
Pure luck 3cd0f30d55 laser_damage bugfix styling 2020-09-25 17:41:17 +03:00
Pure luck e7d830a01e bugfix: laser_damage was removed from tunes of 0.7 protocol 2020-09-25 17:25:59 +03:00
bors[bot] 32c77faecc
Merge #2920
2920: stop disabling textinput during connecting r=def- a=TsFreddie

closes #2919 

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-25 05:51:32 +00:00
TsFreddie 712e9e90c0 stop disabling textinput during connecting 2020-09-25 01:08:48 +01:00
def 9ab8de5718 fix clang-format 2020-09-24 19:05:30 +02:00
def 00b66362c3 Allow zooming on city mod 2020-09-24 19:05:30 +02:00
def 9f9ccaccf7 Create ALLOW_X_SKINS game info flag
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
2020-09-24 19:05:30 +02:00
bors[bot] 7000987ff5
Merge #2884
2884: Add scrollbar to auto rules list, fixes #2514 r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93710826-afde7e80-fb49-11ea-9754-c44c79d5ff94.png)

It doesn't show a scrollbar when there aren't more than 5 rules.

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-24 17:01:19 +00:00
Edgar fb3b40917a
fix style script 2020-09-24 18:53:11 +02:00
Edgar 76f3dbfe64
fix scrolling triggering zoom 2020-09-24 18:52:31 +02:00
def f7cf854c36 Make sure turning dyncam off in settings works
Even if players have cl_mouse_followfactor turned on

Alternative fix for #2761 since players keep reporting confusion about this
2020-09-24 18:27:31 +02:00
Edgar af29d8da99
remove unnecessary condition 2020-09-24 18:09:35 +02:00
def ebb4e3debe Center update info text, add -DINFORM_UPDATE flag
to be used for Steam release, since autoupdates are enforced anyway and
players don't need to be reminded to update
2020-09-24 13:41:59 +02:00
def eb725f800e Allow specifying -DGAME_RELEASE_VERSION
to be used for nightlies and release candidates to be able to tell them
from regular releases more easily. For example:

CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .
2020-09-24 12:20:38 +02:00
bors[bot] ceefdacfbc
Merge #2894
2894: Add new renderer(as streamed vertices) for editor r=def- a=Jupeyy

Does not improve performance in editor!

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-24 08:06:42 +00:00
def d9719a3c15 Fix spacing in themes selection 2020-09-23 23:38:29 +02:00
Jupeyy 8235df7752 Add menu background map 2020-09-23 23:38:28 +02:00
bors[bot] d707b3883c
Merge #2909
2909: Set IME Window Position & Prevent Input from fighting with IME r=def- a=TsFreddie

Mainly solves the backspace problem where you were able to delete from chat and ime comps at the same time.
Also set the position of composition window

Need some testing from other languages' users.
Need https://github.com/ddnet/ddnet-libs/pull/14 to work on windows

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-23 21:23:02 +00:00
Dennis Felsing bedd559988
Merge pull request #2900 from def-/pr-15.0.5
Version 15.0.5
2020-09-23 17:32:57 +02:00
nobody-mb 78040b31e5
automatically kick k-client (#2912) 2020-09-23 16:52:50 +02:00
Jupeyy 84cad658d6 Add new renderer(as streamed vertices) for editor 2020-09-23 16:45:32 +02:00
bors[bot] 1b26312e3c
Merge #2902
2902: Don't rely on snapshot for ddnet gametype r=heinrich5991 a=Jupeyy

@fokkonaut you need to test again if you mod works.
This time i also did the test for masked entites(but not for non masked ones).

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-23 14:15:01 +00:00
patiga 4e893561c8 run fix_style script 2020-09-23 08:15:06 +02:00
patiga df72c0ee7c set the correct variable 2020-09-23 08:14:37 +02:00
Jupeyy 7e436ff2b1 Don't rely on snapshot for ddnet gametype 2020-09-23 08:14:33 +02:00
def 91d2f89b54 Version 15.0.5 2020-09-23 08:14:28 +02:00
Jupeyy eb7c84cd7f Add hover for demo list 2020-09-22 18:42:03 +02:00
TsFreddie d4da82f977 clang-format 2020-09-22 17:02:03 +01:00
TsFreddie 387bc53030 ime window position & ime input handling 2020-09-22 17:01:13 +01:00
Jupeyy 0ddc7fddb4 Don't rely on snapshot for ddnet gametype 2020-09-22 17:42:19 +02:00
bors[bot] fddb8b34c0
Merge #2898 #2901 #2908
2898: Inform players that they are in team already r=heinrich5991 a=def-



2901: Remove failed downloaded files immediately r=heinrich5991 a=def-

Especially skins were only deleted after they were requested again

2908: Don't log skin downloading progress r=heinrich5991 a=def-

since it's not really interesting for most players, as long as things work fine

Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:57:20 +00:00
def 56b152e962 Remove failed downloaded files immediately
Especially skins were only deleted after they were requested again
2020-09-22 16:51:40 +02:00
def ae4dc1032e Inform players that they are in team already 2020-09-22 16:45:46 +02:00
def 1505b64af0 Don't log skin downloading progress
since it's not really interesting for most players, as long as things work fine
2020-09-22 16:36:01 +02:00
bors[bot] 2a3b254b47
Merge #2890
2890: Finish /showothers 2 implementation on server r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:35:27 +00:00
bors[bot] 4875b0993a
Merge #2907
2907: properly set sound envelope offsets for sound sources r=def- a=Patiga

before, `m_SoundEnvOffset` was always set to the same value as `m_PosEnvOffset`, due to wrong behavior in the ui.

Co-authored-by: patiga <patigatus21@gmail.com>
2020-09-22 14:17:21 +00:00
patiga b437526925 run fix_style script 2020-09-22 15:42:20 +02:00
bors[bot] 06b519398b
Merge #2906
2906: Use fixed point conversion consistently r=def- a=Learath2

This fixes the issue with the Tex UV coords being complete garbage

Co-authored-by: Learath <learath2@gmail.com>
2020-09-22 13:13:16 +00:00
patiga 2ef344ea1a set the correct variable 2020-09-22 14:50:04 +02:00
Learath bbdcb7035d Style 2020-09-22 15:47:21 +03:00
bors[bot] d9e748ee91
Merge #2888
2888: Fix dilate alpha threshold & auto apply dilate on embedded texture in editor r=def- a=Jupeyy

editor dilate can be turned off.
about the threshold:

old:
![Screenshot_20200920_175749](https://user-images.githubusercontent.com/6654924/93716689-8d605b80-fb71-11ea-8049-848c8bd3a7f2.png)

new:
![Screenshot_20200920_175846](https://user-images.githubusercontent.com/6654924/93716692-8e918880-fb71-11ea-8108-9be5378cd932.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-22 12:38:53 +00:00
Learath 586043fc64 Use fixed point conversion consistently 2020-09-22 15:29:16 +03:00
bors[bot] 9e23623fa1
Merge #2874
2874: Add unmasked entities for all mods r=def- a=Jupeyy

Fixes switch tile for unmasked ddnet
And ddnet mods send that they are a race and ddrace mod appearently?
Not very intuitive that ddnet is a superset of them, bcs tiles changed.

Waiting for a review from @fokkonaut 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-21 20:46:51 +00:00
bors[bot] 481a56da2a
Merge #2899
2899: Editor: Select game layer by default (fixes #2834) r=Jupeyy a=def-

Since it's the most important layer

Co-authored-by: def <dennis@felsin9.de>
2020-09-21 20:23:56 +00:00
bors[bot] d61c97370f
Merge #2896
2896: Add edit box to write skin name, Add link to Skin Database r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-21 17:50:09 +00:00
def ddb88c6f3b Editor: Select game layer by default
Since it's the most important layer
2020-09-21 19:36:28 +02:00
Jupeyy 0ec7f1e1dc Fix dilate threshold & automatically apply dilate on embedded textures in the editor 2020-09-21 19:17:38 +02:00
def 3a3d3bcb99 Fix UpdatePlayerMaps 2020-09-21 15:32:16 +02:00
def cfd32c357b Fix clang-format 2020-09-21 15:32:16 +02:00
def 35fc180559 Finish /showothers 2 implementation on server 2020-09-21 15:32:16 +02:00
def a273969bc1 Fix clang-format 2020-09-21 10:44:13 +02:00
def d17e0e4819 Add link to Skin Database 2020-09-21 10:39:42 +02:00
def f9e66f0b41 Add edit box to write skin name 2020-09-21 10:35:13 +02:00
def 3276f2925d Reload skin menu when skin count changed
fixes graphics bug when new skins are added, skins array is reallocated
and we accessed freed memory

Thanks to Jupeyy & Learath2 for also looking into this
2020-09-21 10:19:54 +02:00
Edgar 9cdaba88dc
fix style 2020-09-20 14:08:27 +02:00
Edgar ffade19e19
don't show scrollbar if not needed on auto rules 2020-09-20 14:01:28 +02:00
Edgar 2587328aa4
add scrollbar to auto rules list, fixes #2514 2020-09-20 13:52:38 +02:00
bors[bot] 4cbcde06e5
Merge #2872
2872: mention rules r=edg-l a=12pm



Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-09-20 10:22:52 +00:00
def 5cc826d6f5 edit box: only highlight x when hovering it
not when hovering the text field itself

Thanks to Ryozuki for report
2020-09-20 11:52:17 +02:00
def a99b673042 Some browser improvements
- Increase size of Name and Clan in adding friend fields
- Smaller Search and Exclude fields
- No more duplicate Search - Search - Search text
- Smaller Connect and Refresh buttons
2020-09-20 11:47:04 +02:00
bors[bot] d4c14505bf
Merge #2883
2883: Ask for confirmation before placing border tiles r=def- a=Fireball-Teeworlds

Fixes #2823 

Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-09-20 09:36:55 +00:00
Fireball bb2be60a08 Ask for confirmation before placing border tiles (fixes #2823) 2020-09-20 01:42:07 +01:00
def 4e157c64e3 clang-format fix 2020-09-20 02:24:51 +02:00
def dfa072353d Fix skin lookup
Thanks for Jupeyy for looking into this with me
2020-09-20 02:19:58 +02:00
def 61f89533c5 Clean up skin downloader code a bit
Was trying to find what's causing the issues with skin downloader, but
didn't find anything suspicious.
2020-09-20 02:19:49 +02:00
def 8ef6a0da16 Revert "Revert "Fix clang-format""
This reverts commit 833e3640b4.
2020-09-20 02:19:32 +02:00
def 1d868fec70 Revert "Revert "Fix skin prefix search crash""
This reverts commit 4ad0f61a00.
2020-09-20 02:19:28 +02:00
def a09be98df9 Revert "Revert "Implement on-demand skin downloader (fixes #1166)""
This reverts commit cc2f05b6df.
2020-09-20 02:19:24 +02:00
def f92a4753c3 Version 15.0.4 2020-09-20 01:51:55 +02:00
def cc2f05b6df Revert "Implement on-demand skin downloader (fixes #1166)"
This reverts commit 3cc1e47ec4.
2020-09-20 01:51:23 +02:00
def 4ad0f61a00 Revert "Fix skin prefix search crash"
This reverts commit 1270434f5e.
2020-09-20 01:49:58 +02:00
def 833e3640b4 Revert "Fix clang-format"
This reverts commit f42a5a0431.
2020-09-20 01:49:26 +02:00
bors[bot] ea1a7934e5
Merge #2878
2878: Max images (fixes #2148) r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-19 20:50:04 +00:00
Jupeyy a1eb5dc114 Max images(for editor, clamp for client and warning for mapconvert) (fixes #2148) 2020-09-19 21:22:21 +02:00
Jupeyy 5208a588b8 Add unmasked entities for all mods 2020-09-19 14:44:24 +02:00
12pm aa18dc1d88 remove for more info 2020-09-19 13:40:19 +02:00
12pm f3bef4919f mention rules 2020-09-19 13:28:30 +02:00
def c31fc33cf2 Fix MouseInside to only select one field (fixes #2868) 2020-09-19 11:50:33 +02:00
def 1cf68d7191 Fix localizing demo list
You can't store the result of Localize in a static, it will be removed
by switching to another language.

Thanks to Jupeyy for report
2020-09-18 23:33:51 +02:00
def f11679afb2 Implement censoring words on server 2020-09-18 19:18:08 +02:00
Dennis Felsing 4317cb7af8
Merge pull request #2855 from def-/pr-kill-server-on-quit
Kill server on quit
2020-09-18 08:04:44 +02:00
def 848c8c992c Version 15.0.3 2020-09-18 07:57:54 +02:00
def 427450ddc3 Demo viewer: Ignore shortcuts when popup is open
As reported by Shyzo on Discord
2020-09-18 07:57:43 +02:00
Jupeyy 1270434f5e Fix skin prefix search crash 2020-09-18 06:27:18 +02:00
def 46b21020be Kill server on quit
As suggested by Ryozuki
2020-09-18 00:30:31 +02:00
def 3983bfeeef Version 15.0.2 2020-09-17 23:12:33 +02:00
def d5648f5cde Fix localizing in browser
Thanks to gerdoe for noticing
2020-09-17 21:54:24 +02:00
def 9da149f84b Localize control settings 2020-09-17 21:18:33 +02:00
def 2221881f79 Version 15.0.1 2020-09-17 21:06:55 +02:00
def da4a8c704b Fix running server from other directory 2020-09-17 21:06:02 +02:00
Dennis Felsing 8ad64820ef
Merge pull request #2830 from def-/pr-15
Version 15.0
2020-09-17 18:34:59 +02:00
bors[bot] 93e592dcd9
Merge #2813
2813: Sort spectator view by team, then name (not score) (fixes #2808) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-17 16:07:28 +00:00
bors[bot] da62510a2d
Merge #2840
2840: [Idea] Add some decent hover effects and colors r=def- a=Jupeyy

Generally, would be nice to have very decent hover effects and decent colors.

I just tried for fun adding hover effects to menu tabs(red for the quit button),

hover effects for the server browser items

and color for search/exclude

I'm not an artist, it doesnt look good, if someone wants to overtake, he/she would be very welcome todo so

![image](https://user-images.githubusercontent.com/6654924/93282252-44ee1a00-f7ce-11ea-8b16-5d563610c9ce.png)

![image](https://user-images.githubusercontent.com/6654924/93282271-50d9dc00-f7ce-11ea-89cf-8f1e38b4a6b7.png)

![screenshot_2020-09-16_03-38-40](https://user-images.githubusercontent.com/6654924/93282288-57685380-f7ce-11ea-8cbe-3f04f8d89bc4.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-17 14:19:22 +00:00
def 7dd611a2d0 Version 15.0 2020-09-17 16:11:44 +02:00
bors[bot] 21e080596a
Merge #2836 #2841 #2845
2836: Only make Esc key leave editor when no popup is open r=Jupeyy a=def-



2841: Fix ingame browser tab change (fixes #2839) r=Jupeyy a=def-



2845: Fix spacing in kick-vote menu (center tees and text) r=Learath2 a=def-

Old: ![screenshot-20200917@090205](https://user-images.githubusercontent.com/2335377/93431529-882ab480-f8c4-11ea-8e56-dfe903a5ae06.png)
New: ![screenshot-20200917@090226](https://user-images.githubusercontent.com/2335377/93431538-8cef6880-f8c4-11ea-8946-449e7aa6dea7.png)


Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:00:09 +00:00
bors[bot] 77cb30aec4
Merge #2733
2733: Implement on-demand skin downloader, remove Lappi's non-free skins (fixes #1166, fixes #2547) r=Learath2 a=def-

Seems to work on first try, I'm somewhat surprised :D

Future ideas:

- I haven't checked how the performance impact is of a new skin joining,
  might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
  want to compare modified time.
- Make all skins load on demand only to save some memory?

Co-authored-by: def <dennis@felsin9.de>
2020-09-17 13:49:23 +00:00
Jupeyy 1fe09f496c Add some decent hover effects and colors 2020-09-17 15:47:13 +02:00
def b5b218d67f Fix spacing in kick-vote menu (center tees and text) 2020-09-17 09:39:50 +02:00
def 81d30f838d Fix ingame browser tab change (fixes #2839) 2020-09-16 07:36:47 +02:00
Jupeyy 1cef3bf047 Only show new icons, when client is offline 2020-09-16 02:14:11 +02:00
def f42a5a0431 Fix clang-format 2020-09-15 22:17:09 +02:00
def 3cc1e47ec4 Implement on-demand skin downloader (fixes #1166)
Seems to work on first try, I'm somewhat surprised :D

Future ideas (not for this change):

- I haven't checked how the performance impact is of a new skin joining,
  might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
  want to compare modified time.
- Make all skins load on demand only to save some memory?
2020-09-15 22:17:08 +02:00
def 433881824a Only make Esc key leave editor when no popup is open 2020-09-15 21:57:09 +02:00
bors[bot] edb4462f8a
Merge #2814 #2818
2814: Remove saving to other servers r=Learath2 a=def-

sv_sql_valid_servernames is no longer required

2818: Load fonts from memory (fixes #2810) r=Learath2 a=def-

Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.

@QingGo Could you give this a try from the Github build artifacts? If not, I can provide you a nightly build.

Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:16:21 +00:00
bors[bot] c1d54da9f7
Merge #2826 #2829 #2835
2826: map_convert_07: Check for width/height 0 r=Learath2 a=def-

as suggested by Jupeyy

2829: Add libsteam_api.a to gitignore r=Learath2 a=def-



2835: Make spacing in top menu buttons consistent, fit for 5:4 r=Learath2 a=def-

![screenshot-20200915@184840](https://user-images.githubusercontent.com/2335377/93240346-4db9fe00-f784-11ea-9755-3a52f51d2755.png)


Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:08:45 +00:00
bors[bot] 3b0bb7d777
Merge #2816
2816: Implement context for translations (largely taken from Teeworlds) r=Learath2 a=def-

Missing: scripts/languages doesn't work yet, but the context can be
added manually, see german.txt for an example.

Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:02:00 +00:00
def 7a82779ff7 Make spacing in top menu buttons consistent, fit for 5:4 2020-09-15 18:49:43 +02:00
bors[bot] a2a2abb26c
Merge #2833
2833: Use 0.7 cursor r=def- a=Jupeyy

![image](https://user-images.githubusercontent.com/6654924/93222705-83a0b780-f76f-11ea-866a-b2be9f47296e.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 16:40:57 +00:00
Jupeyy dc3580d976 0.7 cursor 2020-09-15 16:18:12 +02:00
bors[bot] a4edac3969
Merge #2832
2832: Add new icons for demo, home and server browser r=def- a=Jupeyy

![image](https://user-images.githubusercontent.com/6654924/93217198-ff4b3600-f768-11ea-95a2-cd826b9ffbf5.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 14:07:57 +00:00
Jupeyy 6a352b40eb Add new icons for demo, home and server browser 2020-09-15 15:31:52 +02:00
bors[bot] 981d5d4e99
Merge #2675
2675: support multiple modifiers for binds r=def- a=plsplsplslol



Co-authored-by: plsplsplslol <alpootagpro@gmail.com>
2020-09-15 08:37:38 +00:00
def 3daa798639 Implement script/languages support for contexts 2020-09-15 10:30:49 +02:00
def 7af517009c Implement context for translations (largely taken from Teeworlds)
Missing: scripts/languages doesn't work yet, but the context can be
added manually, see german.txt for an example.
2020-09-15 10:30:49 +02:00
bors[bot] 393f3deed4
Merge #2828
2828: Use resize instead of rescale r=def- a=Jupeyy

rescale doesn't clamp, and looks worse, might be slightly faster tho.

So i also renamed the config vars that might cause resizing and/or are not very useful

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-14 22:02:59 +00:00
Jupeyy 3eea399d37 Rename quality texture and compressed texture, because they should not be used 2020-09-14 21:34:56 +02:00
bors[bot] c0f7a2bf03
Merge #2825
2825: Fix entity text & improve Grow r=def- a=Jupeyy

fixes #2822

@BannZay wanna check?

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-14 15:12:37 +00:00
Jupeyy 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
def a67a8e36aa clang-format: fix style 2020-09-14 16:00:51 +02:00
Vlad be90f3f48b Replaced tile names. 2020-09-13 23:00:49 +03:00
def 0f8d682f81 Remove saving to other servers
sv_sql_valid_servernames is no longer required
2020-09-13 21:49:44 +02:00
def 3832d948bd Sort spectator view by team, then name (not score) (fixes #2808) 2020-09-13 21:31:10 +02:00
Andrii a2b149a114 remove sv_team_lock command 2020-09-13 00:46:49 +03:00
heinrich5991 ffab6292ad
Merge branch 'master' into pr-start 2020-09-11 14:25:50 +02:00
def aeb8bcbd9a Show an error message on missing file 2020-09-11 09:59:05 +02:00
bors[bot] d720f74cfd
Merge #2800
2800: Style-fixed version of #2784 r=def- a=heinrich5991

Thanks to @Jupeyy for the original pull request.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-11 07:10:29 +00:00
bors[bot] 5ac6c3bac9
Merge #2803
2803: Always accept the local server name for saves r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-11 06:37:27 +00:00
heinrich5991 35228fb997 Always accept the local server name for saves 2020-09-11 06:10:53 +02:00
heinrich5991 aa46ca6bf9 Fix some style issues via scripts/fix_style.py, size_t 2020-09-11 00:47:38 +02:00
Jupeyy 3b403f76a9 Fix editor speedup brush 2020-09-11 00:34:43 +02:00
Jupeyy b83d8735fe Create entity textures seperately 2020-09-11 00:34:42 +02:00
bors[bot] f6e1ed5f19
Merge #2738
2738: Don't search the sorted array linearly r=heinrich5991 a=Learath2

Small optimization but it could start mattering with #2733

Co-authored-by: Learath <learath2@gmail.com>
2020-09-10 22:30:46 +00:00
def d92e6ecb00 Use check_header_guards script 2020-09-11 00:03:31 +02:00
def 8a6acfbb4a Fix loading bar by adding menu images to count 2020-09-10 22:56:59 +02:00
Zwelf 3a986fbe52 Fix SQL query style using clang-format 2020-09-10 20:24:34 +02:00
Zwelf 88dc1c1a9c Add print functionality to SQLite 2020-09-10 20:16:42 +02:00
Zwelf 46b0ff354e Align InsertIgnore with other SQL query related functions 2020-09-10 20:16:42 +02:00
def f7b37eaf6a clang-format fixes 2020-09-10 20:16:09 +02:00
def a52c8a22a6 Quit without popup when it makes sense 2020-09-10 20:13:01 +02:00
def 419942ace4 Some more size improvements 2020-09-10 20:13:01 +02:00
def b07d0d21d6 Default to DDNet if no page selected 2020-09-10 20:13:01 +02:00
def 57e2905e24 Clean up econ stuff, don't need it 2020-09-10 20:13:01 +02:00
def 0aef743d7a Move News/Website/Wiki/Discord to bottom left 2020-09-10 20:13:01 +02:00
def 83d297a370 Server -> Econ (in preparation of the real change) 2020-09-10 20:13:01 +02:00
def 2ca613d982 Back -> Menu 2020-09-10 20:13:01 +02:00
def 90f3199d98 Implement opening server on Windows (reading autoexec_server.log not working yet) 2020-09-10 20:13:01 +02:00
def 33eefa449b Only run server when pressing R 2020-09-10 20:13:01 +02:00
def b2cfdc57eb Clean up top menus, add back button 2020-09-10 20:13:01 +02:00
def 4ca4449ee4 Use Storage for opening autoexec_server.log 2020-09-10 20:13:01 +02:00
def b522bbbb96 Localize the Learn link 2020-09-10 20:13:01 +02:00
def 9a5ee2cdbf Auto-bind F7 to show server console if it's free 2020-09-10 20:13:01 +02:00
def 2cdc7d0faf Adapt 0.7 start menu
- Working Local Server button (needs fixing for Windows)
- Highlight buttons if server is running, new news is out and editor has
  unsaved changes
2020-09-10 20:13:01 +02:00
bors[bot] d1aa014357
Merge #2793
2793: Add some more space for Countries & Types r=Learath2 a=def-

Since DDNet has too many locations now. A scroll wheel would be even better for the future if someone wants to implement that.

![screenshot-20200910@175801](https://user-images.githubusercontent.com/2335377/92758709-4ca55d00-f38f-11ea-924d-f13b998403f7.png)

Co-authored-by: def <dennis@felsin9.de>
2020-09-10 16:52:55 +00:00
def cddfd6836b Add some more space for Countries & Types
Since DDNet has too many locations now
2020-09-10 17:59:40 +02:00
Learath 1f261198a7 Don't search the sorted array linearly 2020-09-09 21:10:40 +03:00
def 7bea697114 Add some keyboard shortcuts for demos 2020-09-08 11:42:52 +02:00
def 757998e7d0 Fix some 5:4 rendering in demo menu & recorder menu 2020-09-08 11:37:37 +02:00
def 7abe20175a Version 14.7.1, fix Mac build 2020-09-08 07:48:25 +02:00
def 9bbd7f6259 Improve performance of /points
No need to do the rank() calculation at all

by heinrich5991
2020-09-07 23:11:24 +02:00
def 9ef407fa13 Version 14.7 2020-09-07 18:04:46 +02:00
def 28cd437684 Document which commands only work in initial config (fixes #2773) 2020-09-07 12:31:00 +02:00
def a2b5d639a0 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:12:55 +02:00
def d492d6d270 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:10:23 +02:00
bors[bot] cbc272fd5d
Merge #2758 #2769 #2772
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>
2020-09-06 23:25:16 +00:00
bors[bot] acea5bd955
Merge #2747
2747: Fix proof circle position in editor r=heinrich5991 a=def-

As reported by Ravie on Discord. Tee is not drawn exactly in center.

Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:19:01 +00:00
bors[bot] e3cfb23f28
Merge #2742 #2745
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>
2020-09-06 23:12:04 +00:00
bors[bot] 742ee9094c
Merge #2744
2744: Allow different timeouts for different downloads r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:05:57 +00:00
Andrii 7069d26b5a dont predict camera position on spectator changed 2020-09-07 02:02:17 +03:00
bors[bot] 85f8095295
Merge #2767
2767: Don't lock SQL writes r=Zwelf a=def-

The slow query logs are full of this:

    # Time: 200906 21:03:43
    # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120]
    # Thread_id: 101540  Schema: teeworlds  QC_hit: No
    # Query_time: 11.012166  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
    # Rows_affected: 0  Bytes_sent: 67
    SET timestamp=1599419023;
    LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE;

Do we really need these lock? See also
https://dev.mysql.com/doc/refman/5.7/en/table-locking.html

> InnoDB tables use row-level locking so that multiple sessions and
> applications can read from and write to the same table simultaneously,
> without making each other wait or producing inconsistent results. For
> this storage engine, avoid using the LOCK TABLES statement, because it
> does not offer any extra protection, but instead reduces concurrency.

Co-authored-by: def <dennis@felsin9.de>
2020-09-06 22:49:26 +00:00
def f89766034c Don't lock SQL writes for teamrace
The slow query logs are full of this:

  # Time: 200906 21:03:43
  # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120]
  # Thread_id: 101540  Schema: teeworlds  QC_hit: No
  # Query_time: 11.012166  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
  # Rows_affected: 0  Bytes_sent: 67
  SET timestamp=1599419023;
  LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE;

Do we really need these lock? See also
https://dev.mysql.com/doc/refman/5.7/en/table-locking.html

> InnoDB tables use row-level locking so that multiple sessions and
> applications can read from and write to the same table simultaneously,
> without making each other wait or producing inconsistent results. For
> this storage engine, avoid using the LOCK TABLES statement, because it
> does not offer any extra protection, but instead reduces concurrency.
2020-09-07 00:34:01 +02:00
Jupeyy bfd24d7dd8 Clamp camera zoom 2020-09-07 00:19:38 +02:00
Jupeyy ebe5b51230 Clamp kill border count 2020-09-06 23:58:54 +02:00
TsFreddie badc49cac7 Revert "Revert & use "str_utf8_truncate" instead"
This reverts commit b045a3d6ee.
2020-09-06 20:54:57 +01:00
def 4c74efd93f Version 14.6.2 2020-09-05 19:25:15 +02:00
bors[bot] 7fd43163b7
Merge #2751 #2752 #2756
2751: More aggressive analysis & check 2.0 gl Functions that were used r=def- a=Jupeyy

If even that fails, I'm out of ideas

Checks all texture shaders, checks all functions used.

2752: Can't detect if paused on KoG, so don't show button r=def- a=def-

Since they're running an old version of DDNet server

2756: Don't deactivate menu when a popup is active r=def- a=Learath2

Deactivating menu while a popup is active causes the menu to never open again.

Reported by Anxton on discord.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
2020-09-05 17:10:35 +00:00
def e162045026 Can't detect if paused on KoG, so don't show button
Since they're running an old version of DDNet server
2020-09-05 19:06:12 +02:00