Commit graph

6864 commits

Author SHA1 Message Date
heinrich5991 aa85c5b4a8 Add string and nameban tests with Unicode characters 2018-03-14 14:20:15 +01:00
清歌 06143eb273
Register more controlable command for dummy
Which is cl_control_dummy, cl_dummy_jump, cl_dummy_fire and cl_dummy_fire.
if i want to contol my dummy to jump, 
first, press f1 in game, and use "cl_control_dummy 0",
second, use "bind mouse1 +toggle cl_dummy_jump 1 0".
finally, i can contol my dummy to jump by pressing left mouse button.
2018-03-14 20:20:41 +08:00
清歌 c976e6d017
Provide more controlable command for dummy
When g_Config.m_ClControlDummy id 1, we can control dummy by toggle g_Config.m_ClDummyJump or another to 1 or 0.
2018-03-14 20:14:18 +08:00
bors[bot] c65ffeb4ae Merge #1082
1082: Fix a bug with name bans r=Learath2 a=heinrich5991

Overlong nick names could be used to circumvent name bans.
2018-03-14 02:00:42 +00:00
heinrich5991 11304661db Put name ban stuff into a separate file
Fix a bug when overlong names could be used to circumvent name bans. Add
tests for name bans.
2018-03-14 02:35:31 +01:00
heinrich5991 d7f6cf2892 Fix some system.c insanity
`str_utf8_isspace` now returns true if the passed code point renders as
a space, instead of when not.

Add `str_utf8_trim_right`, use this function and
`str_utf8_skip_whitespaces` in the server.

Add tests for the three functions
2018-03-14 02:27:15 +01:00
Jupeyy c1a962b870 add ui fixes to work with new text renderer 2018-03-13 21:59:07 +01:00
Jupeyy 0930a3b7de buffer quads, and use the new backend system (+ fix a bug when
rendering)
2018-03-13 21:57:46 +01:00
Jupeyy 790201f751 add buffering for the ingame visible components of the hud 2018-03-13 21:56:37 +01:00
Jupeyy db48a03898 add text buffering for nameplates and killmessages 2018-03-13 21:55:47 +01:00
Jupeyy 6919a9da40 add new sprite functions for easier sprite quad buffering, and add this
to teerendering
2018-03-13 21:53:54 +01:00
Jupeyy a59d7401b5 add buffering for dmg indicator, map items, particles and players 2018-03-13 21:52:44 +01:00
Jupeyy 59f9d021ce buffer ingame chat 2018-03-13 21:50:49 +01:00
Jupeyy 62c3074c88 add new text renderer engine to support text buffering, cursors, text
marking and less character texture updates
2018-03-13 21:49:07 +01:00
Jupeyy 75eddfec7a add new shader programs 2018-03-13 21:47:45 +01:00
Jupeyy 898af39311 add new functions to support the new backend layout and the new
rendering system
2018-03-13 21:47:07 +01:00
Jupeyy 35f3dd5bc2 add new shader programs in the backend 2018-03-13 21:44:58 +01:00
bors[bot] cc6449bcd6 Merge #1055
1055: Keep track of lost frames and update time r=heinrich5991 a=Jupeyy

The problem a friend was occuring was, that on a fresh Windows install settings like cl_refresh_rate are set to 480.
Since the render calls take longer time than no render calls, it happened that client was sleeping on one update cycle and then took to long in another, where it called the render functions, leeding to less FPS than the cl_refresh_rate. this caused mouse lags and rarely frame drops.

another thing is, that select on Windows is non microsecond accurate, or just often returns too early, which caused that the refresh rate is much too high, or even ignored, (probably windows can only sleep on milliseconds, or again, is extremly inaccurate).

Another things on windows is that time_freq might be a "very odd" number ^^
i mean like on unix it's one microsecond (1,000,000 = 1s), but on windows the time_freq depends on the CPU leading to inaccurate calculation of the sleep time and render time.
This wasn't insanly huge issue, but probably skipped a few microseconds here and there.

This fix should stabilize the frames. I'd like to hear your opinion on this tho.
2018-03-13 19:41:38 +00:00
Learath 729a42adec More style 2018-03-13 00:13:50 +01:00
Learath b7610901e3 Handle empty reason. Fix formatting 2018-03-12 23:29:46 +01:00
Learath 22c21f73ae Actually display the reason 2018-03-12 19:09:53 +01:00
Learath c1a7c30f0f Add reason to name bans 2018-03-12 19:05:49 +01:00
Jupeyy 3858a930a9 merge mac and linux impl into one 2018-03-12 17:10:11 +01:00
Jupeyy 5b56e5b2c4 move the keyboard state back into the gfx update 2018-03-12 16:51:31 +01:00
Jupeyy 72c38bca0c devide by the time_freq 2018-03-12 16:41:02 +01:00
Jupeyy c6a9aadbb0 add missing return statement 2018-03-12 16:21:21 +01:00
Jupeyy e0b8ecabe4 move time fetch to time_get_impl 2018-03-12 16:12:06 +01:00
Jupeyy 081057d6b9 style fixes and remove float cast 2018-03-12 15:43:31 +01:00
Jupeyy 5e1bee2760 clean up a bit to and descripe it better 2018-03-12 15:10:49 +01:00
VeH-c 748007d525
Fixed typo 2018-03-09 22:24:56 -08:00
heinrich5991 31a3e8d4c0 Add possibility to ban players by name
This uses the Unicode confusable data together with judging how close
two strings are by using the Levenshtein distance.

