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>