Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2022-05-06 00:00:00Z and 2022-05-07 00:00:00Z
Avatar
Is there a particular reason for keeping the behavior that, when turning on cl_dummy_control, holding down cl_dummy_hammer and then only on the release causes the dummy to repeat the fire command, as well as jump and hook if they are turned on with cl_dummy_jump/cl_dummy_hook or held down through other methods?
03:17
is this behavior necessary exactly?
03:20
03:20
it causes behaviors like that.
03:21
I just want to know other's opinion on it. perhaps we can start a petition to get it changed or not, as it can be used as a tech. It's just everything that this tech achieves can also be achieved if it is "fixed" regardless
03:23
And the tech actually doesnt even use cl_dummy_control, so nevermind.
03:24
I'd be ok if on release, jump, hook or fire are activated (if they are turned "on"), but if they ARENT, such as in the case of fire, it shouldn't happen in my opinion.
03:24
therefore the only thing it would change is what is shown in the video
Avatar
sorry for the spam but, to be perfectly clear, the only change I would want is that on release of cl_dummy_hammer, the dummy will then hammer where he is looking (assuming he CAN hammer, after the usual delay of course), which he does EVERY TIME no matter what. I don't think this behavior is necessary.
03:33
if it is changed to act like cl_dummy_hammer WITHOUT cl_dummy_control turned on, in my opinion that would be perfect. But that is not the case currently.
03:37
The ONLY way to combat it is if you activate cl_dummy_hammer and release the key in less than 120 ms, which is very hard.
Avatar
thats brazy
Avatar
Was it really intended that we don't hold input when chat is closed now?\
Avatar
Avatar
Learath2
Was it really intended that we don't hold input when chat is closed now?\
i remember when i opened a pr for that deen said its unwanted
Avatar
if you ever wanted to make ur own language but the lexer stuff is bothersome
09:49
is awesome xd
09:49
09:49
09:49
poggers
09:49
ryolang incoming
09:49
totally not inspired by rust
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
why no argument type in function definition? rust requires it right?
10:25
like why does rust require it and your language doesn't
Avatar
because thats complex
10:37
i never did aa language before
10:37
im just testing stuff xd
10:37
i just want to get to the part where i generate llvm ir
Avatar
ah ok i thought it was gonna be a feature of the language xd
Avatar
Avatar
baby frog
Is there a particular reason for keeping the behavior that, when turning on cl_dummy_control, holding down cl_dummy_hammer and then only on the release causes the dummy to repeat the fire command, as well as jump and hook if they are turned on with cl_dummy_jump/cl_dummy_hook or held down through other methods?
you are speaking about cl_dummy_hammer overwrites cl_dummy_control? right?
10:54
I just tested it, for me the dummy just makes normal hammerfly xD what else do you have set
Avatar
Hey, so i wanted to change the source code, so that when you hook a hook-able tile, the hook gets automatically released like when you hook a player. What i did is in gamecore.ccp, i copied the like that seems to be responsible for the player release mechanic and removed everything where it says player. This seams to work, but sadly cos its in gamecore.ccp i have to use the compiled client as well, or i get some strange prediction bugs. Now my question is.. is there a way, to do that with vanilla client compatibility? Like for example the ddrace mod has endless hook, where it also changes the hook behaviour and still works with vanilla tw.. so there should be a way, some how
Avatar
you could also just make a block that is only hookable for a short time that you can specify with the delay parameter in the switch layer
12:00
you just have to make it so that it is diffrent from the normal mechanic so that it does not get misspredicted
Avatar
what i meant was this: when turning on dummy control, and hollding diwn the dummy hammer button, the tee automatically hammers you
12:02
at a fixed rate designed for hammerfly. you get that?
Avatar
ok. and you get the delay for hammer is 120 ms
12:02
but the delay for holding it down is like 459 or something idk
12:02
cuz its hammering for hammerfly not as fast as it can
Avatar
Avatar
BakedTrash
Hey, so i wanted to change the source code, so that when you hook a hook-able tile, the hook gets automatically released like when you hook a player. What i did is in gamecore.ccp, i copied the like that seems to be responsible for the player release mechanic and removed everything where it says player. This seams to work, but sadly cos its in gamecore.ccp i have to use the compiled client as well, or i get some strange prediction bugs. Now my question is.. is there a way, to do that with vanilla client compatibility? Like for example the ddrace mod has endless hook, where it also changes the hook behaviour and still works with vanilla tw.. so there should be a way, some how
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/gamecore.cpp at 9dc2141ded307f013402e7d84c66bc793b45cc6c · C0D3D3V/ddnet
Avatar
Avatar
baby frog
but the delay for holding it down is like 459 or something idk
what do you mean by holding it down?
12:04
what is your bind?
Avatar
bind x +toggle cl_dummy_hammer 1 0
12:04
holdig x down makes the tee hammer you every 800 ms basically so ethinglike that
Avatar
xD why would you hold it down
Avatar
im just saying
Avatar
lol if I hold it down it hammers instant
Avatar
anyway. if the tee misses you, the cooldownis 120 ms. if you@hold the button down, yes its instant, then wait 120 ms, then release, the dummy will then hame,r AGAIN where he is looking
12:06
not at you, but where he is looking.
12:06
test it and see that i am correct
Avatar
xD you would have to bind it to left and right and fire to even use it for something serious wouldn't you?
Avatar
what
Avatar
if I hold my hammerfly bind I can not use it to fly because as soon as I press A D or click it will stop instant hammer
12:11
12:11
just bind x +toggle cl_dummy_hammer 1 0
12:12
every time you press x he hammers in your direction
12:12
what do you mean you cant move?
Avatar
you see in the video as soon as I press some other key while holding "x" it stopps spamming in the chat the bind
Avatar
ok but you have it bound wrong. just bind a random key to the command i sent
12:13
then hold kt down, tne dummy should hammer every 800 ms or whatever
12:14
u dont need cfgs for this
Avatar
if I do it with your bind it hammers just normal every 0.5sec so every 25 tick
Avatar
right ok. now turn on dummy control, and tap the key
12:17
do you see that he does a double hammer?
Avatar
so what is happening there, is that you tap it, he hammers, and then while you still have the button down, 120 ms passes by, you release, and the act of releasing the key makes him hammer again, not at you but where he is looking
12:19
this is what i want changed
12:19
just remove that
Avatar
Avatar
c0d3d3v
you could also just make a block that is only hookable for a short time that you can specify with the delay parameter in the switch layer
ah well that makes sense xd, aight gonna try to impliment that.. tho i am only what you would call a "script kiddy" xd as i basically just started to learn about modifying the source code.. but ya hope thats managable 😅 thank u anyway tho :)
Avatar
Avatar
baby frog
just remove that
just tested it in DDNet-12.5 because I was sure it was not always like this... And I'm right. Its a bug that got introduced at one point
Avatar
ok. its a very annoying bug. could you make the move to remove it? i would greatly appreciate it.
Avatar
Avatar
BakedTrash
ah well that makes sense xd, aight gonna try to impliment that.. tho i am only what you would call a "script kiddy" xd as i basically just started to learn about modifying the source code.. but ya hope thats managable 😅 thank u anyway tho :)
Won't make your prediction issue any easier though
Avatar
Avatar
Learath2
Won't make your prediction issue any easier though
Sure xD but we could add the block to ddnet if we like the idea
Avatar
Avatar
BakedTrash
ah well that makes sense xd, aight gonna try to impliment that.. tho i am only what you would call a "script kiddy" xd as i basically just started to learn about modifying the source code.. but ya hope thats managable 😅 thank u anyway tho :)
endles hook is no problem for vanilla because it does not predict the release I think
Avatar
I did take a look and I couldn't figure out any magic to fix the prediction, sorry
Avatar
what is the point of a block on that the hook only lasts a certain time? if you aim in the same direction you hook instant again? Do not understand what is wrong predicted. if the server says that your hook is retracted then the client should accept that without wrong prediction. Can you make a video? (edited)
Avatar
[quakenet] xq BOT 2022-05-06 12:35:09Z
Hey! There seems to be a few teamrecords which lack a teammate, as shown here: https://dpaste.org/KfoRv - It seems to happen to mostly asian players, such as 毅然, [D]sadrain and yewon. Unsure what the reason is, but I'm guessing their teamates rank got manually deleted for whatever reason?
Dpaste is a website where you can store text online for a set period of time. Dpaste is written in Python using the Django framework.
Avatar
Avatar
c0d3d3v
what is the point of a block on that the hook only lasts a certain time? if you aim in the same direction you hook instant again? Do not understand what is wrong predicted. if the server says that your hook is retracted then the client should accept that without wrong prediction. Can you make a video? (edited)
I want to modify the TeeSmash mod a bit, as i really like the gameplay, but most maps are made so that you cant hook any ground, because you could just hook the floor and prevent from getting hammerd off the map, so that change would be first step to make more engaging maps with more movement. https://youtu.be/va-DFrPs2-k here u see what happens when i don't use the compiled client (this is with ddnet) thing is also, that the prediction bug only occurs in some situations. also if i change "HOOK_RETRACT" to "HOOK_IDLE" It also works like should, but it fires a new hook right after it has been released.
Avatar
i am going to report my bug to #bugs
Avatar
what if you turn cl_predict off?
Avatar
Avatar
baby frog
i am going to report my bug to #bugs
would be better if you just open a issue so it does not get lost
Avatar
Avatar
BakedTrash
I want to modify the TeeSmash mod a bit, as i really like the gameplay, but most maps are made so that you cant hook any ground, because you could just hook the floor and prevent from getting hammerd off the map, so that change would be first step to make more engaging maps with more movement. https://youtu.be/va-DFrPs2-k here u see what happens when i don't use the compiled client (this is with ddnet) thing is also, that the prediction bug only occurs in some situations. also if i change "HOOK_RETRACT" to "HOOK_IDLE" It also works like should, but it fires a new hook right after it has been released.
this looks more than a little prediction xD normally the prediction should not be that far off the real data (edited)
Avatar
Avatar
c0d3d3v
what if you turn cl_predict off?
does the same, but the game jitters xd
Avatar
Avatar
c0d3d3v
this looks more than a little prediction xD normally the prediction should not be that far off the real data (edited)
ya idk.. also like i said its really strange that it works with "HOOK_IDLE" .. or almost works atleast xd
Avatar
Do any of you use sub-pixel rendering on Linux? Any idea why the lcdfilter would change font spacing?
Avatar
Hi, I am new to dummy playing, I don't know a lot about bindings, especially about sophisticated bindings. However this is a binding I use: ` # on bind mouse1 "+fire; +toggle cl_dummy_copy_moves 1 0" # off bind mouse1 +fire This makes the dummy copy my moves when I fire. And keeps them afterwards. Like this:

