Commit graph

494 commits

Author SHA1 Message Date
Dennis Felsing 1e74502e66 Revert "Merge pull request #1736 from sirius1242/master"
This reverts commit e8362f1727, reversing
changes made to 0f99605ab1.

Apparently people don't like "Digital Wellbeing"-like features
2019-06-14 12:00:49 +02:00
heinrich5991 ca03ab6337 Address Learath2's comments 2019-06-14 00:28:59 +02:00
heinrich5991 a7857d58c4 Remove now-useless function in CGameClient
(incorporate @fokkonaut's feedback)
2019-06-14 00:28:59 +02:00
heinrich5991 2b7f3587c4 Only accept DDRace record message on DDRace servers 2019-06-14 00:28:59 +02:00
heinrich5991 f31e081bd4 Remove all checking for the gametype in the game
OK, maybe not actually remove because it is kept for fallback when the
new method isn't available.

The whole gametype parsing business had the same downsides as user agent
parsing on the web, hence I removed it while keeping behavior the same.

This allows servers to explicitly opt in or out of certain bug
workarounds and other client behavior. This increases the complexity of
different configurations that are available in the client (which is a
bad thing).
2019-06-14 00:28:59 +02:00
Dennis Felsing 0d9952b32a
Merge pull request #1748 from archimede67/pr_replays
Replay system (demo after-the-fact)
2019-06-11 18:13:26 +02:00
Dennis Felsing bbb1b2cdef
Merge pull request #1733 from Learath2/dd_pr_colorsigned
Store colors unsigned
2019-06-11 12:26:28 +02:00
Ryozuki c089cffdde
fix hook col and make it green on tees 2019-06-09 19:26:20 +02:00
archimede67 929bf57bf6 infinite length and a lot of changes including notifications are now chat messages 2019-06-05 19:17:55 +02:00
heinrich5991 756aab339b Remove item invalidation logging for unknown UUIDs
This caused lags due to too much output during gameplay, demo playback
and demo cutting.

Fixes #1643.
2019-06-04 00:05:28 +02:00
Dennis Felsing e8362f1727
Merge pull request #1736 from sirius1242/master
Recorded the time of the player's game after the client was opened and show it on the top.
2019-06-03 11:02:28 +02:00
Learath2 c98978c9d6 Implement timescore using a netobj 2019-05-21 10:26:33 +02:00
Learath c2a774275f Move AuthInfo into DDNetPlayer 2019-05-21 10:25:15 +02:00
Learath 23255a04b3 Remove time-score 2019-05-21 10:24:07 +02:00
sirius 8819f21d3a played time can show now 2019-05-17 21:47:12 +08:00
Learath 0d39eb128d Use unsigned integers for colors 2019-05-15 18:05:19 +02:00
Dennis Felsing 0f65d02d1d
Merge pull request #1727 from trml/pr_pred_fixes_2
A few more prediction fixes
2019-05-13 07:29:04 +02:00
trml a885c64f4f Fix ninjajetpack prediction 2019-05-13 01:46:50 +02:00
trml bde2de2267 Improve weapon prediction on fastcap and vanilla 2019-05-13 01:46:35 +02:00
12pm a6a33bfaa5 Restore old team colors 2019-05-11 18:04:32 +02:00
Andrew 0fffd7705f Cl_text_entities_size (#1632)
* new command added

* fix code duplication after merge

* merge #1632 suggestions

* align the texture to the center vertically

* refactor

* fix RenderSwitchOverlay

* Update src/engine/client/text.cpp

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review
2019-05-06 14:19:10 +02:00
trml 00ab99aa2e Add prediction for weapon switches and gunfire animation 2019-05-05 12:33:26 +02:00
trml b61aae5ab4 Reset predicted character on kill 2019-05-05 12:33:26 +02:00
trml 20c06dfcdf Make speedup and stopper prediction on all gametypes again 2019-05-05 12:33:13 +02:00
trml 8eb4b7fd71 Add setting cl_predict_freeze 2 for having a small amount of misprediction while frozen 2019-05-05 12:32:06 +02:00
Learath b86c457c91 Remember whether a color is lit or not 2019-05-01 23:35:29 +03:00
Learath 5d0a1c8d0a Unlighten colors when sending to server 2019-05-01 22:49:52 +03:00
bors[bot] a2f44299e0 Merge #1678
1678: Handle colors in console r=def- a=Learath2

DEPENDS: #1654 

A better way to fix #1581 possibly deprecates #1597 

Co-authored-by: Learath <learath2@gmail.com>
2019-04-30 19:39:56 +00:00
Learath f9ab06476d Lighten tee colors of others 2019-04-30 19:49:53 +03:00
bors[bot] d8964ceedb Merge #1654 #1685
1654: Try working on colors a bit r=def- a=Learath2

There were color functions everywhere, I tried cleaning it up a little. I still couldn't get the roundtrip from Hsl to Rgb to be exactly the same, but I think this is the best possible.

1685: Work on compound binds r=def- a=Learath2

Closes #1417 

Co-authored-by: Learath <learath2@gmail.com>
2019-04-29 15:56:16 +00:00
Learath 6a1ef1af62 Can't access a siblings protected members? 2019-04-28 20:34:34 +03:00
Learath 66c89eafb2 Allow binding with modifiers in settings 2019-04-28 20:22:19 +03:00
bors[bot] a5096c4de0 Merge #1663
1663: Use freeze end tick instead of a flag. Fix #1659 r=def- a=Learath2

I used -1 for deep frozen, and 0 for not frozen. Not really sure if this is the best way.

Co-authored-by: Learath <learath2@gmail.com>
2019-04-27 08:53:38 +00:00
Learath 929d772071 Collateral 2019-04-26 22:38:18 +03:00
Learath 93d14a1eca Inconvenience for windows 2019-04-26 22:36:49 +03:00
Learath 65a17599e1 Add ColorHSVA, phase out more vec3's 2019-04-26 15:06:32 +03:00
Learath e637064a68 Don't store HSL separately 2019-04-25 19:49:27 +03:00
Learath 95a3a69e08 Start phasing out vectors for colors 2019-04-25 18:21:35 +03:00
Learath cc36af73be Cleanup colors 2019-04-24 23:53:26 +03:00
Ryozuki 502ebc5628 fix all conflicts 2019-04-23 20:45:54 +02:00
Ryozuki 42a5d7a9c1 fix conflicts 2019-04-23 20:42:07 +02:00
Learath 67668d7fb2 Use freeze end tick instead of a flag. Fix #1659 2019-04-23 18:57:26 +03:00
trml 681f30950c Remove the dummy prediction 2019-04-23 02:01:17 +02:00
trml 3d8bd174e7 Add extended data to CCharacter and improve prediction of super/solo/endless/superjump 2019-04-22 00:38:24 +02:00
Ryozuki d6cc94f839
fix hook col a bit 2019-04-21 19:35:07 +02:00
trml 0b3f3b03b5 Rewrite of prediction code, with additional prediction 2019-04-21 16:12:20 +02:00
Ryozuki eaef31d4a0
fix wording and add/fix no col and no hook 2019-04-19 11:59:09 +02:00
Ryozuki 0f3411f8fa
fix wording 2019-04-19 11:46:54 +02:00
Ryozuki f37f8a8268
add all character flags to ddnetnetwork character 2019-04-19 11:17:28 +02:00
Learath d6bfef2cc0 Use a NetObj instead of a system message 2019-04-17 23:47:32 +02:00
Ryozuki c686ceea53
Merge branch 'master' into pr_fix_solo 2019-04-12 16:34:43 +02:00
Ryozuki 3556830b9a
fix solo prediction 2019-04-12 16:29:13 +02:00
Ryozuki 7e43120b6e
make the client aware of other players solo status 2019-04-12 16:16:21 +02:00
bors[bot] 279eeed9fc Merge #1614
1614: Remove unmaintained Android code (fixes #1575) r=heinrich5991 a=def-

Thoughts?

Co-authored-by: def <dennis@felsin9.de>
2019-04-11 00:02:17 +00:00
def 2eab795c9e Implement color_to_rgb 2019-04-10 22:45:30 +02:00
def 94f3d97ddf Remove unmaintained Android code (fixes #1575) 2019-04-10 19:40:50 +02:00
def 11127f9344 Release fixes 2019-04-10 17:57:56 +02:00
Dennis Felsing bd4e3716a1 color -> color_from_rgb 2019-04-10 08:58:08 +02:00
def 01ffde25f3 Console command "colors" (fixes #1581)
Converts RGB colors to TW's HSL format
2019-04-07 22:54:29 +02:00
Ryozuki 0138dd32e3
apply alpha to solo players 2019-04-07 19:42:26 +02:00
Ryozuki 813c24bf29
add m_IsSolo and fix hook col 2019-04-07 18:58:49 +02:00
Dennis Felsing 138a9c6ff7
Merge pull request #1545 from def-/pr-load-font
Move out common font loading into method
2019-03-28 23:38:24 +01:00
def 9e25f4c113 Move out common font loading into method 2019-03-28 21:51:42 +01:00
def 8908102536 Add cl_confirm_disconnect_quit_time (fixes #1530)
Number of minutes of active racing time before being asked to confirm
disconnecting, disconnecting dummy or quitting through GUI. Defaults to
20 minutes, -1 to disable, 0 to always enable.

Also removed confirmation to quit when in main menu, except when having
an unsaved map in editor.

Spectate and kill should already be safe thanks to server-side kill
protection.
2019-03-25 20:10:38 +01:00
def 9ea9a43f13 Reset authed level in client
As reported by jao on Discord:

22:26 <jao> @Learath2 client auth level needs to reset on server join or something
22:28 <jao> because other servers don't send it
2019-03-19 22:29:41 +01:00
Learath 548e9969b2 Add colors for authed players. Deprecates #1299 2019-03-02 13:50:33 +03:00
fokkonaut fe4426b008 fixed ddrace score (time score) 2019-01-14 08:01:20 +01:00
fokkonaut 0e842359ad Add DDRace Score NETMSG 2019-01-14 08:01:20 +01:00
def bad0d53906 Move timing code to actual end of function 2018-12-23 22:58:37 +01:00
Dennis Felsing 0ad472df41 Make cort comparator conform to strict weak ordering
comp(p1, p2) == false was violated when both are nullptr
https://en.cppreference.com/w/cpp/named_req/Compare
2018-12-06 07:57:01 +01:00
def 6ad686eee2 Fix HUD (thanks to fokkonaut for reporting) 2018-11-24 22:57:15 +01:00
def 27865fdd89 Fix Race scoreboard ordering for times > 166 minutes (9999 seconds) 2018-11-21 21:26:05 +01:00
Ryozuki 09c82fba7a indent 2018-10-03 07:40:50 +02:00
Ryozuki 5c51e3b80d change to c style casts 2018-10-02 20:52:21 +02:00
Ryozuki be3cfe88e6 fix 2018-10-02 20:45:44 +02:00
Ryozuki 0a91fef8c8 fix tabs 2018-10-02 14:36:55 +02:00
Ryozuki e21a08f700 another improvement 2018-10-02 14:35:50 +02:00
Ryozuki 7efe2b436e code improvement on gameclient.cpp 2018-10-02 14:32:59 +02:00
Dennis Felsing 13aa154d47 Revert "Rewrite stopper code a bit"
This reverts commit 4ee5c5a781.
2018-08-24 09:34:54 +02:00
Dennis Felsing d60b0db632 Revert "Add mapbug "stoppers-passthrough@ddnet.tw""
This reverts commit 25e86851d3.
2018-08-22 08:33:21 +02:00
heinrich5991 25e86851d3 Add mapbug "stoppers-passthrough@ddnet.tw"
This can be set for maps that rely on actually passing through stoppers.
2018-08-16 17:54:55 +02:00
heinrich5991 4ee5c5a781 Rewrite stopper code a bit
Remove the whole copy-and-paste mess.

A seemingly ineffective and apparently code block has been removed.
2018-08-15 17:47:07 +02:00
fokkonaut e621a4a8a2 fixed, thanks heinrich 2018-07-25 22:41:24 +02:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
ZombieToad 5e723f6199 fix projectiles not rendering on mods based on ddnet
for some reason the client doesnt render extrainfo projectiles if the gamemode wasnt ddnet
2018-07-04 04:19:36 +01:00
ChillerDragon 6564b93a35 Fix unwanted dummy fire
If the latest fire input and the current differ in any way it causes firing.
So if you switch dummy after hammerfly was used it causes a weaponfire.
This unwanted fireing caused many unlucky fails for me already.
So i swap the fire status on dummyswapping so the server doesn't see any difference even if hamemrfly was used.
2018-06-04 11:06:54 +02:00
Jupeyy 887bcb52ff add window event listener for the client 2018-03-21 15:54:51 +01:00
Jupeyy db48a03898 add text buffering for nameplates and killmessages 2018-03-13 21:55:47 +01:00
yangfl 1620fc9b0f Fix typo 2018-02-07 16:10:40 +08:00
def 151da9af97 Remove Emojis 2018-01-25 20:03:18 +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
Michał 35fb1ddb41 Add emoji support 2017-10-28 09:08:17 +02:00
Redix 134a79a225 Move RaceHelper to src/game/client 2017-10-06 22:13:35 +02:00
Redix d4509111d5 Clean up ghost and race recorder 2017-10-06 22:01:33 +02:00
Redix 1efa8023ea Use race timer for ghosts if available 2017-09-28 16:02:00 +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