Adds the commands `name_ban`, `name_unban` and `name_bans`. Kicks
players who join using a banned name and doesn't allow ingame players to
change their names to the banned ones.
2018-03-09 20:30:27 +01:00
ChillerDragon 8d1e60d5a6 Fix code style 2018-03-07 18:10:57 +01:00
ChillerDragon ab2876743a Make broadcast importance delay configurable 2018-03-07 18:06:39 +01:00
ChillerDragon 052e67c541 Add broadcast importance (fixes #669) 2018-03-07 17:22:41 +01:00
ChillerDragon 57cb136c55 Remove teamkill message on solo teams
For speedrunning alone in a team this "Everyone in your locked team was killed because '%s' %s."
is very annoying. So better only print it if more than 1 tee is in the team.
2018-03-06 14:08:04 +01:00
bors[bot] eef5131b0d Merge #1065
1065: Proper negative top5 calculation (fixes #1064) r=heinrich5991 a=def-
2018-03-05 11:00:57 +00:00
Dennis Felsing 93f0cd8933 Proper negative top5 calculation (fixes #1064) 2018-03-05 11:53:55 +01:00
bors[bot] fb69fa1815 Merge #1042
1042: Allow specifying DATA_DIR by compiler option r=heinrich5991 a=yangfl
2018-03-05 10:50:38 +00:00
bors[bot] e64919ddcb Merge #1058
1058: Add /pausevoted and /specvoted r=heinrich5991 a=def-

- Also fix /pause and /spec with name parameter a bit
- Move out common code between pause/spec
2018-03-02 14:41:31 +00:00
Jupeyy ced0ea3f82 set the gfx refresh rate limit higher for the console 2018-03-02 03:29:02 +01:00
Jupeyy cc7371c1cd set upper limit, for the case, if the refreshrate is smaller than the gameticks 2018-03-02 03:12:30 +01:00
def ad99c58528 Add /pausevoted and /specvoted
- Also fix /pause and /spec with name parameter a bit
- Move out common code between pause/spec
2018-03-01 19:46:07 +01:00
heinrich5991 1387ee9a3a Regenerate version file on git changes
Previously, this file had to be manually deleted if you wanted to have a
new version compiled in.
2018-03-01 16:50:29 +01:00
Jupeyy 089cb1ea44 this must be inactive ofc 2018-03-01 08:25:34 +01:00
Jupeyy a808ee07d3 add accedentially removed cast 2018-03-01 08:07:48 +01:00
Jupeyy 3458ee0976 check if gfx_refresh_rate is non zero 2018-03-01 07:50:52 +01:00
Jupeyy 6f0509cfae the actual description to the problem 2018-03-01 07:44:22 +01:00
Jupeyy edaf632c04 Merge branch 'master' of https://github.com/ddnet/ddnet 2018-03-01 07:38:50 +01:00
Jupeyy 238c8847c0 keep track of lost frames and updates, to ensure FPS stability and
better CPU sleep times
2018-03-01 07:34:14 +01:00
Jupeyy 3dabb5c2bd ensure right internal image format, to prevent unsupported reformatting 2018-03-01 07:31:09 +01:00
ChillerDragon c1e3dec980 Remove unused teams function 2018-02-27 16:40:52 +01:00
heinrich5991 61c7e9307d Don't log out on sv_rcon{,_mod,_helper}_password if not changed 2018-02-26 18:01:02 +01:00
Dennis Felsing 03792c1d0f
Merge pull request #1047 from Learath2/dd_pr_ctrldelete
Add ctrl-delete to chat. Closes #1032
2018-02-22 21:58:51 +01:00
Dennis Felsing 4cebe86ad8
Merge pull request #1049 from Learath2/dd_pr_scoreboardclan
A little more space for clan name. Fixes #724
2018-02-22 21:58:10 +01:00
Learath 7d1aaa735a A little more space for clan name. Fixes #724 2018-02-22 21:17:10 +01:00
Learath 4031e15fc8 Remove extra conditional
Stricter scope on temporary var.
2018-02-22 20:48:47 +01:00
Learath 20cac1c2bb Fix dyncam confusion. Closes #783
Remove "vanilla" dyncam toggle.
2018-02-22 20:40:14 +01:00
Learath 1f2e398819 Add ctrl-delete to chat. Closes #1032 2018-02-22 20:11:56 +01:00
yangfl 3c488ff5c7 Allow specifying DATA_DIR by compiler option 2018-02-22 00:12:52 +08:00
heinrich5991 f7b7054152 Fix crash on startup due to sound initialization
Of course `WavpackOpenFileInputEx` is subtly incompatible to
`WavpackOpenFileInputEx64` in that it requires the userdata for the main
steam to be nonnull.

Fixes #1041.
2018-02-18 12:45:03 +01:00
heinrich5991 73c03544b4 Support older wavpack versions 2018-02-17 01:35:07 +01:00
heinrich5991 99fe1d7bcf Revert "Fix bundled wavpack when system wavpack is available"
This reverts commit 0d9265b1fa.
2018-02-17 01:31:40 +01:00
def 0d9265b1fa Fix bundled wavpack when system wavpack is available 2018-02-15 19:30:40 +01:00
bors[bot] b14370e6ad Merge #1035
1035: Fix #1031 r=heinrich5991 a=Learath2

Not sure if this is the best way to do this though :D
2018-02-14 13:08:15 +00:00
heinrich5991 c2aaef2adf Remove vendored libwebsockets 2018-02-14 12:55:37 +01:00
def e9bc42a63c Update websockets implementation (fixes #1022)
seems to work with libwebsockets 2.4
2018-02-14 12:30:14 +01:00
Learath2 ff872b39cd Forgot to add GameID to the col-list 2018-02-14 01:17:40 +01:00
Learath2 61f0461d46 Style 2018-02-13 17:15:16 +01:00
bors[bot] 6338a05fd3 Merge #1025
1025: Add Teehistorian UUIDs to every record r=heinrich5991 a=Learath2

For statistic collecting purposes, don't merge before updating the SQL Schema.

    ALTER TABLE record_race ADD COLUMN GameID VARCHAR(64) AFTER cp25;
    ALTER TABLE record_teamrace ADD COLUMN GameID VARCHAR(64) AFTER ID;
2018-02-13 16:01:20 +00:00
Learath2 8cfebaa0b2 Fix #1031 2018-02-13 03:45:43 +01:00
bors[bot] c0fa444f3a Merge #1034
1034: Try to find external GLEW, pnglite and Wavpack  r=Learath2 a=heinrich5991

Allow for newer versions of Wavpack, fixes #1023.

Fixes #1016.
2018-02-13 02:02:07 +00:00
heinrich5991 94818ec1f0 Try to find external GLEW, pnglite and Wavpack
Allow for newer versions of Wavpack, fixes #1023.

Fixes #1016.
2018-02-12 23:29:45 +01:00
heinrich5991 797581502a Remove spurious engine/server include in game 2018-02-12 23:29:45 +01:00
heinrich5991 9e9b57ec62 Move generated files to the CMake build directory 2018-02-12 23:29:45 +01:00
def 5587e6dc96 Remove unused inp_grab 2018-02-11 16:40:08 +01:00
bors[bot] 6283ad2012 Merge #1015
1015: Fix typo r=heinrich5991 a=yangfl
2018-02-07 16:22:48 +00:00
Learath bc11fc2a35 Add GameUuid to teamscore aswell
Also get GameUuid through an interface.
2018-02-07 16:43:36 +01:00
Dennis Felsing f62833b699 Always keep same resolution on macosx 2018-02-07 13:21:18 +01:00
yangfl 1620fc9b0f Fix typo 2018-02-07 16:10:40 +08:00
Dennis Felsing 4c8a770ba6 macosx highdpi try #123456789 2018-02-07 08:22:57 +01:00
Learath 94d98e833a Fix mistakes. Fix CREATE TABLE 2018-02-07 01:10:02 +01:00
Learath 0aeb912db2 Escape the UUID just in case 2018-02-07 00:44:03 +01:00
Learath 4a52bca55d Include the teehistorian uuid instead 2018-02-07 00:35:21 +01:00
def 864ff1ac74 Remove highdpi stuff
This reverts commit d234c55dfa.
2018-02-06 23:21:17 +01:00
Learath 4748d5f065 Add client version to the record 2018-02-06 20:07:42 +01:00
Dennis Felsing d234c55dfa Try macosx highdpi fix 2018-02-05 14:37:26 +01:00
def a00d4112a7 Version 11.0.3 2018-02-03 21:47:09 +01:00
def c73e2a7ba8 New year is on January 1, not February 1 2018-02-01 20:22:18 +01:00
bors[bot] 4b84d7558f Merge #1007
1007: Record rcon authentication stuff into teehistorian r=Learath2 a=heinrich5991

This allows to check moderator actions after-the-fact.
2018-01-30 10:38:01 +00:00
bors[bot] 250dd81e2e Merge #1009
1009: Scrub more references to bam r=heinrich5991 a=Learath2
2018-01-29 13:23:02 +00:00
Learath2 98209fb0f4 Remove bam compatibility symlinks for osx 2018-01-28 22:53:51 +01:00
heinrich5991 1c3dc8c316 Record rcon authentication stuff into teehistorian
This allows to check moderator actions after-the-fact.
2018-01-28 03:13:05 +01:00
heinrich5991 a744fe53a2 Remove CPlayer::m_Authed
This can't get out of sync now.
2018-01-27 23:13:17 +01:00
bors[bot] f48a2a395b Merge #947
947: Add support for extra chunks in teehistorian r=Learath2 a=heinrich5991

This allows to add rarely-used chunks without increasing the file format
version.
2018-01-27 21:09:43 +00:00
def 4377c5d707 comma 2018-01-27 10:54:24 +01:00
def 3672efb6fe Can't change GAME_VERSION after all 2018-01-26 22:12:12 +01:00
def 151da9af97 Remove Emojis 2018-01-25 20:03:18 +01:00
Ryozuki 214a8ba10a fix votes 2018-01-25 19:36:40 +01:00
Dennis Felsing cb0209d6e3 Reapply "Only make grenades explode once (fix by timakro)" 2018-01-25 02:32:34 +01:00
Dennis Felsing f3256f0b6c Revert "Only make grenades explode once (fix by timakro)"
This reverts commit b9a93a18fb.
2018-01-24 07:50:15 +01:00
def dd7281ef86 Limit m_NumTimelineMarkers (reported by GG Kid) 2018-01-23 16:04:24 +01:00
def 39cb6ad8b7 Version 11.0.2 2018-01-22 20:55:24 +01:00
Tim Schumacher b3f7864ecf Don't change map release time when updating map stars/points 2018-01-22 20:47:26 +01:00
Dennis Felsing fac054275c
Merge pull request #992 from Jupeyy/master
RAM usage reduction for map buffering and foreground layer count fix
2018-01-22 20:44:56 +01:00
Dennis Felsing 8f2ce84f4e
Merge pull request #996 from Ryozuki/pr_cmd_vote_no
Add vote_no command
2018-01-22 20:36:20 +01:00
Dennis Felsing b9a93a18fb Only make grenades explode once (fix by timakro) 2018-01-22 14:15:53 +01:00
def 3033fbb466 Also pass negative numbers 2018-01-21 19:13:20 +01:00
def a731482152 /top5, /top5team, /top5points, /times also show worst results with negative numbers 2018-01-21 19:08:52 +01:00
Ryozuki 79fedff12d add /modhelp chat command 2018-01-21 01:32:55 +01:00
Ryozuki 0f328d6c52
wrong side.. 2018-01-18 18:41:37 +01:00
Ryozuki e039145628
fix pointer naming 2018-01-18 18:30:38 +01:00
Ryozuki e59387a304 revision changes 2018-01-18 16:17:23 +01:00
Ryozuki 6413cab702 forgot newline 2018-01-18 07:58:22 +01:00
Ryozuki 1e88ad92a0 add vote_no command and show auth rank in force vote 2018-01-18 07:56:07 +01:00
Ryozuki 6bf4a6e2ee fix style in ddracecommands.h 2018-01-18 01:25:45 +01:00
Jupeyy 15cc8e2dc8 use type that can hold any pointer size 2018-01-16 10:18:14 +01:00
Jupeyy 99bb1cc7db add parentheses 2018-01-16 09:41:06 +01:00
Jupeyy e9a2fc1d6e reduce RAM allocation for map buffering, and fix forground layer count 2018-01-16 09:35:28 +01:00
def c295ffbb6f Version 11.0.1 2018-01-15 20:19:23 +01:00
Dennis Felsing d174509f50
Merge pull request #990 from Ryozuki/pr_add_output_mutes_muteid
Add more output to mutes and muteid
2018-01-15 19:41:19 +01:00
Ryozuki 05ece01690 Add more output to mutes and muteid 2018-01-15 19:31:14 +01:00
def 949bb2d9fc Fix crash in emoji on map change, clear emojis 2018-01-15 19:08:51 +01:00
def 9139737aa7 Minor style cleanup 2018-01-15 19:08:33 +01:00
Dennis Felsing 31bbbaf512 case sensitivity 2018-01-15 09:10:20 +01:00
Dennis Felsing 272e14357c Fix SQL code for points/top5points 2018-01-15 09:08:51 +01:00
def 7ae5f33bdd fix cl_show_direction (thanks jupeyy) 2018-01-14 20:51:02 +01:00
def c8d4b605bf Improved cl_showfps, don't need average/current anymore 2018-01-14 17:21:50 +01:00
def 325371331d Version 11.0 2018-01-14 15:04:18 +01:00
def 2af80de4ea Teeworlds game version update 2018-01-14 13:57:57 +01:00
def 80cf5eff45 Update credits 2018-01-14 08:11:48 +01:00
def 9d5976a07d Fix version number... 2018-01-14 07:37:03 +01:00
def dee03a4f2e Version 11.0 2018-01-14 07:34:46 +01:00
def 48980efa2e Disable OpenGL 3 by default 2018-01-14 07:33:00 +01:00
bors[bot] 861849c924 Merge #981
981: Fix some bugs related to asynchronous IO r=Learath2 a=heinrich5991

Since `aio_thread` was crashing with #964 on an address that we didn't hand to `io_write`, I hope that this was just a bug with concurrently writing to stdout on Windows, and not a bug in the `aio` stuff.

Fixes #914. Fixes #964.
2018-01-14 02:20:29 +00:00
def 4bc0d176d3 More reverts.. 2018-01-13 22:22:55 +01:00
def 3ee76bc5ff Revert voting change 2018-01-13 21:40:29 +01:00
heinrich5991 8f291ce528 Don't use aio logging to stdout on Windows
This should fix #964.
2018-01-13 20:43:41 +01:00
heinrich5991 a5ab0faee7 Simplify aio stuff a little
This hopefully gets rid of the uninitialized writes CI and I sometimes
see.

Fixes #914.
2018-01-13 19:17:33 +01:00
def 16117f74d7 People don't like my vote changes 2018-01-13 16:46:31 +01:00
def 4dc118c752 Mutes work independent of port, don't announce IP in chat (fixes #908) 2018-01-13 10:50:31 +01:00
def 4682eaff56 Add option to turn off emojis (fixes #936) and add options in settings menu 2018-01-13 10:37:24 +01:00
def 484325f493 Fix nameplates with antiping (fixes #943) 2018-01-12 19:24:44 +01:00
heinrich5991 9d9bfee53f Move to ISO 8601-compliant timestamps
https://en.wikipedia.org/w/index.php?title=ISO_8601&oldid=819129098
2018-01-11 16:01:19 +01:00
heinrich5991 22080c840f Move teehistorian UUIDs into engine 2018-01-11 16:01:13 +01:00
heinrich5991 6c378b972b Add support for extra chunks in teehistorian
This allows to add rarely-used chunks without increasing the file format
version.
2018-01-11 15:59:53 +01:00
def 2ebc993379 Oops 2018-01-11 15:26:41 +01:00
def e29de3295f Vote faster when all press yes 2018-01-10 23:46:14 +01:00
def 37b7f058b2 Fix voting 2018-01-10 23:44:40 +01:00
def 0cc4763a43 Fix crash: Switch tiles with number 0 are handled like non-switch tiles
Thanks to 645654 and phacrum for report
2018-01-10 22:19:38 +01:00
bors[bot] 4a3b280fbb Merge #979
979: Add a missing call to `lock_wait` in test function r=Learath2 a=heinrich5991

This was uncovered when I tried to run other code with ThreadSan, but it
only found this. :(
2018-01-10 15:50:58 +00:00
Dennis Felsing d4f5b6ae69 Remove redundant code 2018-01-10 14:36:04 +01:00
Dennis Felsing ea85e0669a Keep vote running until everyone presses f3 or time runs out
Gives enough time for mods to react and for players to save
2018-01-10 14:33:03 +01:00
bors[bot] 94e43509cc Merge #977
977: Active moderator mode r=heinrich5991 a=Ryozuki

This PR adds a RCON command called "moderate", which enables a active moderator mode for the caller, so this will happen if a vote kick/spec is made:

- Vote will last atleast x seconds defined by CGameContext::m_VoteCloseTime (35 seconds on ddnet, according to @heinrich5991) even if there is majority.
- If a active moderator votes, it will be a force vote.
- If the active moderator doesn't vote, it will pass normally
- This is only for kick and spec votes.

I also added `access_level moderate 1` to autoexec_server.cfg

If there are any spelling errors on the code tell me.

Maybe needs to be tested more.
2018-01-09 09:14:17 +00:00
bors[bot] 5b2a929bc1 Merge #976
976: fixed rand init error message r=heinrich5991 a=ChillerDragon

the ``dbg_msg()`` func doesn't work until the
``IEngine *pEngine = CreateEngine("DDNet", Silent);`` line gets executed.

I used a bool to leave the code order untouched c:
2018-01-07 17:02:44 +00:00
Chiller Dragun 52a7f84583 code styling 2018-01-07 03:03:33 -08:00
def 4813a4b857 Add cl_shownotifications (fixes #949) 2018-01-05 20:20:39 +01:00
def 77a999c0b1 Add cl_showemotes 2018-01-05 20:17:22 +01:00
def f1af7cff98 Still render chat input even when chat is disabled 2018-01-05 20:11:05 +01:00
def 3025ed35c9 Introduce cl_show_chat_system
Set to 0 to disable server messages
2018-01-05 20:10:39 +01:00
heinrich5991 c9fc487c43 Add a missing call to lock_wait in test function
This was uncovered when I tried to run other code with ThreadSan, but it
only found this. :(
2018-01-05 16:06:24 +01:00
Ryozuki d6eb604718 add rcon moderate mode 2018-01-05 15:23:08 +01:00
Chiller Dragun 654dd597fe fixed rand init error message 2018-01-04 06:33:21 -08:00
bors[bot] c15f52bf5f Merge #957
957: Add manual locking to `ASYNCIO` for transacted writes r=Learath2 a=heinrich5991

Previously, e. g. it was possible that newlines are separated from the
printed line in `logger_file`.
2018-01-02 15:31:09 +00:00
Learath2 8353701789 Add sv_rcon_vote. Fix punctuation.
Add option to only allow authed clients to call votes.
2017-12-27 10:40:51 +03:00
def 627291c510 /pause <name> always switches to watching name
Old behaviour switched you out of pause if you were paused already
Thanks to fokkonaut for suggestion
2017-12-23 20:42:54 +01:00
Emir Marincic 08d7fc173c
Merge pull request #967 from heinrich5991/pr_ddnet_address_logging
Add address logging server
2017-12-21 16:35:47 +01:00
Dennis Felsing be9a5fc8c8 Update save command description (by marcelherd) 2017-12-21 13:58:09 +01:00
heinrich5991 eb31a52b83 Add very basic test for Unix sockets 2017-12-20 16:56:44 +01:00
heinrich5991 1a236dbefc Send connection information to external server 2017-12-20 16:56:34 +01:00
bors[bot] 1d55bbda0e Merge #948
948: Remove deprecated multi commands r=Learath2 a=heinrich5991

You now have to use `/mc;` instead of `/` if you want to bind multiple
commands to one key.
2017-12-08 14:48:32 +00:00
bors[bot] a2f010c1fe Merge #941
941: Add cross-compiled DMG archives r=Learath2 a=heinrich5991

Currently they only contain the client and the archives are a lot larger
than the current release artifacts.
2017-12-08 14:20:49 +00:00
Jupeyy 9228e632e9 remove spaces 2017-12-03 11:50:43 +01:00
Jupeyy e314802c9c Initialize m_LastLoad in Constructor and reset it when a new map is
loaded(%current% can be loaded directly)
2017-12-03 08:01:17 +01:00
Jupeyy 060f6fd36e Load shaders through IStorage class
Fixes #939.
2017-12-02 22:19:57 +01:00
ChillerDragon 3acb650a6f
removed unused comment 2017-12-02 18:26:53 +01:00
bors[bot] bad105c5e4 Merge #953
953: Overhauled job system r=Learath2 a=heinrich5991

The engine now takes `std::shared_ptr<IJob>`, this will ensure the
appropriate lifetime of the given parameters, it also allows for proper
destruction. Remove the now obsolete `IFetcher` interface and `CFetcher`
class.

Also adds some locks to `CUpdater`, previously it didn't have any locks
at all.
2017-11-27 23:34:54 +00:00
heinrich5991 8d47638a29 Add manual locking to ASYNCIO for transacted writes
Previously, e. g. it was possible that newlines are separated from the
printed line in `logger_file`.
2017-11-27 01:04:55 +01:00
heinrich5991 fd36b8c8c8 Remove unused header file src/engine/shared/storage.h 2017-11-27 00:58:30 +01:00
bors[bot] 41f6140179 Merge #945
945: Don't use nonstandard `#pragma pack` r=Learath2 a=heinrich5991

It's not needed in that place anyway.
2017-11-26 16:27:50 +00:00
bors[bot] 5bfb25c9c8 Merge #954
954: Change some config variable defaults to official server values r=Learath2 a=heinrich5991
2017-11-26 16:13:23 +00:00
bors[bot] f9e0b6b3fe Merge #931
931: Add Speedup tiles correctly at the border creation & remove tile layer extension restriction & fix the LastIndex buffer initlialization & setup non mipmap textures up correctly(texture completness) r=heinrich5991 a=Jupeyy

Allows speedups to be drawn on extended range(out of map range) too.
2017-11-26 13:32:05 +00:00
Jupeyy b1d99de87a s_ 2017-11-26 14:10:47 +01:00
Jupeyy bff1186d3b is now s_ 2017-11-26 14:08:00 +01:00
Jupeyy 14297ae45c code pattern 2017-11-26 13:28:41 +01:00
heinrich5991 c10db436b4 Change some config variable defaults to official server values 2017-11-24 11:59:45 +01:00
heinrich5991 23734deb14 Call net_init in tests 2017-11-24 10:51:46 +01:00
heinrich5991 3f43624d21 Add a couple of tests for CJobPool 2017-11-24 10:33:42 +01:00
heinrich5991 01d81fc4cc Make m_Shutdown variable atomic instead of volatile 2017-11-24 09:23:23 +01:00
heinrich5991 a3cdfac84e Fix lookup job being zeroed in CMasterServer::Load 2017-11-24 02:13:34 +01:00
heinrich5991 94acac91a0 Overhauled job system
The engine now takes `std::shared_ptr<IJob>`, this will ensure the
appropriate lifetime of the given parameters, it also allows for proper
destruction. Remove the now obsolete `IFetcher` interface and `CFetcher`
class.

Also adds some locks to `CUpdater`, previously it didn't have any locks
at all.
2017-11-23 15:47:38 +01:00
heinrich5991 f0c647dba5 Change os_compare_version to os_is_winxp_or_lower
This stops leaking OS details in non-`system.c` files.
2017-11-23 03:10:15 +01:00
heinrich5991 7fc4a21565 Remove deprecated multi commands
You now have to use `/mc;` instead of `/` if you want to bind multiple
commands to one key.
2017-11-18 16:36:34 +01:00
heinrich5991 be80ccb7d6 Don't use nonstandard #pragma pack
It's not needed in that place anyway.
2017-11-18 00:24:44 +01:00
heinrich5991 dcbd8197a4 Stop using deprecated APIs on macOS in server launcher 2017-11-17 14:57:42 +01:00
heinrich5991 dd5c26f81c Build the server launcher on macOS, package it 2017-11-17 14:37:29 +01:00
bors[bot] 27722633a3 Merge #940
940: Put shaders into the data/ directory r=Learath2 a=heinrich5991

Simplifies a lot of things
2017-11-15 23:29:55 +00:00
heinrich5991 17d3f4afa4 Put shaders into the data/ directory
Simplifies a lot of things
2017-11-08 22:19:47 +01:00
bors[bot] 71d77ae778 Merge #937
937: Fix `3 / 2` using integer division r=Learath2 a=heinrich5991
2017-11-08 20:08:59 +00:00
bors[bot] fdb2e330ce Merge #904
904: Fix use-after-free r=heinrich5991 a=Learath2

Not sure if this is the best way to go about this, but it works :/
2017-11-08 17:30:34 +00:00
Jupeyy 78c06e180f remove dublicated GL queries 2017-11-04 05:38:48 +01:00
Jupeyy 78a9fbb9b5 use the write buffer slot, instead of elementarray slot to create the
index buffer
2017-11-04 04:57:58 +01:00
heinrich5991 ef0c1b266f Fix 3 / 2 using integer division 2017-11-03 22:10:04 +01:00
Jupeyy d367f94d7c invalidate all index buffer bindigs, when index buffer is resized 2017-11-03 19:48:17 +01:00
Jupeyy c22af4bb4d fix index buffer bindig for normal quads(fixes startup crashes) and
initialize non mipmap textures as linear(texture completness)
2017-11-03 19:33:23 +01:00
bors[bot] 3fdc87047b Merge #935
935: removed dead function prototype r=heinrich5991 a=ChillerDragon
2017-11-01 14:15:56 +00:00
ChillerDragon a013a59aa6 removed dead function prototype 2017-11-01 14:57:34 +01:00
bors[bot] 5528cde5f6 Merge #869
869: Complete rework of the ghost and race recorder r=Learath2 a=Redix

This PR fixes a lot of issues with the ghost and race recorder, introduces a new ghost file format and implements some pretty useful features.

**A quick overview:**
 - When you cross the start line multiple times, both (ghost and recorder) will only restart if it is a non-solo server
 - If available, both will use the race timer to recognize the start instead of searching for the start line
 - Fastcap support for both
 - The recorder immediately starts when the Tee spawns, so the preparation steps (which are quite important for speedruns) will be included in the demo. If you do not cross the start-line within 20 seconds, it will stop the demo until you really start.
 - Better ghost menu (colors, reloading, deleting and saving ghosts)
 - The ghosts are more resistant against lags (old ones were sometimes completely useless due to small lags)
 - New ghosts files are significantly smaller
 - Cleanup, bugfixes..


**About the new ghost format (version 4/5):**
This format is used by Teerace for over a year now. The code for handling the binary files was moved to the engine. It includes an auto updater which creates a backup of all ghosts and converts them to the new format afterwards. The major differences from the format used by DDNet right now (version 2), are the ability to store multiple types of data, the usage of delta-encoding and a more portable header.

For whatever reason, the ghost stores values for every predicted tick, but without tick information, so lost snapshots can make them unusable. The new code uses the original values from the snapshots including ticks but it can also handle the old ones without. Since hardly any server uses the high bandwidth option this practically reduces the file size.

Like the demo recorder the ghost recorder directly stores the data to a file (every 50 snapshots) instead of writing the whole file at the end of the race. Indeed this can be changed with only a few lines if the old behavior is preferred.

The updater can handle version 2 (DDNet) and 3 (old teerace format, only slightly different from version 2) files. The updating already happens when the files are scanned for generating the list in the menu and not only when you activate them. The change from version 4 to 5 was only needed due to a bug in the implementation, the ghost loader can read both.

Some numbers about the file size: (map: hotrun, both about 30 seconds)

 - Old ghost: 30.4 kB (converted: 10.7 kB)
 - New ghost: 5.4 kB


**One thing about the race recorder:**
The old implementation compared the new file only with the first file it found for the particular map. The new one compares with all related demos and deletes them possibly, so that only the best demo is left. Since DDNet can also store the demos without name, this might also delete demos from other players, that you might have in your directory.
To prevent this I at least check whether the demo contains the player name if `cl_demo_name` is on. 
In my opinion the better solution would be to remove `cl_demo_name` and always use the player name.
2017-10-30 20:27:10 +00:00
Redix de1c0cf24d Fixed several issues with the ghost (thanks to Learath2) 2017-10-28 14:23:24 +02:00
def 04820b44f8 Simplify emoji 2017-10-28 09:08:17 +02:00
Michał ebe894faef Fix duplicate 2017-10-28 09:08:17 +02:00
Michał f7e64fe99e Quick fix 2017-10-28 09:08:17 +02:00
Michał 2e353beec2 Rendering fix, better offset calculation, optimizations 2017-10-28 09:08:17 +02:00
Michał 58b0ae5fc7 Possible emoji rendering fix 2017-10-28 09:08:17 +02:00
Michał 3c3c7abd3c Removed alias->utf replacer, added alias lookup instead, modified CEmojis class 2017-10-28 09:08:17 +02:00
Michał 07db85d806 Removed string.h, replaced some C functions with system.h ones, renamed variables 2017-10-28 09:08:17 +02:00
Michał bb419c43b7 Linux build fix + cleanup 2017-10-28 09:08:17 +02:00
Michał e85898a4b6 Fix includes + small clean 2017-10-28 09:08:17 +02:00
Michał 35fb1ddb41 Add emoji support 2017-10-28 09:08:17 +02:00
Jupeyy f15f41e654 remove extension limit for tile layers 2017-10-28 02:04:53 +02:00
Savander fa544dc0e6
Localize Date, Demo 2017-10-28 01:22:11 +02:00
Savander b2b82eb3dd
Localize friend message 2017-10-28 01:21:32 +02:00
Jupeyy 493d2dc9d8 add speedups correctly to the border tiles, to allow them beeing
displayed on extended range
2017-10-28 00:52:54 +02:00
Learath2 a6eb1b94f2 Add lock around m_Destroy and m_PastCB 2017-10-27 15:26:39 +02:00
bors[bot] d5b6b30f95 Merge #929
929: Don't draw invalid tiles r=heinrich5991 a=Jupeyy

I just forgot to fix that, when i was changing the buffer creation.
It just prevents invalid tiles, e.g. speedup without force, to be drawn
2017-10-25 14:21:45 +00:00
Jupeyy 863385e208 fix the code layout 2017-10-25 15:42:06 +02:00
Jupeyy 3c8f937b79 Don't draw invalid tiles 2017-10-24 20:41:11 +02:00
ChillerDragon 86f4deef8c fixed boardcast 2017-10-24 13:40:35 +02:00
Dennis Felsing bf2edba73f Merge pull request #918 from heinrich5991/pr_ddnet_test_info
Add `CTestInfo` class, add test for create-close-remove process
2017-10-24 12:20:46 +02:00
Jupeyy 442a1767d4 reset lastindexbuffer at object deletion 2017-10-24 03:12:48 +02:00
Jupeyy 5c9fc3d19b remove unused variable 2017-10-23 18:31:44 +02:00
Jupeyy 37c5102928 only delete VBOs when the VAO, which uses the VBO, is deleted(AMD driver
bug under windows). And only allow true fullscreen under supported
display resolutions, to enable prevention of DPI scaled opengl viewport
2017-10-23 18:02:18 +02:00
heinrich5991 b463197348 Add CTestInfo class, add test for create-close-remove process 2017-10-23 00:13:53 +02:00
def cb00a294b8 Enable gfx_opengl3 by default 2017-10-20 22:52:38 +02:00
def 342c6048bf Use new opengl by default 2017-10-20 22:47:59 +02:00
def 02aeae416b Infinity = no limit 2017-10-20 22:47:59 +02:00
Dennis Felsing 2dec3d771a Merge pull request #916 from heinrich5991/pr_ddnet_fix_aio_test_leak
Fix file descriptor leak in aio tests
2017-10-20 22:32:31 +02:00
def 2b7809befd Switch cl_showfps 1/2 2017-10-20 22:27:53 +02:00
heinrich5991 5d783895e4 Fix file descriptor leak in aio tests 2017-10-20 18:46:31 +02:00
Dennis Felsing 4afe702985 Merge pull request #913 from heinrich5991/pr_ddnet_fix_warning
Fix `-Wtypedef-redefinition` for `struct ASYNCIO`
2017-10-20 14:12:49 +02:00
Dennis Felsing 6c7f6e3a7e glew on macosx as well... 2017-10-20 11:49:00 +02:00
Dennis Felsing 5a75dc7f27 New glew try 2017-10-20 11:35:44 +02:00
heinrich5991 c654d82fd2 Fix -Wtypedef-redefinition for struct ASYNCIO
Fixes #912.
2017-10-20 11:24:45 +02:00
Dennis Felsing 88c0778b21 Bundle glew instead 2017-10-20 11:12:27 +02:00
Dennis Felsing 07db95ed59 Mac build fix 2017-10-20 10:20:29 +02:00
Dennis Felsing d7eabb0ea9 Further macosx fixes 2017-10-20 09:31:42 +02:00
Dennis Felsing db46d18e71 No GLEW on OSX necessary (untested) 2017-10-20 09:08:49 +02:00
Learath2 b8b4f7771d Rename the callback 2017-10-19 18:13:28 +02:00
Redix 9289deb5c7 Stop ghost rendering when touching the start line again 2017-10-18 21:37:25 +02:00
Dennis Felsing d6999bb726 Merge "Pull Request using OpenGL 3.3" 2017-10-18 12:49:27 +02:00
Dennis Felsing cc9bcb5b9f Merge pull request #900 from Learath2/dd_pr_authname
Reset the username on disconnect
2017-10-18 12:43:08 +02:00
Edgar Luque 3408d4f016 MinGW putenv workaround. 2017-10-17 16:38:40 +02:00
Learath 30aebc9cf4 Destroy() implies Abort() 2017-10-17 15:42:17 +02:00
Learath 96acddb57f Fix the other use after free 2017-10-17 15:39:20 +02:00
Learath 7f8356e37e Fix a heap-use-after-free 2017-10-17 14:23:56 +02:00
bors[bot] 5aca38e50e Merge #902
902: Fix victim handling r=Learath2 a=heinrich5991
2017-10-16 23:41:15 +00:00
heinrich5991 dfc53b48cf Fix victim handling 2017-10-17 01:32:40 +02:00
Learath 9ae2c16235 Allow changing UsernameReq while connected 2017-10-16 20:08:39 +02:00
Learath 81135d17de Reset the username on disconnect 2017-10-16 20:01:33 +02:00
Jupeyy cc54c4acdf also out the LOD to the fragment shader to make sure we use the same LOD
on every hardware
2017-10-14 23:27:14 +02:00
heinrich5991 16694a0d7b Use a random token for serverbrowse requests
This alleviates the risk for spoofed servers.
2017-10-14 21:58:23 +02:00
Jupeyy 5389dd9666 fix border amount for right and bottom border lines 2017-10-14 16:37:48 +02:00
heinrich5991 525b643e18 Fix a syntax error
Sorry. :/
2017-10-13 16:33:23 +02:00
heinrich5991 c439b04a2d teehistorian: Hide chat from teehistorian
There was a missing check that allowed chat messages to be written to
disk.
2017-10-13 16:25:26 +02:00
Learath2 4394933d6c Merge pull request #887 from heinrich5991/pr_ddnet_async
Add asynchronous output system and use it for teehistorian and `dbg_msg()`s
2017-10-13 15:30:24 +02:00
heinrich5991 e989ffad78 Rename async_* to aio_* and add test for nondivisible buffer lengths 2017-10-13 02:48:42 +02:00
heinrich5991 8e778cd9ab Address pull request comments 2017-10-13 02:29:18 +02:00
heinrich5991 d5008d87a3 Add a test that checks for correct order in async IO 2017-10-12 00:58:47 +02:00
heinrich5991 13f0655cba Don't reset ASYNCIO_CLOSE flag on async_wait 2017-10-12 00:53:12 +02:00
Jupeyy add339d210 not needed, because of restrictions before 2017-10-11 11:18:03 +02:00
Jupeyy 1814fa8d19 make OpenGL 3.3 experimental option, and don't initialize it as default 2017-10-10 15:35:20 +02:00
Jupeyy 4fc7187a14 adjust sprite texture coordinates to respect texel offset 2017-10-10 12:20:20 +02:00
Jupeyy 966b388b0e clamp speedup arrows images 2017-10-10 12:08:36 +02:00
heinrich5991 4d05a2379b Make teehistorian asynchronous 2017-10-10 04:11:14 +02:00
heinrich5991 2fc018aac3 Add asynchronous file output, port dbg_msg()s to that system
Also add tests.
2017-10-10 04:11:14 +02:00
heinrich5991 be0b52eddc Fix teehistorian crash on startup 2017-10-10 02:39:29 +02:00
heinrich5991 7de42a1414 Couple of thread fixes 2017-10-10 00:08:24 +02:00
Learath 1855992014 Fix style 2017-10-09 20:51:16 +02:00
Learath f4b3bc63b3 Forgot classes need to be initialized with new
Also matched the function signatures to the ones in the interface
2017-10-09 20:04:23 +02:00
Learath 26efee9506 Forgot the virtuals 2017-10-09 19:22:44 +02:00
Jupeyy 26bd800d63 calculate the LOD on CPU side and restrict mipmap levels for huge
textures to remove bad looking mipmap generations at high zoom levels
2017-10-09 18:58:44 +02:00
Learath2 70ee5d9645 Properly free CFetchTask in case of abort 2017-10-09 18:47:02 +02:00
Learath2 9bce7e8630 Use a proper interface for CFetchTask 2017-10-09 18:47:02 +02:00
Learath2 d15dcd3c58 Merge pull request #871 from heinrich5991/ddnet_teehistorian
Teehistorian
2017-10-09 18:42:27 +02:00
Jupeyy 43fa2fd1a7 use wrap mode for every individual texture 2017-10-09 15:59:16 +02:00
Jupeyy 92edbf4d37 allow viewing average or current fps 2017-10-09 15:58:12 +02:00
Learath 1b0ab87015 Get rid of unnecessary queue in CFetcher 2017-10-08 00:57:56 +02:00
Redix 134a79a225 Move RaceHelper to src/game/client 2017-10-06 22:13:35 +02:00
Redix 612fe15a32 Fix a possible issue with the ghost 2017-10-06 22:05:54 +02:00
Redix d4509111d5 Clean up ghost and race recorder 2017-10-06 22:01:33 +02:00
def b368234dae Delete editor before graphics (fixes #881) 2017-09-30 06:27:05 +02:00
Redix 1638f39557 Use the same ghost path everywhere 2017-09-29 23:15:47 +02:00
Redix 245afcb4b2 Fix warnings 2017-09-28 19:27:15 +02:00
Redix 2586c001b7 Use demos/auto/race for the race recorder 2017-09-28 19:14:36 +02:00
Redix e9a0271c29 Improved ghost and race recorder file handling 2017-09-28 19:13:20 +02:00
Redix 66cc527af4 Do not restart ghost and race recorder when the race timer is turned on with /timer 2017-09-28 16:57:39 +02:00
Redix 0891ce2812 Use move instead of copy assignment operator for the ghost 2017-09-28 16:42:47 +02:00
Redix c832beca63 Remove 30 min limit from the ghost 2017-09-28 16:02:01 +02:00
Redix a3a82b6571 Move filename clearing function to base lib 2017-09-28 16:02:01 +02:00
Redix 5721612761 Clean up trailing whitespaces 2017-09-28 16:02:01 +02:00
Redix d37bb5e65a Fix ghost menu localization 2017-09-28 16:02:01 +02:00
Redix 0c6026c22e Hide ghost menu buttons if there are no ghosts 2017-09-28 16:02:00 +02:00
Redix 0b4d629dab Improved ghost memory management 2017-09-28 16:02:00 +02:00
Redix 216e5654e8 Added config variables for server controlled ghost and race recording 2017-09-28 16:02:00 +02:00
Redix 17f1978740 Use the race timer for the demo recorder as well 2017-09-28 16:02:00 +02:00
Redix 491cfdb93e A few fixes in ghost and race recorder code 2017-09-28 16:02:00 +02:00
Redix 1efa8023ea Use race timer for ghosts if available 2017-09-28 16:02:00 +02:00
Redix 4c8c546c35 Improved ghost start accuracy 2017-09-28 16:01:59 +02:00
Redix ac234ad3ee Write the correct player name into ghosts that are saved from menu 2017-09-28 16:01:59 +02:00
Redix ffaa077c72 Improved ghost skin handling a bit 2017-09-28 16:01:59 +02:00
Redix 456a67fe2d Start race recording immediately so we can also record the preparation steps 2017-09-28 16:01:59 +02:00
Redix 0721b895ae Make sure that we have a free ghost slot for new records 2017-09-28 16:01:58 +02:00
Redix 353190588b Disable ghost and race recorder during demo playback 2017-09-28 16:01:58 +02:00
Redix 1e845a4020 Added reload button in ghost menu 2017-09-28 16:01:58 +02:00
Redix 5b3e9e4bbf Improved ghost file management 2017-09-28 16:01:58 +02:00
Redix d09e825065 Use existing code for rendering the ghost 2017-09-28 16:01:58 +02:00
Redix 5cc0d16029 Reworked the race recorder 2017-09-28 16:01:57 +02:00
Redix 9e52957423 Only restart ghost and race demo on non-solo servers when crossing the start line again 2017-09-28 16:01:57 +02:00
Redix 1c377ed00f Added Fastcap support for ghost and race demo 2017-09-28 16:01:57 +02:00
Redix bd3e81d5e0 Use snapshot values instead of predicted ones for the ghost and also save the tick
This makes the ghosts more resistant against lags
2017-09-28 16:01:57 +02:00
Redix 3c8217b39c Mark own ghost with color 2017-09-28 16:01:56 +02:00
Redix 4f57b33524 Use static array for active ghosts
Improve ghost file handling
2017-09-28 16:01:56 +02:00
Redix c189678e44 Cleaned up the ghost component and made it use the ghost recorder and loader 2017-09-28 16:01:56 +02:00
Redix b1e7138847 Added ghost file handling classes 2017-09-28 16:01:56 +02:00
Redix e8d3469465 Fix fs_rename on windows 2017-09-28 16:01:56 +02:00
heinrich5991 f16059c0b8 teehistorian: Add a couple of tests, fix uninitialized vars and asserts 2017-09-28 02:42:35 +02:00
heinrich5991 f43480aeed Add testing infrastructure for teehistorian 2017-09-28 02:03:30 +02:00
heinrich5991 1913106f15 teehistorian: Fix a bug with implicit ticks 2017-09-27 20:15:41 +02:00
heinrich5991 be79f14e38 teehistorian: Use m_pController->m_pGameType directly 2017-09-27 19:38:54 +02:00
Jupeyy baa69676ea fix warnings 2017-09-27 15:06:47 +02:00
Jupeyy 7aa547946b more warning fixes 2017-09-27 15:01:38 +02:00
Jupeyy 463944b143 fix code pattern mistakes and warnings 2017-09-27 14:52:06 +02:00
Jupeyy e820a36899 don't use average FPS 2017-09-27 12:21:29 +02:00
Jupeyy 6185c05be4 for tilelayers, go thorugh them layer by layer to reduce GPU overload by
only render visible areas
2017-09-27 12:20:23 +02:00
Jupeyy 9fd1290734 auto adjust font size for entity overlay 2017-09-27 12:19:39 +02:00
Jupeyy 745d77ffeb remove functions, that aren't needed anymore 2017-09-27 12:18:46 +02:00
Jupeyy 91216fb90c reduce upload size by normalizing color values, fix slow upload for some
iGPUs and force old opengl context, if issueinit fails
2017-09-27 12:16:34 +02:00
Jupeyy a85f542d1d only use 4x2 matrix 2017-09-27 12:15:30 +02:00
Dennis Felsing 4fe6dc51f7 Fix non-random announcements (thanks noby) 2017-09-26 14:20:37 +02:00
Ryozuki f472b02b17 fix little typo 2017-09-25 14:25:23 +02:00
Dennis Felsing 5b05e558dc Fix grammar (thanks noby) 2017-09-25 09:07:12 +02:00
heinrich5991 a201352b29 Fix a grammar mistake in bot client message 2017-09-24 21:11:23 +02:00
heinrich5991 9d5ba770e9 teehistorian: Only record non-default config vars 2017-09-24 21:11:04 +02:00
def b7f4ab4d80 Move comment 2017-09-23 22:49:01 +02:00
def 553c97b52d Fix crash with broken ddnet-info.json 2017-09-20 22:25:55 +02:00
heinrich5991 3efa490cb7 teehistorian: Remove global buffer
This removes the possibility of the buffer filling up and discarding
data.
2017-09-20 02:23:28 +02:00
heinrich5991 9761e9606a Make most user input teehistoric
Exclude private stuff like chat messages and votes.
2017-09-20 02:23:28 +02:00
heinrich5991 6ef9c8dbcd First working version of teehistorian
teehistorian records all inputs from the players as well as the player
positions in each tick. It stores this info in a highly compressible
output format (I've achived 5x compression using xz or bz2).
2017-09-20 02:16:11 +02:00
def 03fa475b5e Implement /pause [name] and /spec [name] 2017-09-18 19:12:01 +02:00
Redix 43f246f174 Made int packing functions safe 2017-09-17 02:36:50 +02:00
heinrich5991 42934fe102 Remove statically detectable float divisions by zero
This should fix the warning in MSVS.
2017-09-16 18:34:26 +02:00
heinrich5991 9911759314 Revert "Don't divide by 0"
This reverts commit 03faa51e28.

Dividing floats by zero isn't undefined behavior and results in +inf or
-inf depending on the sign of the first operand.

	#include <math.h>
	#include <stdio.h>

	#define PRINT(x) printf("%s = %f\n", #x, x)

	int main()
	{
		PRINT(1.0 / 0.0);
		PRINT(-1.0 / 0.0);
		PRINT(atanf(1.0 / 0.0));
		PRINT(atanf(-1.0 / 0.0));
		return 0;
	}

prints

	1.0 / 0.0 = inf
	-1.0 / 0.0 = -inf
	atanf(1.0 / 0.0) = 1.570796
	atanf(-1.0 / 0.0) = -1.570796

The changed function was problematic for values like (0,1), (-1,0),
(0,-1) where it always returned an angle of 0°.
2017-09-16 18:33:10 +02:00
def 03faa51e28 Don't divide by 0 2017-09-16 12:06:07 +02:00
Dennis Felsing 43d0299a45 Merge branch 'master' into pr_ddnet_fix_msvs_warnings 2017-09-16 11:17:39 +02:00
Jupeyy fc706a820c only check gametiles for DDNet server type 2017-09-16 03:45:24 +02:00
Jupeyy 26607cfd47 at texture upload, check if we have enough space in the command buffer
too
2017-09-15 03:50:06 +02:00
Jupeyy 31844d3353 set max width for custom text texture upload and fixing alignments for
texture updates
2017-09-15 03:01:26 +02:00
Jupeyy f2820ea392 use 4*4 array instead of declearing a full matrix class 2017-09-14 19:47:04 +02:00
Jupeyy f48e186bfd use CLineReader instead of fgets, also delete program at destruct 2017-09-14 19:35:31 +02:00
Jupeyy b6e4b4b4a6 detach shaders automatically after linking 2017-09-14 19:34:14 +02:00
Jupeyy 4fec86a354 support old opengl version with only 2 vertex coordinates 2017-09-14 08:03:33 +02:00
Jupeyy 3bdd8c19ac delete primitive index buffer at shutdown too 2017-09-14 03:54:22 +02:00
Jupeyy 1df1731b01 use glDeleteVertexArrays instead of glDeleteBuffers 2017-09-14 03:50:42 +02:00
Jupeyy 211f8a6b11 only allow changing to use single/multiple texture units at restart 2017-09-14 02:58:13 +02:00
Jupeyy 1167ab822c reduce upload since of vertices if drawing quads 2017-09-14 02:50:31 +02:00
Jupeyy 77b3c39553 allow disabling texture unit optimization by command, also use
drawelements instead of drawarrays for quads
2017-09-14 02:49:35 +02:00
Jupeyy 5c7c09d380 fixing most wrong code pattern 2017-09-13 20:33:58 +02:00
Jupeyy a3658e5526 store alpha textures always as RGBA 2017-09-13 18:32:08 +02:00
Jupeyy fd83d2834d dont draw layer if our view is out of the layers range 2017-09-12 23:16:01 +02:00
Jupeyy c437b5bb89 use 64 bit variable 2017-09-12 21:06:12 +02:00
Jupeyy 629bf2c5f9 Merge branch 'master' of https://github.com/ddnet/ddnet 2017-09-12 20:24:58 +02:00
Jupeyy 0caa70f0a1 support buffering of tile layers, draw them with the buffer objects and
some optimazations to border drawing
2017-09-12 20:22:18 +02:00
Jupeyy 9d2a625363 create overlay textures for entity overlays, instead of rendering glyphs 2017-09-12 20:15:37 +02:00
Jupeyy 6dc4d1e578 only allow a maximal zoom factor to make sure no bufferoverflow happens 2017-09-12 20:14:34 +02:00
Jupeyy 93138c1fba make background class inherited from maplayers and change some things in
maplayers instead, so the background class can profit from buffering
2017-09-12 20:13:53 +02:00
Jupeyy 96694fb399 make new opengl version optionally 2017-09-12 20:12:37 +02:00
Jupeyy 92bf979467 add new functions to interface to support buffering and rendering
visual objects(opengl objects)
2017-09-12 20:11:47 +02:00
Jupeyy 2af3393810 add glyph upload for custom textures 2017-09-12 20:11:14 +02:00
Jupeyy 6a7e3d5836 add a glyph upload for custom textures 2017-09-12 20:10:27 +02:00
Jupeyy bcb5f0ca8d add new programs for various gpu render tasks, and some more uniform
setter
2017-09-12 20:09:40 +02:00
Jupeyy a477540358 add new commands to buffer objects and draw them 2017-09-12 20:08:45 +02:00
Jupeyy 5f2ccf2960 add support for buffer objects and vertex object, and its draw calls 2017-09-12 20:07:38 +02:00
def 73d9ad7615 Really only download ddnet-info.json at correct time 2017-09-08 22:16:00 +02:00
def 715ac673ec Version 10.8.6 2017-09-08 22:01:51 +02:00
def e7e1070adf WinXP: Use http://info.ddnet.tw 2017-09-08 20:06:48 +02:00
def c2c453bd45 Make sending name to info.ddnet.tw optional, show dialog at start and some minor fixes 2017-09-07 20:51:46 +02:00
heinrich5991 4d96090770 Fix MSVS warnings
```
warning C4291: no matching operator delete found; memory will not be freed if initialization throws an exception
warning C4305: truncation from 'double' to 'float'
warning C4805: unsafe mix of type 'bool' and type 'int' in operation
```
2017-09-06 10:54:29 +02:00
Jupeyy 9bd6d0c6f9 Merge branch 'master' of https://github.com/ddnet/ddnet 2017-09-04 16:13:26 +02:00
def 58d1294b3c oops 2017-09-03 23:50:27 +02:00
def d5fc3210fd Version 10.8.5 2017-09-03 23:46:58 +02:00
def 8b1470c31f Revert "Merge GAME_VERSION and GAME_RELEASE_VERSION"
This reverts commit 5cfd779c68.
2017-09-03 23:46:15 +02:00
def 4b39a39e10 Version 10.8.4 2017-09-03 19:30:29 +02:00
def 278c1ee198 Add Toggle ghost control (fixes #823) 2017-09-03 19:23:59 +02:00
def 5cfd779c68 Merge GAME_VERSION and GAME_RELEASE_VERSION 2017-09-03 18:54:43 +02:00
def caec69abc1 RequestDDNetInfo in ingame menu too 2017-09-03 18:17:21 +02:00
def 89ed22e8d8 Introduce ddnet-info.json
- Single json file containing all information for the client
- Fetched from https://info.ddnet.tw/info?name=deen
- Replaces versionsrv, news, ddnet-maps.json and ddnet-ranks.json
- Servers are sorted by most popular ones for respective player
- Always stays < 100 ms response time, compared to occasional 50 s for
  old ddnet-ranks.json
2017-09-03 17:42:04 +02:00
def 27b7549bba Make --silent stop stdout logging 2017-09-03 10:37:24 +02:00
def 2e537684d5 actually don't need the family 2017-09-03 09:20:46 +02:00
def f2a7f5f8dd User agent in http fetcher 2017-09-03 09:18:00 +02:00
def 0a09af4b33 str_format instead of sprintf 2017-09-03 09:01:25 +02:00
def 42bc38227d Request server list and ranks at better location 2017-09-03 09:00:57 +02:00
def 7b6317a5d6 buffer sizes 2017-09-03 08:53:54 +02:00
def 862e26dd08 Clean up time handling a bit 2017-09-03 08:48:21 +02:00
Jupeyy 1053bc735d initial port to opengl3.3 (without any optimazations) 2017-09-02 15:24:07 +02:00
def e64e59a839 semaphore instead of busy waiting in CJobPool 2017-09-02 12:30:55 +02:00
Dennis Felsing ed59b0f4a2 Fix binary dirs for installed locations on POSIX
Also rename them from teeworlds to ddnet
2017-09-01 13:37:01 +02:00
Dennis Felsing f8b98c6366 Version 10.8.3 2017-09-01 08:01:45 +02:00
Dennis Felsing 6c21738d9d Try to fix Windows crash 2017-09-01 08:01:26 +02:00
def f5edf53fd7 Version 10.8.2 2017-08-31 23:43:00 +02:00
def 7c6c2f5d9b Fix graphics init to be later so that user resolution is available 2017-08-31 23:42:21 +02:00
def 9b214db85f Force version.ddnet.tw and update4.ddnet.tw 2017-08-31 23:28:10 +02:00
def 8ebac31c03 Use old ddnet-ranks.json when new one can't be fetched currently 2017-08-31 22:40:55 +02:00
def e36d7ce9a1 Version 10.8.1 2017-08-31 22:07:43 +02:00
def 583421b42d Revert "fixed sprite rendering. Closes #834"
This reverts commit 43af1fdb5f.
2017-08-31 22:03:33 +02:00
def fe208fb631 Cleaner logger 2017-08-31 20:07:43 +02:00
def 31ecbc3cf1 Don't skip items when logging 2017-08-31 19:51:58 +02:00
def 03399994b5 Remove duplicate semaphore 2017-08-31 19:36:27 +02:00
def a58895291c Only trust ddnet ca 2017-08-31 19:33:20 +02:00
def 97380494e6 Version 10.8 2017-08-31 19:24:17 +02:00
def 705349f2e5 Clean up and fix semaphores and threading 2017-08-31 19:18:07 +02:00
Learath2 cd386488e2 Rename semaphore_* to sphore_*
Previous naming conflicted with Mach kernel definitions.
2017-08-31 19:18:07 +02:00
Learath2 cd3038315b Forgot the include 2017-08-31 19:18:07 +02:00
Learath2 abb9891947 Use the pointer address to ensure uniqueness 2017-08-31 19:18:07 +02:00
Learath2 573b75b1b2 Forgot the / for semaphore name 2017-08-31 19:18:07 +02:00
Learath2 fd17477f06 Enable threaded logging on OSX 2017-08-31 19:18:07 +02:00
Learath2 a8e19205dc Fix conceptual mistakes 2017-08-31 19:18:07 +02:00
Learath2 153c6871c8 Try (ab)using named semaphores on OSX 2017-08-31 19:18:07 +02:00
Savander 1741df43cd Add gametype support to exclude field 2017-08-31 12:35:01 +02:00
heinrich5991 659e1ff527 Merge pull request #853 from Redix/pr_ghost_time
Ghost and Race demo time extraction fix
2017-08-31 12:31:20 +02:00
Dennis Felsing f5e1ba7638 Merge pull request #855 from heinrich5991/pr_ddnet_tests_travis_linux
Run tests on Travis on Linux
2017-08-31 08:15:02 +02:00
Redix affa3faeec Only use integers for ghost and race demo handling
Ghosts still use floats internally
2017-08-31 03:22:08 +02:00
heinrich5991 fc44bfcc76 Run tests on Travis on Linux
Fix the style of our only test.
2017-08-31 01:39:08 +02:00
Redix cf09b6b08b Use -1 as invalid for time parsing functions 2017-08-31 01:13:26 +02:00
Redix a396e40c5e Move race helper functions to own cpp file
Fix some style issues
2017-08-31 00:17:16 +02:00
def bff1c12b83 Don't try to load ddnet-ranks.json while fetcher is downloading it anyway 2017-08-31 00:07:59 +02:00
def a20db6ec56 Don't shutdown sound twice (fixes #851) 2017-08-30 23:19:33 +02:00
def 7d71dae87f Fetcher: sephamore instead of spinlock, exit thread gracefully 2017-08-30 23:14:00 +02:00
def 040fc9ca32 Implement right click and middle click on country and type filters
Right click: exclusively activate one
Middle click: reset (reenable all)
2017-08-30 22:36:39 +02:00
def 58c5303262 Change unit test layout 2017-08-30 22:18:48 +02:00
Redix b6a3a42aa6 Use the time parsing functions for race demo name parsing 2017-08-30 22:10:43 +02:00
Dennis Felsing eb2634ab0a Merge pull request #852 from heinrich5991/pr_ddnet_fix_extractname
Add testing; fix, rename and test the `CEditor::ExtractName` function
2017-08-30 22:09:17 +02:00
heinrich5991 de2fd75a16 Add possibility to write tests
Also add a test for `IStorage::StripPathAndExtension`
2017-08-30 21:57:55 +02:00
def a1d2ecb6de Empty when no rank 2017-08-30 21:50:09 +02:00
Redix f1f7e4e30b Fix ghost and race recorder time parsing 2017-08-30 21:44:27 +02:00
def 16f3ddc5a7 Show if user has rank on map in browser (+filter)
UI implementation by timakro
2017-08-30 21:34:04 +02:00
def e480b651e7 Fix fetcher write function to return size 2017-08-30 21:01:19 +02:00
def 7f0eb53ff4 Initialize in order to ensure destruction in order (fixes #848) 2017-08-30 17:22:36 +02:00
Dennis Felsing 25a5eff1f8 Merge pull request #847 from heinrich5991/pr_ddnet_uncompressed_datasize
Rename `GetUncompressedDataSize` to `GetDataSize`
2017-08-30 16:34:02 +02:00
oy 43af1fdb5f fixed sprite rendering. Closes #834 2017-08-30 16:32:39 +02:00
heinrich5991 22be1be389 Fix and rename the CEditor::ExtractName function
Fixes #846.
2017-08-30 13:59:42 +02:00
heinrich5991 2682480f8a Rename GetUncompressedDataSize to GetDataSize
Also rename the old `GetDataSize` to `GetFileDataSize`. `GetDataSize`
now returns the actual data size, not the data size before
decompression.
2017-08-30 08:36:17 +02:00
root 7cd95f63cf Fixing spaces and globals 2017-08-30 00:34:14 +02:00
root 2c748ebf70 Fixing PR over heinrich revision 2017-08-30 00:21:41 +02:00
sctt 0849fa6024 fixing map_resave and adding map_replace_image
Update datafile.h

Update datafile.cpp

Update datafile.cpp

Update map_resave.cpp

Update datafile.h

Update map_resave.cpp

Update datafile.h

Update datafile.cpp

Update config_store.cpp

Update config_retrieve.cpp

Update io.cpp

Update gamecontext.cpp

Update config_store.cpp

Update CMakeLists.txt

Create map_replace_image.cpp

Update map_replace_image.cpp

fixing bug with height and witdth
2017-08-29 16:21:16 +02:00
def 40b145fe20 More utf8mb4 in database connection and database default 2017-08-26 10:12:47 +02:00
def ac2943a49b utf8mb4 in database for real utf8 2017-08-26 09:00:33 +02:00
def fb252c4940 Fix compilation 2017-08-25 13:27:37 +02:00
heinrich5991 1ae004ba46 Make a copy of the input only after sanitizing it
This fixes a physics bug that allowed players to set their mouse
direction to (NaN, NaN), resulting in funny effects.
2017-08-25 13:20:10 +02:00
def 0e1cc205ef Fix formatting for server chat messages with time in already 2017-08-21 20:48:11 +02:00
def 98520bb407 other kind of fix 2017-08-19 09:36:13 +02:00
def d40dd4f362 Don't try next SQL server when /times returns empty 2017-08-19 09:32:14 +02:00
def 0b1842d438 Use filesystem paths for -f command line param 2017-08-11 21:07:20 +02:00
def 0b5dcdc478 Disable vsync by default and warn about possible delay 2017-08-08 19:53:16 +02:00
def 5d8a0ddc1e Add time in console 2017-08-04 22:38:22 +02:00
heinrich5991 33315452c3 Merge branch 'master' into leak_fix 2017-07-31 20:42:32 +02:00
def 0a28556481 A bit nicer birthday message 2017-07-31 18:24:16 +02:00
def d6143cb26f How come no one notices that we're missing the day in our logs?... 2017-07-30 15:40:37 +02:00
def d9aeeae3fc Fix sql_score.cpp formatters 2017-07-30 14:23:25 +02:00
def c12082c2ef Not too many messages 2017-07-30 14:15:45 +02:00
def 3eb079bd64 Correct type in printf 2017-07-30 12:43:54 +02:00
def d6deb707c8 no pragmas in functions 2017-07-30 12:35:54 +02:00
def c6a5a7dcb3 Try using more modern SDL audio interface 2017-07-30 12:33:51 +02:00
Learath2 4622ab4cb6 Merge pull request #814 from heinrich5991/pr_ddnet_fix_cmake_mac
Fix the CMake Mac build
2017-07-30 11:38:12 +02:00
def 7a3b7c6228 oops 2017-07-29 23:13:04 +02:00
def f3d4fcf012 Print message when team starts playing to team members 2017-07-29 23:11:33 +02:00
HMH 19a8e7add6 removed some spaces 2017-07-28 20:44:03 +02:00
HMH 04e2946efc mem_free is safe on null pointers 2017-07-28 15:42:32 +02:00
HMH 6655b35bdd minior style issues 2017-07-28 14:49:09 +02:00
HMH d03e91153c removed unused Dest function for layers 2017-07-28 14:43:03 +02:00
heinrich5991 6247aa0c7f Enable -Wextra and -Wformat=2
Also annotate `dbg_msg`, `str_format` and `str_timestamp_ex` so that the
compiler can determine whether the format strings are correct.

Fix the compiler warnings generated by these extra warnings -- some of
them were security issues.
2017-07-27 20:38:17 +02:00
Marcel Herd d513af6a42 Removed default bind for home key (kill)
Kill is already bound to K by default, binding it on home as well doesn't really have any purpose. (?)
Furthermore, the home key is right next to page up which is bound to toggling entities.
It is very easy to accidentally hit home instead of page up, which is highly frustrating.. therefore I suggest removing this duplicate binding.
2017-07-26 20:43:26 +02:00
def adef38a574 Revert "We want the Timestamp of a team to stay min(Timestamp) to indicate the first time this team finished the map"
This reverts commit bf0e67a34a.
2017-07-26 18:12:41 +02:00
heinrich5991 98f229c48b Fix a -Wunused-value warning in map_diff 2017-07-26 11:53:21 +02:00
heinrich5991 ed0949cb2e Remove unused function gui_messagebox
The Mac implementation was causing problems and it wasn't used anywhere.
2017-07-26 11:38:26 +02:00
heinrich5991 fd8bccb0f4 Fix the CMake Mac build
Fixes #805.
2017-07-26 04:30:56 +02:00
def 5a437b110f Nicer formatting for task fetcher 2017-07-25 19:23:10 +02:00
def 379f060126 Version 10.7.1 2017-07-25 19:09:05 +02:00
def a9d3f45b25 Add ui_close_window_after_changing_setting 2017-07-25 19:08:16 +02:00
def 8d621dfc00 Add kitty skins (by Ravie + fuzzy ninja by patwo.*) 2017-07-25 00:11:37 +02:00
def a9498b15cb Fat skins 2017-07-25 00:11:37 +02:00
heinrich5991 1ebb4f89a6 Reopen: Add a flag for rcon login via username (#800)
This uses an extended protocol message to signal that rcon
authentication might require a username, allowing the client to enable
the username prompt.

Add a forgotten logout on key update
2017-07-24 21:43:55 +02:00
def cf08239e58 no plenk 2017-07-24 20:58:51 +02:00
def 147005ea42 ask before overwriting demo file when slicing (fixes #806) 2017-07-24 18:33:11 +02:00
def bcec0f1bb1 ctrl-f to search, ctrl-x to exclude, ctrl-r to reason 2017-07-24 18:05:19 +02:00
Dennis Felsing 402a71527a Merge pull request #810 from H-M-H/stat_csv
use str_append for appending strings
2017-07-24 16:01:06 +02:00
HMH f2ac4a02ce use str_append for appending strings
this fixes corrupted stat csvs as str_format does not work with same
source and destination
2017-07-24 15:27:30 +02:00
def 4c98c4bdd6 typo 2017-07-23 21:34:36 +02:00
def 79d29b1e31 Fix: Finish score should always show the fastest time 2017-07-23 21:33:55 +02:00
def bf0e67a34a We want the Timestamp of a team to stay min(Timestamp) to indicate the first time this team finished the map 2017-07-23 21:20:12 +02:00
def ec885f3e25 Fix layout 2017-07-22 22:43:20 +02:00
def af5b903944 Version 10.7 2017-07-22 22:32:35 +02:00