"firecopy" gif

!firecopy_walk demo It can be useful for throwi...
Avatar
for a moment i read that name as cockstown
14:15
xd
Avatar
@c0d3d3v i downloaded 12.5 and went to a server and the issue still perists. does it not work on servers? howd you test it
Avatar
Avatar
Learath2
Do any of you use sub-pixel rendering on Linux? Any idea why the lcdfilter would change font spacing?
i dunno about that filter directly, but too "high" hinting can cause spacing between characters
Avatar
I thought the hinting might be an issue aswell, but when I force "hintslight" on both the subpixel rendered version and the non-subpixel rendered version I get very different spacings still :/
Avatar
Avatar
[quakenet] xq
Hey! There seems to be a few teamrecords which lack a teammate, as shown here: https://dpaste.org/KfoRv - It seems to happen to mostly asian players, such as 毅然, [D]sadrain and yewon. Unsure what the reason is, but I'm guessing their teamates rank got manually deleted for whatever reason?
xq: nice find, the ones between 2021-05-01 and 2021-08-01 are likely my fault, i'll fix that as soon as possible, not sure about the other ones though
Avatar
Avatar
Learath2
Do any of you use sub-pixel rendering on Linux? Any idea why the lcdfilter would change font spacing?
because you have hinting enabled?
15:15
I wish I could get Linux font rendering on macOS, so much less blurry. Don't want to buy a 5k screen just because macOS has bad font rendering and only supports 2x resolutions well
Avatar
Avatar
deen
because you have hinting enabled?
I've tried forcing hinting. There is a clear spacing difference between xft:DejaVu Sans Mono:pixelsize=14:hintstyle=hintnone:rgba=rgb:lcdfilter=lcddefault and xft:DejaVu Sans Mono:pixelsize=14:hintstyle=hintnone
15:52
Even more damning the spacing is different between lcddefault, lcdlight and lcdlegacy
15:56
Seems only lcddefault messes up the spacing
Avatar
Mh, my discord is very laggy aswell, I seem to have messed something up but can't figure out what
Avatar
I definitely seem to have fucked something up while setting this pc up, firefox and chrome both work much better in windows somehow
Avatar
well how much can go wrong xd just do some benchmarks and see what the bottleneck is
Avatar
u compiled it in debug mode
18:09
troll
Avatar
I also updated the version to 15.0.0. However, confusables are still from version 14 as https://www.unicode.org/Public/security/15.0.0/ is empty. CC @heinrich5991

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Ch...
Avatar
how to link an issue in a pr title?
18:34
oh, i see the typo now, how the fuck does a typo can appear in a copy paste?
18:38
ehm, how do you add a .c file that is not compiled to cmake?
Avatar
Avatar
Chairn
oh, i see the typo now, how the fuck does a typo can appear in a copy paste?
github is really annoying, when i link an issue it sometimes makes suggestions and pressing enter makes it use another issue then
Avatar
any idea on my second problem 😄 ?
Avatar
Avatar
Chairn
ehm, how do you add a .c file that is not compiled to cmake?
i dont understand xd
18:41
if u dont want to compile it, name it .txt
Avatar
when i add the files confusables_data.c, it tries to compile them as standalone
18:41
nah, it's still c files, but i dont want to name it .h, it would be confusing
Avatar
so u want to include it?
Avatar
it's an ugly workaround anyway
Avatar
i'd just use a .h i guess
Avatar
i don't know why the scripts themselves don't write on the file directly
Avatar
ok cant help u, bcs i dont really understand ur problem xD
Avatar
https://www.youtube.com/watch?v=8--5LwHRhjk @Jupstar ✪ bro wtf?? how can they fcking do that just with maths
Avatar
everything is math
19:59
but yeah, insane guy probs working on disney tools or smth xd
Avatar
Avatar
ReiTW
https://www.youtube.com/watch?v=8--5LwHRhjk @Jupstar ✪ bro wtf?? how can they fcking do that just with maths
oh i LOVE shadertoy
Avatar
Avatar
Jupstar ✪
but yeah, insane guy probs working on disney tools or smth xd
ex pixar guy
Avatar
Avatar
Learath2
ex pixar guy
i c, completly overpowered that guy ^^
Avatar
can u guys add a pause camera move feature with arrow keys?
Avatar
Hi folks, what would you think about little more use of C++ for convenience and maybe less copy-paste mistakes? Now when we converted system to C++, and even require [0] C++17 [1] to build. [0] https://github.com/ddnet/ddnet/commit/843acf6a5a80ef445ff134c90bee374212673464 [1] https://en.cppreference.com/w/cpp/iterator/size
21:45
For example, we can add a str_copy version which 'll get the destination size automatically. diff --git src/base/system.h src/base/system.h index af617d7ad..133345376 100644 --- src/base/system.h +++ src/base/system.h @@ -2423,6 +2423,13 @@ void set_exception_handler_log_file(const char *log_file_path); #if defined(__cplusplus) } + +template <int N> +int str_copy(char (&dst)[N], const char *src) +{ + str_copy(dst, src, N); +} + #endif #endif We have 477 uses of str_copy, mostly stuff like str_copy(m_Password, pPassword, sizeof(m_Password));, but sometimes even use hardcoded values: https://github.com/ddnet/ddnet/blob/e14fc102a6f5f4492ab1eb26504642181c6aa933/src/game/client/gameclient.cpp#L1196 If we don't want to replace all cases (I think there are at least 300 uses like str_copy(a, b, sizeof(a))) then we can at least add such functions and use them in new code. And str_copy is not the only case, there are also str_append(char *dst, const char *src, int dst_size), str_truncate, str_hex(char *dst, int dst_size, ...), str_hex_decode(void *dst, int dst_size, ...), All those manual and error-prone dst_size can be set automatically. (edited)
Avatar
@Kaffeine how does that work? The compiler tracks the size of the buffer?
Avatar
why not use std::array<char, N>
21:53
if we gotta be modern lets by all the way
21:53
be*
Avatar
Avatar
deen
@Kaffeine how does that work? The compiler tracks the size of the buffer?
We can declare template functions which works with array of N characters, where N is figured out by compiler from the variable type; at compile time.
Avatar
Avatar
deen
@Kaffeine how does that work? The compiler tracks the size of the buffer?
The compiler just know the type of passed variable. In char aNameTry[MAX_NAME_LENGTH]; str_copy(aNameTry, aTrimmedName, sizeof(aNameTry)); the type of aNameTry is char[16]. Our new str_copy() can accept char[N] as the first argument and know the N at compile time. So we can replace it with str_copy(aNameTry, aTrimmedName);, which 'll compile only if it is safe. (edited)
Avatar
Does it still track it when char *pBuf = aNameTry; and then use pBuf?
21:59
I guess not, so we'll definitely still need the old way too
22:00
But yeah, making it safer is still a good idea
Avatar
Avatar
deen
Does it still track it when char *pBuf = aNameTry; and then use pBuf?
No, it does not track anything. It is a (very cheap) way to get compile-time information which is lost during char aVar[N] to char *pVar conversion. So we'll still have to use the current functions (in about 10% of cases, as I see). (edited)
Avatar
Avatar
Ryozuki
why not use std::array<char, N>
My suggestion is: add five lines, remove an extra argument in 300+ places (probably 400 of 477). Start with str_copy(), repeat where it makes sense. What is the benefit of replacing C arrays with std::array<char, N>? I'm sure there are (e.g. we'll be able to use std::array::size() instead of std::size), but probably it won't be that lightweight change.
Avatar
Avatar
deen
But yeah, making it safer is still a good idea
I'll prepare a PR then (not really soon).
Avatar
It has friendly value semantics, so that it can be passed to or returned from functions by value. Its interface makes it more convenient to find the size, and use with STL-style iterator-based algorithms.
22:15
Unlike a C-style array, it doesn't decay to T* automatically. As an aggregate type, it can be initialized with aggregate-initialization given at most N initializers that are convertible to T: std::array<int, 3> a = {1,2,3};.
Avatar
I've read it at https://en.cppreference.com/w/cpp/container/array too. But what's the practice side of that?
Avatar
i believe modern c++ should have no c like arrays
Avatar
E.g. we have char aNameTry[MAX_NAME_LENGTH]; str_copy(aNameTry, aTrimmedName, sizeof(aNameTry)); We'll replace it with std::array<char, MAX_NAME_LENGTH> aNameTry;. Now what? str_copy won't be more convenient (or we'll need another template for that).
Avatar
well its already wrong to not use std::string for strings in modern c++
Avatar
Take a note that we can't just do aNameTry = aTrimmedName;, because they can have diff size and we do str_utf8_fix_truncation on the result.
Avatar
Avatar
Ryozuki
i believe modern c++ should have no c like arrays
Why not? C++ arrays are ugly asf to begin with
Avatar
Avatar
Ryozuki
well its already wrong to not use std::string for strings in modern c++
Allocated on heap? Yeah, thanks. 😄
Avatar
Avatar
Learath2
Why not? C++ arrays are ugly asf to begin with
c and c++ are ugly asf to begin with
Avatar
C is sooo pretty ❤️
Avatar
Cherry-pick changes from upstream (https://github.com/teeworlds/teeworlds/pull/3116). Replace remaining usages of string from base/tl/string.h with std::string.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ]...
Avatar
ah true
22:20
std::strings suck
22:20
if it were rust i would use smallstr for stack allocated strings
22:21
but pulling in libs on c++ sucks
22:21
xd
Avatar
Another base/tl component gone \o/
Avatar
base/tl/threading.h also looks unused
Avatar
tl/array is the most annoying to do :/
22:25
I had it mostly done, but the sorted arrays we have get a bit annoying to handle
Avatar
any cmake pro here?
22:33
how do i add a file into our cmake with extension .c without it being compiled?
Avatar
Avatar
Chairn
how do i add a file into our cmake with extension .c without it being compiled?
EXCLUDE_FROM_ALL won't help?
Avatar
how do i use it?
Avatar
oof is that normal tohave 30fps with vulkan on 1920x1080
Avatar
Another option: add_custom_target(my-extra-c-files SOURCES my-file.c )
Avatar
bc5f46e Add CHeap::StoreString method - Robyt3 e2a049f Mark methods as const - Robyt3 3e1cfcd Store localized strings in a CHeap instead of using tl/string.h - Robyt3 dee7393 Remove unused includes of base/tl/string.h - Robyt3 a1d092b Replace remaining usage of base/tl/string with std::string - Robyt3 2256209 Remove base/tl/string.h - Robyt3 490704b Merge #5073 - bors[bot]
Avatar
nvm my screen was buggy
Avatar
Avatar
Chairn
how do i use it?
You can either add a regular target with EXCLUDE_FROM_ALL option: add_executable(my-extra-c-files EXCLUDE_FROM_ALL my-file.c) or use the custom target (which is excluded from ALL by default, and can be included using ALL argument). I would suggest to try the custom target first, and then maybe add a fake executable or library (excluded from ALL) if this won't work for some reason. (edited)
Avatar
what does the exclude_from_all do?
22:40
i'd like to add a file to the BASE variable, but the file gets compiled on its own
22:40
i just want it to be added to the list of files that cmake tracks
Avatar
When you press Build button in IDE, or do cmake --build ., the default CMake target is ALL. EXCLUDE_FROM_ALL means that the (sub)target won't be a part of the default build. IOW it will be build only if something else depends on this target, or if you manually ask CMake to build it (e.g. cmake --build . --target my-extra-c-files).
Avatar
but it is a dependency of all the executables (i think)
Avatar
Avatar
Kaffeine
When you press Build button in IDE, or do cmake --build ., the default CMake target is ALL. EXCLUDE_FROM_ALL means that the (sub)target won't be a part of the default build. IOW it will be build only if something else depends on this target, or if you manually ask CMake to build it (e.g. cmake --build . --target my-extra-c-files).
i dont use IDE, just command line
22:42
im talking ddnet's cmakelist files btw
Avatar
Okay, so you want to add a file to a target (BASE is the list of source files for target engine-shared) and yet you want to exclude that file from the target. I don't think this is possible in the intended way. You can remove the file from BASE later on, but then it'll also disappear e.g. from target source files in IDEs.
22:46
Why do you want this? You want to suppress the warning? But the warning is here exactly to not let you do what you're trying to do.
Avatar
Avatar
Kaffeine
Why do you want this? You want to suppress the warning? But the warning is here exactly to not let you do what you're trying to do.
then — this
Avatar
i guess the easiest way would just be to have it in .h extension
Avatar
Avatar
Kaffeine
Why do you want this? You want to suppress the warning? But the warning is here exactly to not let you do what you're trying to do.
tbf, i don't understand the purpose of this warning
22:48
i'll go with renaming the file to .h
Avatar
Why have a file which we don't use?
Avatar
it is used
22:55
it must be included in another file uniquely
22:56
btw, im sure there's a file that is not used anywhere, i still have to find it
22:56
anyway, i updated my pr
22:56
i still don't get how to link to the issue properly
22:56
i tried full url and just #5017, but it doesn't link to it
Avatar
Should probably be tested in CI. scripts/generate_unicode_confusables_data.py scripts/generate_unicode_tolower.py CC @Chairn CC #4854
Avatar
You can mark your .c (or .cpp, or any other type) file as a header file which can/should be included by other files but should not be compiled on its own. https://cmake.org/cmake/help/latest/prop_sf/HEADER_FILE_ONLY.html (edited)
Avatar
lol, now it complains about hearder guard, but the file never had any...
Avatar
https://cmake.org/cmake/help/latest/command/set_source_files_properties.html set_source_files_properties(src/base/confusables_data.c PROPERTIES HEADER_FILE_ONLY ON)
23:01
I think this requires CMake much newer than the current minimum 2.8.12. I also think that it makes sense to bump CMake version e.g. to 3.8 because it is the first version with declared C++17 support (and we need this support because we use std::size). (edited)
Avatar
Avatar
Chairn
it must be included in another file uniquely
Something to include and not compile standalone should have a .h file ending imo
Avatar
Avatar
Kaffeine
https://cmake.org/cmake/help/latest/command/set_source_files_properties.html set_source_files_properties(src/base/confusables_data.c PROPERTIES HEADER_FILE_ONLY ON)
Okay, I just checked, this is a valid code for CMake 3.0.
Avatar
Avatar
deen
Something to include and not compile standalone should have a .h file ending imo
i changed it finally
23:05
is there a ninja target to run the clang-tidy thing from github?
23:05
i thought everything would mean everything
Avatar
Avatar
Chairn
is there a ninja target to run the clang-tidy thing from github?
https://github.com/ddnet/ddnet/blob/master/.github/workflows/clang-tidy.yml#L28-L29 cmake -G Ninja -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_C_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. .. cmake --build . --config Debug --target everything -- -k 0 (edited)
Avatar
you can also add a -fix there, it c an fix some things automatically, but then you have to compile with -j 1
Avatar
Avatar
Chairn
i thought everything would mean everything
It means everything, but for clang-tidy we have to setup CMake configuration differently.
23:09
(inconsistent spacing in EXCEPTIONS = [) (edited)
Avatar
Avatar
Kaffeine
https://github.com/ddnet/ddnet/blob/master/.github/workflows/clang-tidy.yml#L28-L29 cmake -G Ninja -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_C_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. .. cmake --build . --config Debug --target everything -- -k 0 (edited)
sorry, i meant the check-style, but i guess i could also run the clang-tidyoneas well 😉
Avatar
scripts/fix_style.py
Avatar
check-style has more than fix_style
23:13
each commit i discover new things 😄
23:14
i had the check_header_guards, now the pylint
Avatar
@heinrich5991 what's the purpose of this file CMakeFiles/DDNet.dir/src/game/generated/checksum.cpp.o ?
Exported 213 message(s)