1979: Clean up color handling a bit r=Learath2 a=def-
- SetAlpha should be called WithAlpha and only works for RGBA
- Fix type correctness of color_scale and introduce color_invert
- Nicer hook coll color handling in RenderPlayer
- Use CRTP to have type safe WithAlpha, otherwise this would compile:
`ColorHSLA = WithAlpha(ColorRGBA(1.0f, 1.0f, 1.0f));`
Follow-up to https://github.com/ddnet/ddnet/pull/1968
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
- SetAlpha should be called WithAlpha and only works for RGBA
- Fix type correctness of color_scale and introduce color_invert
- Nicer hook coll color handling in RenderPlayer
- Use CRTP to have type safe WithAlpha, otherwise this would compile:
ColorHSLA = WithAlpha(ColorRGBA(1.0f, 1.0f, 1.0f));
- Remove duplicate laser entries
- Update menus_settings.cpp comment for scripts
- Update instructions for scripts
- Run script to get updated localizations
1974: more typesafty in the graphics. introduced the IGraphics::CTextureHandle r=def- a=ChillerDragon
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8)
Co-authored-by: Magnus Auvinen <magnus.auvinen@gmail.com>
- videorecorder only works for recording demos now
- demoplayer was modified to allow controll over the time that passed
in order to get perfect fps, IVideo controlls how much time passed,
basically every rendercall sets the time to record the next frame
1862: Add Sleepbubble to ClAfkMark r=def- a=FallenKN
With setting cl_afk_mark to 2 you will now get a sleepbubble on afk instead of the mark.
Which option should be default?
Also it displays chatbubble instead of sleepbubble when the playerflag is active. (I don't know which behavior is preferred)
Kept sleepy eyes on afk aswell.
![screenshot_2019-07-29_14-47-34](https://user-images.githubusercontent.com/13277346/62049848-624dd680-b210-11e9-82f7-2d20281eb899.png)
Co-authored-by: FallenKN <fallen.kn@gmail.com>
1844: Fix wrong flag color in scoreboard and spectator select menu (custom mods) r=Learath2 a=fokkonaut
Since in DDrace every player is in team red, in order to show them in one scoreboard, the flag will always be blue in scoreboard and the spectator select menu, here is a simple fix
I left kill messages out since they would need a fix which is a bit more complicated, and i didnt want to do too much just to support this. These two would make it already a lot better
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
Co-authored-by: Learath <learath2@gmail.com>
1848: Fix deci seconds not updating in spectator/pause (fixes#1846) r=heinrich5991 a=fokkonaut
Before this was set in `RenderDDRaceEffects()`, but that function is only called if `m_pClient->m_Snap.m_pLocalCharacter` exists, which isn't the case in spectator/pause.
1860: Ignore some more common files r=heinrich5991 a=Ryozuki
compile_commands.json is used a lot for language servers
https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
tags are generated from ctags
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
Co-authored-by: Ryozuki <ryo@ryozuki.xyz>
1821: Add afk marks r=def- a=ardadem
This is final state (and most minimalist to not create mess) of my previous pull request. I didn't reopen it because it's contains changed unnecessary commits.
If someone will become afk, mark will be spawn next to tee's name.
![2019-07-13-13:59:20-screenshot](https://user-images.githubusercontent.com/13207692/61170739-8c4b9b80-a576-11e9-9d87-4c4b2f93941b.png)
Co-authored-by: Arda <ddmirarda@gmail.com>
1830: fix-ClDyncamMinDistance camera spawn r=Learath2 a=FallenKN
I forgot about the dyncam option, #1636.
Co-authored-by: FallenKN <fallen.kn@gmail.com>
1839: Set m_Race. Fix#1806 r=heinrich5991 a=Learath2
@heinrich5991 apparently you forgot to set `CGameInfo::m_Race` 🙂
Co-authored-by: Learath <learath2@gmail.com>
1802: Prediction fixes r=def- a=trml
I believe this fixes#1671 (uninitialized variables).
Some other things: Use new ddnetchar fields in prediction, small fix for prediction of moving pickups, fix the freeze end tick in ddnetcharacter (will add it to the client later)
Also adds a setting for choosing between new/old antiping for grenade like suggested in #1683 (cl_antiping_gunfire 0 to disable).
Co-authored-by: trml <trml@users.noreply.github.com>
1785: Revert "Merge pull request #1736 from sirius1242/master" r=Learath2 a=def-
This reverts commit e8362f1727, reversing
changes made to 0f99605ab1.
Apparently people don't like "Digital Wellbeing"-like features @sirius1242
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
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).
1732: Implement ISDDNET and Time Score cleanly r=def- a=Learath2
This is an attempt at implementing the two things in a cleaner way.
Deprecated #1320
Willfix #1622 soon(tm)
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: Learath2 <learath2@gmail.com>
1742: fix particles, emote wheel, zoom and score for blockworlds r=Learath2 a=kpro998
fixes a few things that got broken for players using ddnet client in blockworlds
Co-authored-by: Kpro998 <kpro998@gmail.com>
Co-authored-by: Learath <learath2@gmail.com>
1714: Make the color output more sane r=def- a=Learath2
1719: Show the correct button when paused r=def- a=Learath2
Fix one bug from #1702
Co-authored-by: Learath2 <learath2@gmail.com>
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>
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>
1620: Rewrite of prediction code, with additional prediction (updated) r=def- a=trml
This is a reworked attempt at a rewrite of the prediction code (#464), to allow for more client side prediction. It doesn't fix the duplication of server code, but the client code should otherwise be cleaner. This includes separating prediction code out of gamecore/gameclient, and a refactor of the rendering of predicted characters.
There is also prediction for some new things, and some other changes:
- prediction of laser, shotgun, ninja, fng hammer, pickups and ddrace tiles (freeze/unfreeze tiles with cl_predict_freeze)
- laser and bullets are rendered when you fire them and bullets don't go through walls (when both cl_antiping_grenade and cl_antiping_weapons are enabled)
- antiping for flags
- prediction of dummy input
- an additional smoothing option that attempts to make antiping less jumpy (cl_antiping_smooth)
Co-authored-by: trml <trml@users.noreply.github.com>
Co-authored-by: trml <trml@noreply.github.com>
1628: Make client know about other solo players, fixes#258 r=heinrich5991 a=Ryozuki
When another player is in solo and you are not, you could notice a weird collision and also the hook moving a little towards the solo player. This as been fixed.
It also applies m_ClShowOthersAlpha to other players whenever you are on solo or others are.
It uses the protocol extension thingy.
fixes#258
Co-authored-by: Ryozuki <ryo@ryozuki.xyz>
Co-authored-by: Learath <learath2@gmail.com>
1598: Fix home/end keys in console r=heinrich5991 a=def-
1601: 2 more tries to force DB to respond in UTF8 (fixes#1599) r=heinrich5991 a=def-
1605: Fix memory leak in draggers r=heinrich5991 a=def-
1606: Always initialize m_InfosLoaded r=heinrich5991 a=def-
otherwise it's uninitialized and then read, found by valgrind --tool=memcheck
1607: Enable a few more GCC warnings r=heinrich5991 a=def-
1609: Fix C90 compatibility on Windows r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
Only show for the same amount of ticks as originally, not number of
seconds, otherwise at high demo speeds you will see the broadcast for a
much longer game play time than originally.
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.
- As requested by qshar and KoG players
- Similar to DDNet tab
- Info fetched from servers-kog entry from https://info.ddnet.tw/info
- Also supports countries and types
- Doesn't inform whether map has been finished
- Generalized the code a bit but it's still ugly
- Depends on #1533, also shows KoG servers as official/verified
1514: Square and center icons before rendering them on button r=Learath2 a=def-
1521: Remove unused norank icon from browse_icons.png r=heinrich5991 a=def-
1522: Reset authed level in client r=Learath2 a=def-
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
1523: Make updating nameban reason work r=def- a=12pm
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
And persist the result. Helps with the workflow described by Shyzo on
Discord:
> I mean after i press ctrl-f or fetch info. then i want to sort by marker (from ... to 0) and just delete every demo without a marker. either in a whole (not possible i think) or just one by one. but I think after deleting one demo the order of demos change again
> so i have to fetch info again, delete one. fetch info again. delete one
> and so on
Old color was rgb = (0.78, 1.0, 0.8)
In hsl = (125°, 100%, 89%)
Converted to hex hsl:
H = 125° / 360° * 255 = 89 = 0x59
S = 100% = 0xFF
since the TW HSL color system fobids too dark colors it uses l = 0.5 + 0.5*L/255
so L = (0.89 - 0.5) * 2*255 = 199 = 0xC7
So in total we get 0x59FFC7 = 5898183
1485: Browser's scoreboard now shows score based on cl_ddrace_scoreboard r=def- a=fokkonaut
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>