Commit graph

2752 commits

Author SHA1 Message Date
def 017b8c3621 Move DDNet-custom json code out of external directory (fixes #2022) 2020-01-01 20:07:04 +01:00
Dennis Felsing 811ddb3283
Merge pull request #2008 from Learath2/dd_pr_demohotfix
Fix (not) small bug with demos that don't include a map
2019-12-22 22:38:22 +01:00
Learath a882cf5196 Fix bug with slices 2019-12-22 19:09:14 +03:00
Dennis Felsing 83f2fc2669
Merge pull request #2012 from ChillerDragon/pr_func_style
Style 'void foo() {' -> 'void foo()\n{'
2019-12-21 18:18:49 +01:00
ChillerDragon 928e5407eb Style 'void foo() {' -> 'void foo()\n{' 2019-12-21 14:35:09 +01:00
Dennis Felsing 3e08d473ab
Merge pull request #2011 from heinrich5991/pr_ddnet_fix_comment
Fix outdated comment
2019-12-21 08:00:38 +01:00
heinrich5991 e70fb8e43d Fix outdated comment 2019-12-20 22:51:10 +01:00
Learath 65ec25a8a1 Fix small bug with demos that don't include a map 2019-12-18 13:51:08 +01:00
Dennis Felsing 4171e8751f
Merge pull request #1939 from Learath2/dd_pr_demoload
Always try extracting map before fail. Fix #1886
2019-12-17 21:20:10 +01:00
Learath2 3784f5bea4 Use a UUID, Cleanup code and UI 2019-12-17 15:44:54 +01:00
ChillerDragon 4a6a85124a Remove some unused includes 2019-12-14 10:20:42 +01:00
bors[bot] 4a83a42f14
Merge #1981
1981: Fix: background colors being set to white r=def- a=Aerll

After changing either of background colors in ddnet tab in settings and reopening the client, both become white.

Co-authored-by: Aerll <31746984+aerll@users.noreply.github.com>
2019-12-10 12:34:48 +00:00
def 8639c902ae map_convert_07: use regular paths 2019-12-08 23:14:56 +01:00
Aerll ff685ac1e0
fix ub 2019-12-08 20:08:00 +01:00
def 18e2232727 Add support to tell DDNet7 ranks apart from DDNet ones
Saves should not be loadable from one to the other.

Requires:
ALTER TABLE record_race ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER GameID;
ALTER TABLE record_teamrace ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER GameID;
ALTER TABLE record_saves ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER Server;
2019-12-08 16:04:49 +01:00
Magnus Auvinen 6a6a5f00c9 more typesafty in the graphics. introduced the IGraphics::CTextureHandle
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8)
2019-11-22 18:08:37 +01:00
ChillerDragon 9c3447dd17 Use an enum for netclient indices 2019-11-10 13:46:27 +01:00
ChillerDragon 1a957f0abe Fix typo 'user' -> 'use' 2019-11-05 09:16:54 +01:00
Dennis Felsing 785ec3d345 Expire server info on connected/drop events 2019-11-04 15:45:55 +01:00
Learath2 c2bcd3bd4d Fix bug 2019-11-04 01:06:52 +01:00
bors[bot] 0de012572b
Merge #1955
1955: Cache serverinfo responses r=def- a=Learath2

I'm not sure I like it but it works

Co-authored-by: Learath2 <learath2@gmail.com>
2019-11-03 20:09:21 +00:00
Learath2 c0b0f48d16 Oops 2019-11-03 20:58:35 +01:00
def fdaafea6b5 Also init m_aClients[*].m_Latency
as reported by valgrind --tool=memcheck:

