2389: Ignore emoticon of spammy players (fixes#2387) r=heinrich5991 a=def-
Controlled with the regular ignore chat button in players menu
Co-authored-by: def <dennis@felsin9.de>
2388: Get rid of the annoying font size warnings r=heinrich5991 a=def-
Since we're not doing anything about them anyway, and I get them
spamming me on every client start.
Co-authored-by: def <dennis@felsin9.de>
2390: Support cl_show_hook_coll_own/other 2 to always show (fixes#2383) r=heinrich5991 a=def-
hook collision, without broadcasting to other players.
Removed cl_show_hook_coll_always in return
Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency
Co-authored-by: def <dennis@felsin9.de>
hook collision, without broadcasting to other players.
Removed cl_show_hook_coll_always in return
Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency
2009: Fix min mouse position for follow factor r=heinrich5991 a=Jupeyy
@Learath2 you were the last to change this, would be nice if you could check if this is correct behaviour, i didn't find anything wrong :D
Co-authored-by: jupeyy <jupjopjap@gmail.com>
2379: Fix unused translations r=def- a=3edcxzaq1
Fix so that "Connect Dummy" and "Disconnect Dummy" follows language file
Co-authored-by: sven <sven@rx.lan>
Co-authored-by: 3edcxzaq1 <66034590+3edcxzaq1@users.noreply.github.com>
2374: Restore old /save behavior r=def- a=Zwelf
Fixes#2362, supersedes #2367
I didn't change the /save message. There are already two different: "Use '/load %s' on %s to continue" and "Use '/load %s' to continue".
I think it would be better to add a NetMessage, this could also solve the problem of saving which team members were in the team.
> I guess this can't be used to cheat anything?
Only if an instant rehook is necessary. Might be useful for rehooking an edge hook (but you still have to aim).
Co-authored-by: Zwelf <zwelf@strct.cc>
2358: Allow any update.json size r=heinrich5991 a=def-
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.
Update: https://update5.ddnet.tw/update.json is ready, 14.0.1 will still land on update4, then we switch to update5.
Co-authored-by: def <dennis@felsin9.de>
2356: Make game less dependend on score backend r=heinrich5991 a=Zwelf
Behavior change:
* `sv_save_worse_scores` is respected on file based servers
Mainly a clean up after #2247, but helps #2298 too
Co-authored-by: Zwelf <zwelf@strct.cc>
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.
2335: Make it more clear that this is a sixup translation server r=heinrich5991 a=def-
2336: Set skill level for Sixup (fixes#2334) r=heinrich5991 a=def-
2340: Keeping multiple states consistent is hard (fixes#2315) r=heinrich5991 a=def-
let's go recount every time
2342: Don't forget video recorder fps setting r=heinrich5991 a=def-
after switching to non-videorecorder client
2349: Document which MySQL/MariaDB versions we require (fixes#2343) r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
2338: Ensure that team state is always sent (fix#2315) r=def- a=trml
Noticed that team state wasn't sent to the client in some cases (when SetForceCharacterNewTeam is called directly), which I think this could happen if a team is unlocked between killing and respawning a player. Also added a CheckTeamFinished for that case.
Co-authored-by: trml <trml@users.noreply.github.com>
2301: map_convert_07: Check image width for divisibility by 16 r=heinrich5991 a=def-
As noticed on Sunny Land.
> [5:31 PM] redix: in theory it should be enough if width and height are divisible by 16
Now running this over our maps and fixing them manually.
Co-authored-by: def <dennis@felsin9.de>
2326: Disable -Wstringop-overflow warning in IntsToStr r=heinrich5991 a=def-
Since it won't write into invalid memory when Num > 0
Co-authored-by: def <dennis@felsin9.de>
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>
2306: Make ctrl-s/ctrl-l etc work everywhere in editor (fixes#2302) r=heinrich5991 a=def-
instead of just in the layers view
Co-authored-by: def <dennis@felsin9.de>
2321: Use the 0.7 race features better r=def- a=Learath2
Mostly tested, couldn't test the diffs though as I don't have score set up. It looks good to me though.
Co-authored-by: Learath <learath2@gmail.com>
src/game/server/ddracecommands.cpp:743:39: warning: unknown conversion type character ‘l’ in format [-Wformat=]
743 | str_format(aBuf, sizeof(aBuf), "%s-%lld-%s.save", pSelf->Server()->GetMapName(), time_get(), pSelf->Server()->GetAuthName(pResult->m_ClientID));
See https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
2291: Make PlayerResult messages an union variant r=def- a=Zwelf
and some small style and readability fixes in sql_score.
Co-authored-by: Zwelf <zwelf@strct.cc>
2290: Restore old message behavior when using /load and /save r=def- a=Zwelf
Only notify the player initiating /load about the error and don't send
'Loading initiated by ...' and 'Saving initiated by ...' messages resulting
in two messages per /load and /save.
Not sure if the old behavior is better or if we want to keep the new with sending two messages per /save and /load.
Co-authored-by: Zwelf <zwelf@strct.cc>
Only notify the player initiating /load about the error and don't send
'Loading initiated by ...' and 'Saving initiated by ...' messages resulting
in two messages per /load and /save.
2245: Stop playing map sound when demo player is paused r=heinrich5991 a=def-
Noticed on Shooting Range map
2266: Reset hook & collision in prediction after kill r=heinrich5991 a=def-
Thanks to Pipou for reporting
Co-authored-by: def <dennis@felsin9.de>
2276: Fix segmentation fault when creating sql tables failed r=heinrich5991 a=Zwelf
`GameServer()->OnShutdown(true);` (which would wait on running threads to exit)
wasn't called if an error occured in the server init. Therefore `CServer` was
freed before the init-thread finished executing, causing a use after free from
`CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`.
Fixes#2271
Note that the server exits when creating tables failed. Since the tables are created by default, it has to be disabled explicitly (e.g. `add_sqlserver r teeworlds record teeworlds PASSWORD "localhost" 3306 0`) if the servers should start even when the database connection fails.
Co-authored-by: Zwelf <zwelf@strct.cc>
`GameServer()->OnShutdown(true);` (which would wait on running threads to exit)
wasn't called if an error occured in the server init. Therefore `CServer` was
freed before the init-thread finished executing, causing a use after free from
`CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`.
2247: Thread safe SQL interaction r=def- a=Zwelf
This PR intends to make the database interaction thread safe and optimizes some SQL queries. This is still a WIP, but since it is a rather big PR I wanted to get feedback early on.
Benefits:
* remove race conditions leading to undefined behavior and potential crashes
* logging game related database results in teehistorian would be possible
Behavior change:
* /top5team prints ranks in reverse order when passing a negative number (like /top5, /top5points)
* Optimize SQL statements for /rank /teamrank /top5 /top5team /points /top5points
* /load without parameters doesn't pass the SQL error to the user (as most other functions)
* Simplify IScore interface
* Add UUID to /save table (update of database schema necessary):
```
ALTER TABLE record_saves ADD SaveID varchar(64);
```
* /save immediately kills team and loads it again if the database insert fails.
still TBD:
* [x] saving (team) score when finishing
* [x] loading team save
* [x] loading initial time and birthday check
* [x] /map and random map votes
* [x] RFC: generate a passphrase (2-3 word) if save-code exists or no save-code is given making /save failures much more rare and save-codes more secure
* [x] clean up code (removing now unused structs, ordering of functions in IScore)
Co-authored-by: Zwelf <zwelf@strct.cc>
2270: Consider time_freq() r=def- a=Learath2
The timer ticks way faster on macOS leading to some insane pings :D
Co-authored-by: Learath <learath2@gmail.com>
2243: Workaround for client crash on predicted explosion r=def- a=trml
I haven't been able to find the exact source of the problem yet, but at least this seems to get rid of the segfault. The crash only happened with with recent versions of gcc and -O3 for me.
Co-authored-by: trml <trml@users.noreply.github.com>
2231: Don't clamp values that have no reasonable values r=Learath2 a=def-
Still affects many values in editor, for example colors in tiles and quads.
Thanks to Pipou for report.
Co-authored-by: def <dennis@felsin9.de>
2226: Fix image/sound selection in editor r=heinrich5991 a=def-
Follow-up to https://github.com/ddnet/ddnet/pull/2186 by @BannZay
Thanks to Cøke for notifying me
Co-authored-by: def <dennis@felsin9.de>
2202: Send DDNet version early in the connection process r=Learath2 a=heinrich5991
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.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2212: Use a consistent PRNG on all platforms r=Learath2 a=heinrich5991
I just used glibc's because that is what we use on all the servers. Based on https://www.mscs.dal.ca/~selinger/random/.
Behavior change: The PRNG is actually seeded now.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
As discussed on Discord today, can be enabled inside of teams on the fly
during each run on any server. Finishes don't count. I haven't tested
save/load yet, would do that live on the server if this can be merged.
The following member variables:
* m_name to m_aName
* m_String to m_aString
* m_CpCurrent to m_aCpCurrent
* m_Switchers to m_pSwitchers
* SavedTees to m_pSavedTees
This came from a long discussion comparing PCG-* against xoroshiro*. Do
not generate integers without bias because it doesn't affect us very
much and it is easier to reimplement with modulo.
2208: Implement /load without params to show some info r=Learath2 a=def-
about your existing saves. Not the code of course, but only how many saves you have and when you last saved on this map.
Co-authored-by: def <dennis@felsin9.de>
src/game/editor/auto_map.h:47:9: warning: ‘*((void*)& NewConf +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
I don't think it's an actual problem
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.
2191: write automapper version, was not initialized r=heinrich5991 a=Patiga
write automapper version, was not initialized
Co-authored-by: patiga <patigatus21@gmail.com>
2180: Don't count freshly loaded map as modified (fixes#2178) r=Learath2 a=def-
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
Co-authored-by: def <dennis@felsin9.de>
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
2161: Small prediction fixes/update r=def- a=trml
I looked through the latest changes in the server code, and made some updates to the prediction with it. This includes the hammer-out-of-freeze server fix and a small fix for stopper prediction. Also cleaned up some code, and fixed predicted smoke-trails slightly so they don't go through walls in certain cases.
Co-authored-by: trml <trml@users.noreply.github.com>
2164: Fix empty sound (fixes#2163) r=heinrich5991 a=def-
The problem was that the string is empty after going through the trim, thus the main displaying loop doesn't run, but the sound still does. Verified that it works.
Co-authored-by: def <dennis@felsin9.de>
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.
2119: Change last render logic, when inactive r=def- a=Jupeyy
Just a small fix to let the client not try to get high fps, when it "thinks" it didn't render for a long time.
(is still affected by the SDL check "if window has input" at the cl_refresh_rate calculation, so not a 100% fix).
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2104: Add spectate_closest now works when in Free-View r=def- a=d3fault
sry for the general refactor along with it xD
Co-authored-by: d3fault <d3fault@d3fault.net>
2103: Add spectate_closest r=def- a=d3fault
Spectates the tee closest to the one you are currently spectating.
This commit brought to you by COVID-19 lockdown boredom.
Fix#1793
Co-authored-by: d3fault <d3fault@d3fault.net>
2096: Fix the double-free of the antibot r=def- a=heinrich5991
I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2078: Fix cl_showrecord with dummy (fixes#2077) r=heinrich5991 a=def-
Shows best time of either dummy or main player depending on which is selected
Co-authored-by: def <dennis@felsin9.de>
I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.
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>
2070: Fix demo recording with broken maps r=heinrich5991 a=Learath2
Apparently there are maps out there with broken headers advertising the wrong map size. This allows demos to be recorded on those.
Example of such a map is `ctf4_old_d668e9fa_2f472051b26b6bffaa4af8990cf882cafd6364e00e1333b77762cb9911e49464.map`
Hosted on `Allround Network`
Reported by teini94 on discord
Co-authored-by: Learath <learath2@gmail.com>
2071: Add an option to only start a new demo when connect while automatically record demos r=def- a=sirius1242
Origin auto demo recording of ddnet will generate lots of demo files especially when playing in mods which have shorter rounds, such as infclass. I added a new option to open a new demo file only when connect to server (include map changing), this is disabled by default, and can use `cl_auto_demo_on_connect 1` to open. It works only when `cl_auto_demo_record` open.
Co-authored-by: sirius <sirius.ustc@gmail.com>
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.
./src/game/client/components/maplayers.h:15:9: error: 'uintptr_t' does not name a type; did you mean 'uint64_t'?
15 | typedef uintptr_t offset_ptr;
| ^~~~~~~~~
| uint64_t
../src/game/client/components/maplayers.h:61:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
61 | offset_ptr IndexBufferByteOffset()
| ^~~~~~~~~~
| offset_ptr32
In file included from ../src/game/client/components/background.cpp:8:
../src/game/client/components/maplayers.h:105:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
105 | offset_ptr m_IndexBufferByteOffset;
| ^~~~~~~~~~
| offset_ptr32
../src/game/client/components/maplayers.h: In constructor 'CMapLayers::SQuadLayerVisuals::SQuadVisual::SQuadVisual()':
../src/game/client/components/maplayers.h:103:20: error: class 'CMapLayers::SQuadLayerVisuals::SQuadVisual' does not have any field named 'm_IndexBufferByteOffset'
103 | SQuadVisual() : m_IndexBufferByteOffset(0) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
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>
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>
2048: Display envelope name in popups r=12pm a=Learath2
A dropdown would've worked better, but we don't have one
Co-authored-by: Learath <learath2@gmail.com>
2026: Only start showing emoticons after their start tick has passed (fixes#2025) r=Learath2 a=def-
Since we can go back in time in demo player
Co-authored-by: def <dennis@felsin9.de>
src/game/server/score/file_score.cpp: In member function ‘CFileScore::CPlayerScore* CFileScore::SearchName(const char*, int*, bool)’:
src/game/server/score/file_score.cpp:169:9: error: ‘strcmp’ was not declared in this scope
169 | if (!strcmp(r.front().m_aName, pName))
| ^~~~~~
src/game/server/score/file_score.cpp:12:1: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
11 | #include <engine/shared/console.h>
+++ |+#include <cstring>
12 |¬
1981: Fix: background colors being set to white r=def- a=Aerll
After changing either of background colors in ddnet tab in settings and reopening the client, both become white.
Co-authored-by: Aerll <31746984+aerll@users.noreply.github.com>
Saves should not be loadable from one to the other.
Requires:
ALTER TABLE record_race ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER GameID;
ALTER TABLE record_teamrace ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER GameID;
ALTER TABLE record_saves ADD COLUMN DDNet7 BOOL DEFAULT FALSE AFTER Server;
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>
1976: Write out sql server prefix to failed_sql.sql r=Learath2 a=def-
also don't write out non-eligible records.
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>
1973: Rename rifle to laser r=def- a=ChillerDragon
This makes it easier to copy code from/to 0.7
23df3c609e
For the user only the rcon command to give/remove ``laser``/``unlaser`` changes.
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
as reported by valgrind --tool=memcheck:
==376722== Conditional jump or move depends on uninitialised value(s)
==376722== at 0x1CDBDB: int maximum<int>(int, int) (math.h:79)
==376722== by 0x216A46: CPlayer::Tick() (player.cpp:174)
==376722== by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722== by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722== by 0x1CB099: main (server.cpp:3040)
==376722==
==376722== Conditional jump or move depends on uninitialised value(s)
==376722== at 0x183F27: int minimum<int>(int, int) (math.h:77)
==376722== by 0x216A65: CPlayer::Tick() (player.cpp:175)
==376722== by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722== by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722== by 0x1CB099: main (server.cpp:3040)
1949: Add cl_dummy_resetonswitch 2 r=Learath2 a=d3fault
Idea by @ChillerDragon :
Only resets the active tee. So if you hold right and switch your
dummy keeps walking. But if you switch back you don't have
to press right twice to walk again.
Fix#1854
Co-authored-by: d3fault <d3fault@d3fault.net>
1946: Don't locally render your own dummy's afk emote. Other players will still see it r=Learath2 a=d3fault
Afk emote on your own dummy is pointless and annoying, esp on dummy maps.
Co-authored-by: d3fault <d3fault@d3fault.net>
Idea by ChillerDragon:
Only resets the active tee. So if you hold right and switch your
dummy keeps walking. But if you switch back you don't have
to press right twice to walk again.
Fix#1854
1948: Fix objc_msgSend() xcode11 error r=def- a=ChillerDragon
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);
```
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
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);
```
as Mac build complains:
src/game/server/entities/character.cpp:1681:18: error: ordered comparison between pointer and zero ('const float *' and 'int')
if(m_Core.m_Vel > 0 && (m_MoveRestrictions&CANTMOVE_DOWN))
~~~~~~~~~~~~ ^ ~
1941: Fix IntersectCharacter r=def- a=12pm
This makes hitting yourself when shooting through other tees work
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
1922: Allow to hammer directly on unfreeze r=def- a=heinrich5991
Previously, this was only doable with frame-perfect input if you were
going to get frozen again the next tick. Now, you only have to hold your
hammer to immediately hammer once you get unfrozen.
This fixes that "deepfly" (flying with deep-frozen dummy, binding both
main and dummy tee hammers onto the same key) does not only work for
good connection.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
1938: Explode grenades twice at the end if they have lifespans. Fix#1559 r=heinrich5991 a=Learath2
Just by looking at the code I think this is what was intended but only testing can make sure.
Co-authored-by: Learath <learath2@gmail.com>
1935: Add a limit to GetNearestAirPos. Fix#1931 r=def- a=Learath2
There isn't really any sane behaviour here, so I just avoided the infinite loop.
You shouldn't be in the wall to begin with :P
1936: Mark players as afk initially. Fix#1797 r=def- a=Learath2
The whole afktimer code is quite ugly. I might rework it at a later date.
For now this looks like an acceptable fix.
1940: Update ddnet-libs version r=Learath2 a=def-
Was forgotten in the libcurl linux removal I think?
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
1923: Properly force spawn order of teams. Fix#1828 r=Learath2 a=d3fault
Mimic old behavior of having a respawn tick > 0 ticks after current tick. 2 ticks later is still "instant enough".
The code below the change mentions strong spawning, so without deciphering it we simply give 2 extra ticks to make sure that it executes before spawning (2 instead of 1 so that it definitely executes for both primary and dummy).
Co-authored-by: d3fault <d3fault@d3fault.net>
1925: Don't bundle libcurl for Linux r=Learath2 a=heinrich5991
It's installed basically everywhere and just increases release size.
They're serious about backward compatibility and haven't had a breaking
change in ages.
1929: Remove space at end of cfg description r=Learath2 a=ChillerDragon
Happy hacktoberfest :octocat:
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
Mimic old behavior of having a respawn tick > 0 ticks after current tick.
2 ticks later is still "instant enough".
The code below the change mentions strong spawning,
so without deciphering it we simply give 2 extra ticks to make sure that
it executes before spawning (2 instead of 1 so that it definitely
executes for both primary and dummy).
This broke respawn rate limiting and didn't even fix#1828.
When primary tee hits kill tiles, dummy still gets strong hook.
This reverts commit 02f5723321.
- 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
Previously, this was only doable with frame-perfect input if you were
going to get frozen again the next tick. Now, you only have to hold your
hammer to immediately hammer once you get unfrozen.
This fixes that "deepfly" (flying with deep-frozen dummy, binding both
main and dummy tee hammers onto the same key) does not only work for
good connection.
Remove the whole copy-and-paste mess.
A seemingly ineffective and apparently code block has been removed.
The broken front layer from the first try has been fixed.
1904: Add tune zone prediction r=heinrich5991 a=trml
Is enabled with cl_predict_ddrace 1.
This will predict tunings loaded from the map the first time tunezones are entered, but will also update the tunes after you receive new tunes while in a tunezone, since it's possible to change them in rcon.
Co-authored-by: trml <trml@users.noreply.github.com>
1878: Add paused and spec to explayerflags r=Learath2 a=Ryozuki
I think client should know about this, maybe we can do something with it in the future.
It also may help with https://github.com/ddnet/ddnet/issues/259 but i didn't figure out yet a way to fix it.
1903: Consistent spacing for getters and setters r=Learath2 a=ChillerDragon
Co-authored-by: Ryozuki <ryo@ryozuki.xyz>
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
1909: Fix filescore path r=Learath2 a=ChillerDragon
The filescore system did not handle map paths well that were an actual path and not just the mapname.
```
# before fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:29:44][filescore]: opening 'records/DDNetPP-maps-BlmapChill_record.dtb' for reading failed
# after fix
$ ./DDNet-Server 'sv_map "DDNetPP-maps/BlmapChill"'
[...]
[2019-09-15 13:31:05][filescore]: opening 'records/BlmapChill_record.dtb' for reading failed
```
I called ```Server()->``` in a thread so please review thread safety before merge.
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
1889: Dont reset variables twice r=def- a=fokkonaut
These variables get reset in Reset() aswell, no need to do it here
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
1883: Fix crashbug on set_team_ddr -1 r=Learath2 a=fokkonaut
Teams over 63 are also forbidden, so I check for that too.
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
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>
I talked to coffee (creator of both mods) and he said it is okay to use zoom on the mods, also: eye emotes work there so the eye wheel is also supported. I have updated both mods to ddnet master so they have all the new stuff
1845: Fix infectionZ gamemode seen as DDNet r=heinrich5991 a=fokkonaut
InfectionZ's gametype is somehow infection, instead of infectionZ
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
1837: Don't advertise the reserved slots. Fix#1808 r=heinrich5991 a=Learath2
I think this is also fine for vanilla, but I can't get the vanilla client to work on mac to test it.
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: Emir Marincic <learath2@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>
1838: Force spawn order of teams. Fix#1828 r=heinrich5991 a=Learath2
This has an unfortunate(?) consequence of causing tees that hit kill tiles and fall out of map respawn instantly. If this is undesirable the fix would be a little more complex, maybe implementing a delay to the spawn in `CPlayer` or reordering the entity list to force strong on the tee (by swapping with one of their teammates (this might have some undesirable effects aswell, not sure though)).
Co-authored-by: Learath <learath2@gmail.com>
1827: Fix small issue r=def- a=Learath2
This fixed
`objc[52886]: Class SDLApplication is implemented in both /Users/learath2/Desktop/C/ddnet/ddnet-libs/sdl/mac/lib64/SDL2.framework/Versions/A/SDL2 (0x10c8ac680) and /Users/learath2/Desktop/C/ddnet/build/./DDNet (0x10c46c090). One of the two will be used. Which one is undefined.`
Not sure if this was an issue for anyone, but at least it doesn't break anything.
Co-authored-by: Learath <learath2@gmail.com>
1803: Fix double pause due to spec r=def- a=fokkonaut
If a player is in /spec (sv_pausable 1 required) and would then use /pause, the tee would respawn, but the player would still be in /pause instead of playing again.
With this, the player will resume completely
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
1823: Fix 'several players were found' on /rank r=heinrich5991 a=fokkonaut
If no player was found, it should say 'x is not ranked', instead it says 'Several players were found', that is because if the result is -1, it will say that. With the default result being -2, it can no longer say that, instead it will say that the player is not ranked.
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.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).
1775: Fix prediction of non-grabbed hook r=def- a=trml
Fix#1766.
Turns out the bug was not just in the rendering, but in the prediction itself (hooks were not predicted unless/until they grabbed on to something). I compared with an older client (and the old implementation) and this seems like it will restore the old behavior.
Co-authored-by: trml <trml@users.noreply.github.com>
1774: Remove the unused Skinstealaction r=heinrich5991 a=fokkonaut
As far as I know it was never in use and the only punishment is to force pinky skin, which doesnt really seem useful. Skin stealing is a very harmless kind of 'bots', which doesnt need punishment imo
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
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>
1697: Don't check dnsbl when alone r=def- a=Learath2
Should help relieve some of the issues reported on discord.
Co-authored-by: Learath <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>
1675: Remove unused vanilla code (closed#1658) r=def- a=ChillerDragon
Removed vanilla code from gamecontext and gamecontroller. I didn't search for the code all over the place I just remember seing it there a lot. Also removed some empty lines. Wanted to do this for a long time :)
thought there is an reason it is there. But we have git and the vanilla repo so I don't see any point keeping it there.
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
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>
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>
1655: Add delete projectiles on death settings r=def- a=12pm
Need this for a map fix and doesn't hurt to have for grenades too I guess. Defaults are still the same
Co-authored-by: 12pm <30786226+12pm@users.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>