Commit graph

1841 commits

Author SHA1 Message Date
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
Jupeyy 8d6148b20b Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
heinrich5991 eb4699de2c Revert "Reset m_ServerCapabilities on Disconnect"
This reverts commit a6d2a35e11.

It's unclear how this should have fixed the mentioned bug.
2020-10-08 13:12:31 +02:00
def a6d2a35e11 Reset m_ServerCapabilities on Disconnect
Reported by builder17 that on Vanilla server timeout code can get sent
2020-10-07 18:08:09 +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
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
def 1a83651cf1 Allow quitting instantly with SDL_QUIT when non-warning dialog showing 2020-10-04 22:46:28 +02:00
bors[bot] e368dabc80
Merge #3000
3000: Add more video modes, reorder them for consistency (fixes #2991) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 02:15:29 +00:00
bors[bot] a7333fe08e
Merge #2964
2964: Set libnotify icon r=def- a=yangfl



Co-authored-by: yangfl <yangfl@users.noreply.github.com>
2020-10-03 19:25:21 +00:00
def 17ec99138c Add more video modes, reorder them for consistency (fixes #2991) 2020-10-03 21:23:38 +02: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] 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
def 512d146d56 Quit hard on second SDL_QUIT input even if dialogs are shown 2020-10-02 18:02:10 +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
def 406d383c45 Clean up OpenGL command processor 2020-09-30 23:59:44 +02:00
def 61e985457d Clean up font buffers & texturedata 2020-09-30 23:59:33 +02:00
yangfl 8ce6de6d8e Set libnotify icon 2020-10-01 04:40:19 +08:00
def b0a3de60b2 Handle PNG read errors (fixes #2959)
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.
2020-09-30 18:23:52 +02:00
bors[bot] 9d19770a10
Merge #2933
2933: Handle rcon cmd completion properly with dummy r=heinrich5991 a=def-

Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.

as reported by Betz@lel-$h@l0m on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-09-28 16:32:53 +00:00
Jupeyy 6a1cf963d1 try trilinear filtering 2020-09-27 00:37:43 +02:00
Jupeyy c951fc3ee4 Allow specifying texture LOD BIAS 2020-09-27 00:37:42 +02:00
def 25fe5471c5 Handle rcon cmds properly with dummy
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.

as reported by Betz@lel-$h@l0m on Discord
2020-09-27 00:31:53 +02:00
def b178c7c74a Make sure headers compile standalone
Not planning to do this automatically, but at least cleaning it up once
provides some benefit. Every header should include what it uses.

$ for i in src/**/*.h; do j=${i#"src/"}; echo $j; echo "#include <$j>\nint main() { return 0; }" | /usr/bin/c++ -DCONF_OPENSSL -DCONF_SQL -DCONF_VIDEORECORDER -DCONF_WAVPACK_CLOSE_FILE -DCONF_WAVPACK_OPEN_FILE_INPUT_EX -DGAME_RELEASE_VERSION=\"15.0.5\" -DGLEW_STATIC -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -I/usr/include/opus -I/usr/include/SDL2 -I/usr/include/wavpack -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -Isrc -I/usr/include/mysql -I/home/deen/sys/include/ -O2 -g -DNDEBUG -fdiagnostics-color=always -fstack-protector-all -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wno-nullability-completeness -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -std=gnu++11 -o /dev/null -x c++ -; done

Ignored: tuning.h, variables.h, config_common.h, mapitems_ex_types.h, mapbugs_list.h, protocol7.h, teehistorian_ex_chunks.h, protocol_ex_msgs.h, config.h, config_variables.h, external, keynames.h
2020-09-26 21:50:27 +02: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
def f8fc11b880 clang-format 2020-09-26 21:33:36 +02:00
def f74cc43f4c Remove pure server filters, add space for Countries/Types
Not so relevant anymore
2020-09-26 21:33:25 +02:00
def 8cdc4066ff Don't str_copy into string itself
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)
2020-09-25 15:43:34 +02:00
bors[bot] 56e996cbb6
Merge #2915
2915: HTTP: Set final m_State after running completion function r=Jupeyy a=def-

Ensures that we don't delete a file that is being used by ingame map downloader already.

As reported by Jupeyy in #2901


Co-authored-by: def <dennis@felsin9.de>
2020-09-24 15:54:35 +00:00
def 2be54a30ad HTTP: Set final m_State after running completion function
Ensures that we don't delete a file that is being used by ingame map
downloader already.

As reported by Jupeyy in #2901
2020-09-24 10:21:12 +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
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
Jupeyy 84cad658d6 Add new renderer(as streamed vertices) for editor 2020-09-23 16:45:32 +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
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 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
def f4d763c895 Init curl first, then call curl_version_info 2020-09-19 15:10:32 +02:00
def 3e58d8b756 Increase br_max_requests to 100
As suggested by BannZay on Discord. We scale down when we notice that
no responses arrive. The idea is that player's internet has become
faster than when DDNet started, so increasing the default is ok.
2020-09-17 17:41:14 +02:00
bors[bot] 9ea816c779
Merge #2817
2817: Don't exit(1) in video recorder on failure r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:07:42 +00:00
bors[bot] 0bb24004dd
Merge #2837
2837: Don't allow zero/empty images(bcs malloc(0) and other things) r=def- a=Jupeyy

Would be nicer, if the map loader would check the map for such things, but since the backend works with the image data and assumes its valid, this prevents crashes.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 20:31:44 +00:00
Jupeyy 2a713ebe2c Don't allow malloc on empty images 2020-09-15 22:23:36 +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
Jupeyy 8b29240491 Use POT texture when resizing, when NOTP is not supported 2020-09-14 22:12:58 +02:00
Jupeyy 3eea399d37 Rename quality texture and compressed texture, because they should not be used 2020-09-14 21:34:56 +02:00
Jupeyy 9a4dd80a5e Remove rescale function, always use resize 2020-09-14 21:30:25 +02:00
Jupeyy fbdd66c092 Improve grow 2020-09-14 16:42:33 +02:00
Jupeyy 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
def 77d47a85ee Load fonts from memory (fixes #2810)
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?
2020-09-13 23:06:12 +02:00
def 062c897edd Don't exit(1) in video recorder on failure 2020-09-13 22:50:04 +02:00
QingGo b64a0ef4c6 make client able to connect ws server with ws:// 2020-09-13 09:59:10 +08:00
heinrich5991 ffab6292ad
Merge branch 'master' into pr-start 2020-09-11 14:25:50 +02:00
heinrich5991 aa46ca6bf9 Fix some style issues via scripts/fix_style.py, size_t 2020-09-11 00:47:38 +02:00
Jupeyy 1e1c16f83a Make override consistent 2020-09-11 00:34:43 +02:00
Jupeyy b83d8735fe Create entity textures seperately 2020-09-11 00:34:42 +02:00
def f7b37eaf6a clang-format fixes 2020-09-10 20:16:09 +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
def 279deffa86 Refresh server browser immediately when updated ddnet info arrived
At the moment it only happens the next time you press refresh.

Before we had it so that it always reloaded once the ddnet info arrived,
causing a quick flickering and lots of packets having to be resent every
time someone pressed refresh, even if nothing changed.

The new approach combines the advantages of both without the
disadvantages. An even nicer way would be to compare the json objects,
so that news and version updates don't matter, but our json library
doesn't seem to support that.
2020-09-09 17:51:32 +02:00
def 45457b6185 Bundle FFmpeg for everything
so that we can enable videorecorder by default

Works as expected.
2020-09-07 07:04:29 +02: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
TsFreddie badc49cac7 Revert "Revert & use "str_utf8_truncate" instead"
This reverts commit b045a3d6ee.
2020-09-06 20:54:57 +01:00
heinrich5991 435137d79e Allow joining and inviting others via Steam friend list while ingame
Fixes #2642.
2020-09-06 17:08:38 +02:00
heinrich5991 7162ded266 Fix formatting in CClient::Update 2020-09-06 15:43:02 +02:00
heinrich5991 89eb210297 Mark players on the same server as playing together in Steam 2020-09-06 13:38:03 +02:00
heinrich5991 f682a79d5f Make it possible to join via the Steam friend list 2020-09-06 13:37:48 +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
Jupeyy 7ca716fb3f Do more aggressive analysis and check all gl Functions that were used and added in 2.0 2020-09-05 13:07:25 +02:00
TsFreddie b045a3d6ee Revert & use "str_utf8_truncate" instead 2020-09-05 00:51:39 +01:00
def b7c3a6dfd8 Allow different timeouts for different downloads 2020-09-04 19:58:32 +02:00
TsFreddie 92d08d07de add str_utf8_copy 2020-09-04 17:34:27 +01:00
def 35a8aa5146 Revert "Don't time out on info2.ddnet.tw"
This reverts commit e936a86b5b.
2020-09-04 18:23:43 +02:00
Jupeyy 9299a2a1e4 Initialize variables from base class for the gl 3.3 class 2020-09-04 18:08:00 +02:00
Dennis Felsing 27f8402755
Merge pull request #2735 from def-/pr-timeout
Don't time out on info2.ddnet.tw
2020-09-04 16:26:03 +02:00
def e936a86b5b Don't time out on info2.ddnet.tw 2020-09-04 15:36:00 +02:00
def 80df6ca3b1 Remove temporary files after failure 2020-09-04 15:32:35 +02:00
bors[bot] f48ba92161
Merge #2718
2718: Fix texture destroy r=heinrich5991 a=Jupeyy

Might already help with #2717

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-04 10:14:34 +00:00
TsFreddie f71c36285f Textrender: count glyphs and chars separately 2020-09-03 23:53:26 +01:00
bors[bot] 9edb3706dd
Merge #2721
2721: Don't update news when something was only removed r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-03 18:49:22 +00:00
bors[bot] 53e03192dd
Merge #2722
2722: Increase default font texture size r=heinrich5991 a=Jupeyy

Now that we have fallback fonts this makes sense.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-03 15:38:45 +00:00
Jupeyy b0bd0a8c62 Increase default font texture size 2020-09-03 14:18:44 +02:00
def d6f74eb654 Don't update news when something was only removed 2020-09-03 12:32:13 +02:00
Jupeyy 6b3ad82786 Add shutdown command again 2020-09-03 11:49:47 +02:00
Jupeyy 49d2e36e26 Fix texture destroy 2020-09-03 10:46:15 +02:00
d3fault b5861f2857 add #ifdef check around GLEW_VERSION_4_6
This fixes compilation on Debian Stretch
2020-09-02 23:44:24 -07:00
bors[bot] 7a1d2c0f4e
Merge #2715
2715: Fix server responses handling in game browser r=heinrich5991 a=BannZay

Fixes all problems for #2620

Explanations of existed problems:
Lan has non expected servers because we were creating browser entry regardless token check
DDNet tab has ping 0 for servers as we weren`t rejecting previous refresh responses

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-03 01:37:37 +00:00
Andrii 840d8cb1a7 reset token seed on browser refresh 2020-09-03 03:03:22 +03:00
Andrii 836c56aeb5 create serverbrowser entry only after broadcast token check 2020-09-03 02:51:33 +03:00
Andrii a215e375db allow empty max ping filter 2020-09-02 19:26:26 +03:00
heinrich5991 674d7856fd Begin the groundwork to set a custom status on Steam
Currently, this just shows the current map in the status. Might need
localization data in Steamworks to be available to work in languages
other than English.

CC #2642
2020-09-02 00:32:22 +02:00
def e0cbd3b888 Remove fallback for Teeworlds' settings.cfg (partially fixes #2698) 2020-09-01 09:55:14 +02:00
def ffa955096f Add localization for texture warning, improve wording (fixes #2688) 2020-08-31 13:07:57 +02:00
def 44b1014f41 Load serverbrowser more fairly
One from each country and so on instead of doing one country fully first
before moving to the next. This makes loading servers like Japan and AUS
much faster since they're at the back of the list. This also reduces the
peak number of packets sent to each IP at once.
2020-08-31 00:10:26 +02:00
Dennis Felsing 92616f1a55
Merge pull request #2664 from ddnet/pr-revert-revert
Revert "Revert Jupeyy's OpenGL changes" (fixes #2659)
2020-08-30 10:55:15 +02:00
Jupeyy af4923b75b Add config variable, to ignore the check after it executed once 2020-08-29 18:44:48 +02:00
Jupeyy 570f148287 Analyse 3D/2D array texture sampling data when creating context 2020-08-29 18:44:42 +02:00
bors[bot] 3101747d46
Merge #2666
2666: Non divisible by 16 texture resize and warning r=heinrich5991 a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-29 15:25:35 +00:00
Jupeyy b1e98b598b Show warnings with non divisible by 16 textures(3D/2D array textures) 2020-08-29 17:04:30 +02:00
heinrich5991 db52340ab1 Use the correct name for determining ranks
Was broken by the recent Steam name update.
2020-08-29 12:39:57 +02:00
def c85ffb90af Revert "Revert Jupeyy's OpenGL changes"
This reverts commit 3eab3f5eb7.
2020-08-29 12:10:53 +02:00
Jupeyy e84d3a2659 Resize non devidable by 16 images for 3D/2D array textures 2020-08-27 02:07:25 +02:00
def 3eab3f5eb7 Revert Jupeyy's OpenGL changes
Emergency-revert for 14.5.1 release, too many problems
2020-08-26 20:03:22 +02:00
Dennis Felsing 62d68d24fa
Merge pull request #2654 from def-/pr-input
Try to fix input in Steam version on Windows (fixes #2645)
2020-08-26 19:59:52 +02:00
bors[bot] b13197e9f2
Merge #2650
2650: Remove panic quit button r=Learath2 a=def-

Use alt-f4 or whatever your window manager wants instead.

Co-authored-by: def <dennis@felsin9.de>
2020-08-26 16:26:26 +00:00
bors[bot] 9ba36991a9
Merge #2655
2655: Entity text should use space more effectively r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 16:07:58 +00:00
Jupeyy 410c4b3250 Entity text should use space more effectivly 2020-08-26 15:56:23 +02:00
def df82d24ffc Remove panic quit button 2020-08-26 15:38:39 +02:00
def 71cd53acfe Try to fix input in Steam version on Windows (fixes #2645) 2020-08-26 15:15:06 +02:00
bors[bot] 01944fabd4
Merge #2648
2648: Support Linux shared libs in autoupdater r=Learath2 a=def-

Since we now ship our first shared lib on Linux, libsteam_api.so

Co-authored-by: def <dennis@felsin9.de>
2020-08-26 09:35:13 +00:00
bors[bot] 736488cdf7
Merge #2647
2647: No sampler calls in old OpenGL API r=def- a=Jupeyy

Sadly didn't see it earlier, old API still binds its samplers to textures directly.
Need this before steam release @def- 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 09:26:49 +00:00
def ca5346ed61 Support Linux shared libs in autoupdater
Since we now ship our first shared lib on Linux, libsteam_api.so
2020-08-26 11:14:04 +02:00
Jupeyy 61374cfb33 No sampler calls in old OpenGL API 2020-08-26 00:59:31 +02:00
bors[bot] 694db44ee2
Merge #2598
2598: Allow specifying an OpenGL version manually r=def- a=Jupeyy

Ofc don't merge, we'll test it first, and if we want merge it, i'd need to enable shader compability for OpenGL 4+, and general support for OpenGL 3.1 and 3.2(bcs i think they already don't allow some older GL commands).

Also i never really read in the OpenGL 1.x specification, i remember that older OpenGL versions required glBegin and stuff like that

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-25 15:35:30 +00:00
heinrich5991 bfe7b3cbeb Use player name prefixed with "[D] " for the dummy name 2020-08-25 16:22:03 +02:00
heinrich5991 5d83e9177f Use player name from the Steam API as fallback
Fixes #2605.
2020-08-25 16:21:58 +02:00
heinrich5991 3c6f05887f Add SteamAPI + stub 2020-08-25 13:03:20 +02:00
trml d5c030065a Sort players by descending order first 2020-08-25 02:26:36 +02:00
trml 4abe8caab8 Sort servers by a combination of players and ping as default 2020-08-24 23:25:45 +02:00
Jupeyy 3117a936a9 Do not create 2D textures, if not required 2020-08-23 08:53:26 +02:00
Jupeyy 2c02314708 Stronger 1.x fallback, if OpenGL 3.0 was invalidly created 2020-08-22 21:49:30 +02:00
Jupeyy 5b9269f30a Check NPOT textures and stronger 1.x fallback (fixes #2630) 2020-08-22 21:15:50 +02:00
Jupeyy a07e9ac2cf Add OpenGL 1.x, 2.x, 3.x support (fixes #2619) (fixes #2607) 2020-08-22 10:22:51 +02:00
Dennis Felsing dbb9c662ba
Merge pull request #2617 from Jupeyy/pr_font_fallback
Font fallback
2020-08-20 20:34:48 +02:00
def a388b709d6 Generalize loading fallback fonts 2020-08-20 19:48:08 +02:00
def 178d864ec9 Switch to Source Han Sans font 2020-08-20 13:55:03 +02:00
def 446526486d Use two fonts, one as explicit fallback
Merging with fontforge had problems, for example for the Bei (U+5317) in
Beijing, see https://github.com/fontforge/fontforge/issues/4432
2020-08-20 11:13:08 +02:00
def c458ee52b0 Remove need for custom certificate
in anticipation of using CloudFlare
2020-08-19 17:54:05 +02:00
bors[bot] 607f5f0014
Merge #2594
2594: Add support for PLATFORM_SUFFIX define, Don't bother Steam users with red update text r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-19 13:33:14 +00:00
def 539c20a200 Add support for PLATFORM_SUFFIX define
So that we can set it like this:

  CXXFLAGS='-DPLATFORM_SUFFIX="steam"' CPPFLAGS='-DPLATFORM_SUFFIX="steam"' make
2020-08-19 13:41:06 +02:00
def 1394ac0fc4 Merge DejaVuSansCJKName with DejavuWenQuanYiMicroHei and use it for all (fixes #2593)
got them merged with fontforge, finally looks good.

allows reading CJK for everyone independent of language chosen.

Hopefully the lags are gone.
2020-08-19 12:31:55 +02:00
Jupeyy 7450e354de Add OpenGL 4.x support & cleanup 2020-08-19 08:42:09 +02:00
Jupeyy c2ce132ba3 Allow specifying an OpenGL version manually 2020-08-19 07:04:54 +02:00
def b756eaf6dc Ignore non-existing dll file
Happened when adding the new sqlite3.dll file.
2020-08-11 14:07:16 +02:00
Zwelf 81e5bb924c Move sync_barrier to only used place
to remove `#include <windows.h>` from header file preventing compiling on windows
2020-08-09 18:17:42 +02:00
def 07f18d4ac4 Client: Support .map file drag-and-drop to open map in editor
As suggested by Lady Saavik
2020-08-02 13:00:01 +02:00
Fireball ab9b96ddb2 Backported fix for Text() incorrect parameter type (int -> float)
The original fix was done by @oy for 0.7.4.
2020-07-15 20:49:14 +01:00
Fireball b1c17c3248 Backported fix for TextWidth() parameter mix-up
Fixes #2511 (Stack-buffer-overflows in some UIs).
The original fix was done by @oy for 0.7.4.
2020-07-15 20:48:29 +01:00
Fireball 918f321dfb Improved dummy switching
- Fix a use-after-free when there are no new snapshots for the cl_dummy tee after the switch.
- When one of the tees is hooked, cycling through them will no longer show phantom hook for the other tee.
- Dummy switch might happen a bit quicker since it doesn't depend on receiving new snapshots.
- Simplified code: m_LastDummy2 is no more.
2020-07-12 19:14:18 +01:00
bors[bot] c4d5c8dfa2
Merge #2478 #2480
2478: Use (u)int64 from system.h instead of (u)int64_t from cstdint r=heinrich5991 a=def-

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);
      |                                                                                          ^~~~~~~

2480: Send zoom status for dummy too r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-09 18:31:32 +00:00
def f4344dc420 Use (u)int64 from system.h instead of (u)int64_t from cstdint
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);
      |                                                                                          ^~~~~~~
2020-07-09 13:55:28 +02:00
def 42f1aba2c3 Fix video recorder (follow-up to 83c820db) 2020-07-07 15:45:36 +02:00
def d6ba9440ca Get rid of the annoying font size warnings
Since we're not doing anything about them anyway, and I get them
spamming me on every client start.
2020-06-26 23:42:04 +02:00
def cf77b567f8 Allow any update.json size
just grew over 16 KB and thus updates failed. I still need to setup
update5 server and will need to release a last release on update4 to
have a seemless upgrade-path.
2020-06-25 00:11:00 +02:00
bors[bot] 160a7b71fb
Merge #2279 #2327
2279: Only forbid resizing when videorecorder is recording r=heinrich5991 a=def-



2327: List data files in `CMakeLists.txt` r=def- a=heinrich5991

This fixes missing files for people recompiling when we add new data
files.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-23 08:48:05 +00:00
def 83c820db09 Fix some naming conventions in videorecorder 2020-06-23 08:00:03 +02:00
Edgar a03a22b8e5
Fix uninitialized warning on SBufferContainerInfo 2020-06-22 11:23:52 +02:00
Learath b0e5a37fa9 Do message translation differently 2020-06-19 20:27:15 +03:00
def 47e6c7cce2 Only forbid resizing when videorecorder is recording 2020-06-19 08:19:40 +02:00
Learath 345798f9e1 Don't miss dummy disconnects. Fix #2257 2020-06-11 13:33:08 +03:00
heinrich5991 0d7872c79e Send DDNet version early in the connection process
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
2020-05-22 17:58:41 +02:00
trml 99baf219d0 Revert "Remove the dummy prediction"
This reverts commit 681f30950c.
2020-04-18 22:16:25 +02:00
Arda Demir 8648b1a7dc Don't push notification when active 2020-04-15 00:37:58 +03:00
Arda Demir b7d452d2a0
Libnotify support for linux client (#2099)
Add libnotify support for linux client

Also unify notification management

Make libnotify mandatory for the client. It is installed on 100% of Arch
Linux systems and on 70% of Debian systems. I'd guess the remaining
Debian systems are servers.

Detect dependent libraries of `libnotify` using `pkg-config`. Remove
library-specific code from the game module. Decrement refcount for
libnotify notification object before leaving the function.
2020-04-14 17:53:53 +02:00
Ryozuki ea7f3f0a62
prevent endless loop 2020-04-14 12:51:48 +02:00
Ryozuki 5f565a5eb5
check for WavpackCloseFile 2020-04-11 13:17:21 +02:00
Ryozuki 7d51a0992a
fix memory leak on sound decoding 2020-04-11 13:17:21 +02:00
Ryozuki 09b79701af
don't check, use dbg_assert 2020-04-11 13:17:20 +02:00
Ryozuki cde63e2f48
Fix TexEx UB 2020-04-11 13:17:20 +02:00
Ryozuki c6731c7e83
Fix uninitialized m_LastProgramID 2020-04-11 13:17:19 +02:00
def dde88bbd77 Fix division by 0 (fixes #2131)
Caused by https://github.com/ddnet/ddnet/pull/2119/
2020-04-10 20:54:05 +02:00
Ryozuki 0da0dddf15 drop glu dependency 2020-04-08 18:19:12 +02:00
def 6fd7ded869 Whitespace 2020-04-07 22:57:07 +02:00
Learath 388d792205 Add an option for highdpi 2020-04-07 23:47:15 +03:00
Jupeyy 888223a529 Change last render logic, when inactive 2020-04-06 03:18:30 +02:00
Learath 61e5667624 Streamline platform client 2020-03-28 02:20:16 +03:00
sirius 3c085b53ed fix bug that demo can't play when demo pause and use start_video 2020-03-26 18:25:50 +08:00
bors[bot] 6e78deb0c4
Merge #2069 #2076 #2095
2069: Move global configuration out of client interface r=heinrich5991 a=ChillerDragon



2076: Allow editing multiple tile layer props r=heinrich5991 a=Learath2

Requested by Ravie on discord

2095: Fix `AntibotDestroy` being called twice r=def- a=heinrich5991

The resource deallocation needs to happen in symmetry with the
allocation, otherwise we get unmatched dealloctions leading to crashes.

Allocations happened in `CAntibot::Init`, but it was not guaranteed that
this was called before the destructor.

Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-03-23 17:04:15 +00:00
Learath 6919ed3041 Use updated stub, switch around versions 2020-03-23 15:46:57 +01:00
Learath 060d60f2ea Output library versions 2020-03-23 15:46:57 +01:00
sirius b5c931279f add option to pause video rendering when demo playing pause 2020-02-27 18:50:18 +08:00
def 127372b03d Fix timeout protection (fixes #2067)
CNetMsg_Cl_Say should not be a system message
2020-02-22 09:55:17 +01:00
ChillerDragon 9e0f6d2ce0 Move global configuration out of client interface 2020-02-19 11:24:58 +01:00
bors[bot] 43ecec1f2f
Merge #2061
2061: use pid in file names of temporary files r=heinrich5991 a=def-

to prevent race conditions with multiple clients running when saving maps, config on quit, during upgrade


Co-authored-by: def <dennis@felsin9.de>
2020-02-13 00:03:23 +00:00
def 31ae4c4d5a use pid in file names of temporary files
to prevent race conditions with multiple clients running when saving
maps, config on quit, during upgrade
2020-02-12 23:14:30 +01:00
def 00b74d2acb Don't overcomplicate Success = false 2020-02-12 22:45:09 +01:00
bors[bot] 72fcf9caa8
Merge #2050
2050: Fix race condition. Closes #2004 r=def- a=Learath2

I guess a new state is better then a global variable

Co-authored-by: Learath <learath2@gmail.com>
2020-01-26 15:49:30 +00:00
Learath cc8dea393d Address feedback 2020-01-25 21:05:33 +01:00
Dennis Felsing 50d848ec43
Merge pull request #1928 from sirius1242/demo_render2
Demo to video converter function.
2020-01-25 21:01:08 +01:00
Learath 40dc9692aa Fix race condition. Closes #2004 2020-01-25 17:48:32 +01:00
bors[bot] 7a3ebd5948
Merge #2041
2041: Strip spaces in browser (server name) r=heinrich5991 a=ChillerDragon

before:
![image](https://user-images.githubusercontent.com/20344300/72688976-b45f1d00-3b0c-11ea-8920-5328c6d721f7.png)
after:
![image](https://user-images.githubusercontent.com/20344300/72688970-9db8c600-3b0c-11ea-8636-330218d75ca1.png)


Co-authored-by: KillaBilla <robomastermail@googlemail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-01-25 12:45:36 +00:00
bors[bot] 749929431a
Merge #2040
2040: fixed faulty message id r=heinrich5991 a=ChillerDragon

(cherry picked from commit 9023796d27)

Co-authored-by: oy <Tom_Adams@web.de>
2020-01-25 12:40:14 +00:00
sirius 97064a1b09 Keep trying to solve fluency issues 2020-01-25 19:14:45 +08:00
def 8779be6bd8 Looks like my comment was wrong... 2020-01-25 07:37:28 +01:00
12pm ec42291756 Allow filtering by name in status
Easier to find players when the server is full
2020-01-24 14:44:54 +01:00
ChillerDragon 610976eddd Fix max snapshot size 2020-01-22 13:44:05 +01:00
ChillerDragon ee825f42e9 Add snap check for dummy 2020-01-21 22:20:09 +01:00
oy 49168da784 fixed typo
(cherry picked from commit 3deb58d409)
2020-01-21 22:17:20 +01:00
oy ef3bce204c added some checks to snap handling
(cherry picked from commit a09d498bc9)
2020-01-21 22:16:28 +01:00
KillaBilla ba1abac52f remove leading and trailing space from server name and forbit the use of multiple spaces
(cherry picked from commit a9cc1e8de2)
2020-01-19 22:28:19 +01:00
oy 1b4131a7fd fixed faulty message id
(cherry picked from commit 9023796d27)
2020-01-19 21:30:12 +01:00
sirius d6dc811674 seems fluent problem solved, and fix a error when compile by msvs 2020-01-12 16:57:40 +08:00
sirius 483885b6b1 try to solve the problem that video not fluent caused by previous commits 2020-01-08 14:25:06 +08:00
sirius d45b66938d make latter to wait when write_frame collision between audio and video 2020-01-07 11:32:56 +08:00
sirius 3baba93ed2 fix the problem of audio when video fps is low 2020-01-06 11:57:24 +08:00
sirius 779afcb771 crf and preset can be set by variables 2020-01-05 11:18:51 +08:00
sirius 0be4629cc1 forget to deal with pError 2020-01-04 17:44:12 +08:00
sirius 3967ddba00 replace same operations by call Demoplay_Play() when rendering video by render button 2020-01-04 17:08:00 +08:00
sirius 521e822bbb update map fix part when rendering video 2020-01-04 17:02:00 +08:00
sirius 5350a12185 fix wired sound 2020-01-04 10:17:16 +08:00
def 600a3b0bad Fix preprocessor 2020-01-03 22:07:02 +01:00
def 511c9d248e Fix alignment of pixels for reading to video recorder 2020-01-03 21:43:15 +01:00
def 1e36b4df15 Move some code out as a small optimization 2020-01-03 21:42:53 +01:00
def 8d716452ba Fix sizes so that we don't write too far 2020-01-03 21:42:19 +01:00
def 54ae929b2f Disallow resizing windows when videorecorder is compiled in 2020-01-03 21:40:41 +01:00
def a0362019f0 Initialize m_NextaFrame 2020-01-03 20:37:27 +01:00
Learath d2fad6c79a Fix demo bug 2020-01-03 12:13:40 +03:00
sirius 6803726209 extend sound buffer, try to solve segment fault problem 2020-01-03 10:26:10 +08:00
def 017b8c3621 Move DDNet-custom json code out of external directory (fixes #2022) 2020-01-01 20:07:04 +01:00
def df807a7486 -DVIDEORECORDER=ON instead of -DFFMPEG=ON, fix README
remove unused files
2020-01-01 16:56:54 +01:00
sirius 7710b88670 Merge branch 'master' of https://github.com/ddnet/ddnet into demo_render2 2020-01-01 18:36:49 +08: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
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
ChillerDragon 4a6a85124a Remove some unused includes 2019-12-14 10:20:42 +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
sirius 76a80fe01b deal with warnings 2019-11-12 21:41:30 +08:00
ChillerDragon 9c3447dd17 Use an enum for netclient indices 2019-11-10 13:46:27 +01:00
sirius 8c48e7d633 some small changes 2019-11-03 11:20:24 +08:00
sirius 4cc03af9a9 remove useless functions for previous audio sync 2019-11-02 18:32:48 +08:00
sirius e910fe404f Direct mix when recording audio now, and seems solve the stuck problem when
DDNet is not the focusing window
2019-11-02 18:21:47 +08:00
sirius f2ffa996c2 GetSync calculate only when m_Recording true (otherwise sometimes core dump) 2019-11-01 10:52:24 +08:00
Sirius 45263ebdd0
Merge branch 'master' into demo_render2 2019-10-31 22:08:49 +08:00
sirius ae1ff28579 not abort sample when sync now 2019-10-31 22:01:12 +08:00
WsYFU 1a16f5b5f0
Update serverbrowser.cpp 2019-10-31 16:16:35 +03:00
sirius 5ad8028aa4 sync audio frame with video frame number 2019-10-31 20:02:41 +08:00
sirius 99f6b66fbd solve sync between video and audio by magic number 2019-10-31 17:37:38 +08:00
sirius 99df692e00 interleaving problem solved, but a little misplacement of video and audio stream 2019-10-31 17:00:05 +08:00
sirius 0a6edd02ca solve the problem when video finished 2019-10-30 22:26:45 +08:00
sirius 9f009e0e04 interleaving problem seems solved, but still have some problem when playing by mplayer 2019-10-30 22:10:44 +08:00
sirius f0e7ca200f remove two first audio frames to avoid noise in the begining 2019-10-30 10:56:20 +08:00
sirius a7c2a65ebc audio seems correct, but need more elegant way, and still bad interleaving 2019-10-30 00:01:25 +08:00
sirius 49ff1a5827 not play sound when rendering video 2019-10-26 20:01:09 +08:00
sirius 9866a73b1c sync audio and video 2019-10-26 19:54:25 +08: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
sirius b175a6fd42 add button to use sound when rendering video 2019-10-17 13:38:00 +08: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
Learath 49a2a47dc8 Fix #1888 2019-10-02 20:44:03 +03:00
sirius 6acae69d96 repair the segment fault bug in con_startvideo 2019-10-02 09:52:54 +08:00
sirius ca583ba2a9 solve the problem about disorder of frames, reason is that no glReadBuffer() before glReadPixel() 2019-10-02 09:52:47 +08:00
sirius b0ee5671ff rebased to ef32fc4 2019-10-02 09:51:33 +08:00
sirius e4fdeefdd4 remove first two frames to forbid from interface before playback being rendered to video 2019-09-30 20:55:23 +08:00
sirius 605da124d4 add button to adjust render speed 2019-09-30 20:54:42 +08:00