==376722== Conditional jump or move depends on uninitialised value(s)
==376722==    at 0x1CDBDB: int maximum<int>(int, int) (math.h:79)
==376722==    by 0x216A46: CPlayer::Tick() (player.cpp:174)
==376722==    by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722==    by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722==    by 0x1CB099: main (server.cpp:3040)
==376722==
==376722== Conditional jump or move depends on uninitialised value(s)
==376722==    at 0x183F27: int minimum<int>(int, int) (math.h:77)
==376722==    by 0x216A65: CPlayer::Tick() (player.cpp:175)
==376722==    by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722==    by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722==    by 0x1CB099: main (server.cpp:3040)
2019-11-03 18:54:25 +01:00
Learath2 c4d18118c1 Use automatic storage for the data 2019-11-03 18:31:05 +01:00
def 258eaf5a98 Fix uninitialized variable
As reported by valgrind --tool=memcheck:

[201==344082== Conditional jump or move depends on uninitialised value(s)
==344082==    at 0x483BC85: strlen (vg_replace_strmem.c:461)
==344082==    by 0x5B9E61D: __vfprintf_internal (in /usr/lib/libc-2.30.so)
==344082==    by 0x5BB0409: __vsnprintf_internal (in /usr/lib/libc-2.30.so)
==344082==    by 0x222AE7: str_format (system.c:2350)
==344082==    by 0x2196AB: CStorage::GetPath(int, char const*, char*, unsigned int) (storage.cpp:274)
==344082==    by 0x219DDD: CStorage::RemoveFile(char const*, int) (storage.cpp:409)
==344082==    by 0x255D3C: CClient::DemoRecorder_Stop(int, bool) (client.cpp:3546)
==344082==    by 0x2569E7: CClient::ConchainReplays(IConsole::IResult*, void*, void (*)(IConsole::IResult*, void*), void*) (client.cpp:3727)
==344082==    by 0x1F4659: CConsole::Con_Chain(IConsole::IResult*, void*) (console.cpp:1169)
==344082==    by 0x1E4C2C: CConsole::ExecuteLineStroked(int, char const*, int, bool) (console.cpp:504)
==344082==    by 0x1E4F37: CConsole::ExecuteLine(char const*, int, bool) (console.cpp:558)
==344082==    by 0x1E5240: CConsole::ExecuteFile(char const*, int, bool, int) (console.cpp:604)
2019-11-03 18:05:42 +01:00
Learath2 52cca29cd9 Use a std::list, improve variable naming 2019-11-03 15:39:32 +01:00
Learath2 3d495a9936 Initialize variables 2019-11-03 01:53:50 +01:00
Learath2 79e4651d5b Only update serverinfo when needed 2019-11-03 01:07:10 +01:00
Learath2 7f0589bff7 Cache serverinfo responses 2019-11-03 00:33:30 +01:00
WsYFU 1a16f5b5f0
Update serverbrowser.cpp 2019-10-31 16:16:35 +03:00
ChillerDragon 47b41f35ff Fix objc_msgSend() xcode11 error
Fix by @heinrich5991
from the documentation of objc_msgSend in <objc/message.h>
```
/* Basic Messaging Primitives
 *
 * On some architectures, use objc_msgSend_stret for some struct return types.
 * On some architectures, use objc_msgSend_fpret for some float return types.
 * On some architectures, use objc_msgSend_fp2ret for some float return types.
 *
 * These functions must be cast to an appropriate function pointer type
 * before being called.
 */
OBJC_EXPORT void
objc_msgSend(void /* id self, SEL op, ... */ )
    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);

OBJC_EXPORT void
objc_msgSendSuper(void /* struct objc_super *super, SEL op, ... */ )
    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
```
2019-10-23 17:23:51 +02:00
Learath 7cdd050fee Add SHA to demos. Bump Demo Version 2019-10-14 02:27:08 +02:00
Learath b2cefb20ed Always try extracting map before fail. Fix #1886 2019-10-13 18:46:28 +02:00
bors[bot] fdf2ec37e7
Merge #1930
1930: Fix #1888 r=heinrich5991 a=Learath2

I didn't see a better fix for it

Co-authored-by: Learath <learath2@gmail.com>
2019-10-07 22:44:51 +00:00
12pm 36df86fcd2 Add toggle keyboard shortcuts button to demo player
Demo shortcuts can be annoying if you have other binds on them.

Icons made by eNJi
2019-10-05 18:06:58 +02:00
Learath 49a2a47dc8 Fix #1888 2019-10-02 20:44:03 +03:00
bors[bot] e7ea336a94
Merge #1925 #1929
1925: Don't bundle libcurl for Linux r=Learath2 a=heinrich5991

It's installed basically everywhere and just increases release size.
They're serious about backward compatibility and haven't had a breaking
change in ages.

1929: Remove space at end of cfg description r=Learath2 a=ChillerDragon

Happy hacktoberfest :octocat: 

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2019-10-02 17:25:02 +00:00
ChillerDragon 3777021383 Remove space at end of cfg description 2019-10-02 17:15:42 +02:00
bors[bot] 1bf178614f
Merge #1904
1904: Add tune zone prediction r=heinrich5991 a=trml

Is enabled with cl_predict_ddrace 1.

This will predict tunings loaded from the map the first time tunezones are entered, but will also update the tunes after you receive new tunes while in a tunezone, since it's possible to change them in rcon.

Co-authored-by: trml <trml@users.noreply.github.com>
2019-09-17 13:50:18 +00:00
bors[bot] 0c34b6eb55
Merge #1878 #1903
1878: Add paused and spec to explayerflags r=Learath2 a=Ryozuki

I think client should know about this, maybe we can do something with it in the future.

It also may help with https://github.com/ddnet/ddnet/issues/259 but i didn't figure out yet a way to fix it.

1903: Consistent spacing for getters and setters r=Learath2 a=ChillerDragon



Co-authored-by: Ryozuki <ryo@ryozuki.xyz>
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2019-09-15 13:41:19 +00:00
bors[bot] c146de63fa
Merge #1909
1909: Fix filescore path r=Learath2 a=ChillerDragon

The filescore system did not handle map paths well that were an actual path and not just the mapname.

```
# before fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:29:44][filescore]: opening 'records/DDNetPP-maps-BlmapChill_record.dtb' for reading failed

# after fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:31:05][filescore]: opening 'records/BlmapChill_record.dtb' for reading failed
```

I called ```Server()->``` in a thread so please review thread safety before merge.

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2019-09-15 13:30:48 +00:00
ChillerDragon b39de87b18 Fix filescore path
# before fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:29:44][filescore]: opening 'records/DDNetPP-maps-BlmapChill_record.dtb' for reading failed

# after fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:31:05][filescore]: opening 'records/BlmapChill_record.dtb' for reading failed
2019-09-15 13:35:35 +02:00
trml bb5eab0cc0 Add tunezone prediction 2019-09-09 00:53:07 +02:00
ChillerDragon f5f07860c4 Consistent spacing for getters and setters 2019-09-08 19:22:12 +02:00
Corantin H 043859b66d Fix keeping tmp replay demo file on map change 2019-08-21 22:49:21 +02:00
bors[bot] e2840b1a57
Merge #1881 #1895
1881: Replace browse_icons (by MiM) (fixes #1880) r=heinrich5991 a=def-



1895: Centered entities text r=heinrich5991 a=BannZay

Closes https://github.com/ddnet/ddnet/issues/1721

Before:
![not_centered_100](https://user-images.githubusercontent.com/17499770/63204728-89772580-c0a3-11e9-8ad9-060cd03d2f74.png)
Now:
![centered_100](https://user-images.githubusercontent.com/17499770/63204730-8da34300-c0a3-11e9-86e2-5f542e4789a1.png)

It is done for "buffered" mode. Therefore, it works for OpenGL 3.3 only.


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Andrii Vynychenko <bannzay3@yandex.ru>
2019-08-17 15:32:29 +00:00
Andrii Vynychenko 1671e6fbfc numbers dynamically centered for OpenGL 3.3 2019-08-17 03:42:54 +03:00
def cb738ffed0 Fix show_ips to show regular formatting (fixes #1873) 2019-08-01 20:24:30 +02:00
def 0018ed27df Don't attempt to move DLLs on Linux (fixes #1867) 2019-07-31 18:00:48 +02:00
Learath 0bc3650356 Send DDNet capability flag 2019-07-29 14:18:40 +03:00