00:00 <+bridge> [ddnet] 1st april will be a ddnet commit with some goto 00:01 <+bridge> [ddnet] https://www.kernel.org/doc/html/v4.10/process/coding-style.html#centralized-exiting-of-functions 00:12 <+bridge> [ddnet] > unconditional statements are easier to understand and follow 00:12 <+bridge> [ddnet] > nesting is reduced 00:12 <+bridge> [ddnet] > errors by not updating individual exit points when making modifications are prevented 00:12 <+bridge> [ddnet] > saves the compiler work to optimize redundant code away πŸ˜‰ 00:12 <+bridge> [ddnet] mostly solved by RAII IIUIC 00:13 <+bridge> [ddnet] It's obviously all wrong. The only correct way to write software is as is ordained by his highness Donald E Knuth first of his name 00:14 <+bridge> [ddnet] I don't get the reference 00:15 <+bridge> [ddnet] idk what that is but looking at google this is C++ related no? 00:15 <+bridge> [ddnet] No reference, a little sarcastic way to point out the appeal to authority most people rely on to hate on goto 00:16 <+bridge> [ddnet] basically that you have destructors ^^ 00:16 <+bridge> [ddnet] https://en.wikipedia.org/wiki/RAII 00:16 <+bridge> [ddnet] wikipedia is a good resource πŸ˜‰ 00:16 <+bridge> [ddnet] goto makes you italian 00:19 <+bridge> [ddnet] Well then for my kernelspace programs written in C not rly 00:20 <+bridge> [ddnet] true 00:20 <+bridge> [ddnet] you can write them in rust soonβ„’ 00:28 <+bridge> [ddnet] Fck im 2 drunk 00:28 <+bridge> [ddnet] But makes sense 00:29 <+bridge> [ddnet] dronk 08:41 <+bridge> [ddnet] Wat you kill your good rust brain cells 09:52 <+bridge> [ddnet] It’s sober October! Be strong! 10:16 <+bridge> [ddnet] xd 13:48 <+bridge> [ddnet] hey quick question: this freezetime bar under your tee is this only client side or is there something else except of m_FreezeTime in character? 13:48 <+bridge> [ddnet] The problem i got is i just want to identify a player who is 100% and not just freeze on the platform... 13:48 <+bridge> [ddnet] my way is not that cool right now because i just check if the vel is 0 and freezetime is over 100 13:48 <+bridge> [ddnet] the problem is the tee can be sitting freezed on the platform and the m_FreezeTime is just between 150-100 but is still "safe" 13:50 <+bridge> [ddnet] i can just put the tilehandler in it... 13:50 <+bridge> [ddnet] if vel is 0 and m_FreezeTime is between 150-100 and he is right now over a TILE_FREEZE then its true 14:17 <+ChillerDragon> wotefek ``man format`` features %b and it works as expected but I get a compiler warning: ``warning: invalid conversion specifier 'b' [clang-diagnostic-format-invalid-specifier]`` 14:17 <+ChillerDragon> for this line ``printf("%b\n", 255);`` what am i missing? 14:41 <+bridge> [ddnet] std=c++17 maybe? 14:44 <+ChillerDragon> ah ye thats an idea 14:45 <+ChillerDragon> indeed ``--std=c++17`` removed the warning. Weird that it compiles and works either way :D 15:11 <+bridge> [ddnet] in e.g. c++11, this does not exist and thus you get the warning 15:11 <+bridge> [ddnet] there's no separate printf for c++17 in the standard library though, so you get the same printf, which supports %b 15:12 <+bridge> [ddnet] (I think GNU libc always supported %b, even before it was standardized) 15:45 <+ChillerDragon> I see 16:08 <+ChillerDragon> wot is a AltSnap and why is it used here over ``m_pSnap`` ? https://github.com/ddnet/ddnet/blob/9e4da2244af63f491039b9ce104f8df7ab8dc4df/src/engine/client/client.cpp#L1012 16:10 <+ChillerDragon> gameclient chillin in alternative reality UwU 16:18 <+ChillerDragon> yo @cod3d3v what happend here? https://github.com/ChillerDragon/ddnet/commit/59436b5e6dec43286d85e7948949f86182c7280f#diff-88229ff11d1f6f39e6ba486ab4a7257d675fd7e91026b8fad8e731a54ac70c77L495 16:25 <+ChillerDragon> in vanilla snap and altsnap seem more similar they have the same data somehow my ddnet altsnap ended up in a bad state while the normal snap is just fine ._. 16:34 <+ChillerDragon> Ah okay I see the altsnap is validated harder using ``UnpackAndValidateSnapshot`` while the snap is not. And that bends me over when trying to read 0.7 snaps. 18:50 <+ChillerDragon> I think the server can crash the client by not sending gameinfo in the snap but some active chracters https://github.com/ddnet/ddnet/blob/9e4da2244af63f491039b9ce104f8df7ab8dc4df/src/game/client/gameclient.cpp#L2445 20:37 <+bridge> [ddnet] Just for experimentation: How can I add more sounds into the game while having it still be detectable? Currently I'm doing a small test for UI sounds for the fun of it (I won't release it as a PR), but the two test sounds I added in aren't being detected/played when they're called. The Enum is generated, but the actual files aren't brought in, despite being in the right place and name. 20:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1030912296567963799/unknown.png 20:37 <+bridge> [ddnet] Just for experimentation: How can I add more sounds into the game while having it still be detectable? Currently I'm doing a small test for UI sounds for the fun of it (I won't release it as a PR), but the two test sounds I added in aren't being detected/played when they're called. The Enum is generated, but the actual files aren't brought in, despite being in the right place and name. 20:37 <+bridge> [ddnet] 20:37 <+bridge> [ddnet] I added the respective files into CMakeList as well, but no luck. 20:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1030912296567963799/unknown.png 20:45 <+bridge> [ddnet] https://github.com/Jupeyy/ddnet/tree/client_quake 20:45 <+bridge> [ddnet] 20:45 <+bridge> [ddnet] i added custom sound here 20:45 <+bridge> [ddnet] maybe u can copy some stuff 20:47 <+bridge> [ddnet] did add them over the python stuff tho 21:02 <+bridge> [ddnet] oo 21:07 <+bridge> [ddnet] this looks a bit repetitive tbh LOL 21:07 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1030919829152088124/unknown.png 21:25 <+bridge> [ddnet] @Voxel 21:25 <+bridge> [ddnet] ```c++ 21:25 <+bridge> [ddnet] auto &&GetTrackNamePre = [](int Kills) -> const char * { 21:25 <+bridge> [ddnet] if(Kills >= 5) 21:25 <+bridge> [ddnet] return "is on a "; 21:25 <+bridge> [ddnet] else if(Kills >= 10) 21:25 <+bridge> [ddnet] return "has a "; 21:25 <+bridge> [ddnet] else if(Kills >= 15) 21:25 <+bridge> [ddnet] return "is "; 21:25 <+bridge> [ddnet] 21:25 <+bridge> [ddnet] return ""; 21:25 <+bridge> [ddnet] }; 21:25 <+bridge> [ddnet] ``` 21:25 <+bridge> [ddnet] is this good? 21:26 <+bridge> [ddnet] i think so 21:27 <+bridge> [ddnet] up to juppey if they wanna change it to that however 21:27 <+bridge> [ddnet] Maybe they planned to change other values 21:28 <+bridge> [ddnet] i mean it's based off of quake's killing spree thing so i doubt it 21:51 <+bridge> [ddnet] this will always go into the first if 21:51 <+bridge> [ddnet] so no 21:51 <+bridge> [ddnet] ah yeah i reversed the order 21:51 <+bridge> [ddnet] dumbass 21:52 <+bridge> [ddnet] But yeah you can remove the unnecessary if statements 21:52 <+bridge> [ddnet] its fine, its easier to change it and more clear what modes there are, we planned to have it different, but then again didnt do it πŸ˜„ 21:52 <+bridge> [ddnet] 21:52 <+bridge> [ddnet] also in theory multilang πŸ˜‰ 21:53 <+bridge> [ddnet] Ohh 21:53 <+bridge> [ddnet] makes sens 21:53 <+bridge> [ddnet] makes sense 22:15 <+bridge> [ddnet] when you cannot use switch case function 22:15 <+bridge> [ddnet] :trollge: 22:23 <+bridge> [ddnet] Isn't switch just as repetitive though 22:31 <+bridge> [ddnet] I don't know how to debug a `fish: './DDNet-Server' terminated by signal SIGBUS`: https://gist.github.com/Zwelf/4f3bfacce7badd1da35b55902101e6d9 Any ideas? 22:33 <+bridge> [ddnet] To trigger nearly everyone here. Rust is bad, it's not the future, Python is better and faster and Rust is not as safe as C / C++. 22:48 <+bridge> [ddnet] This isn't 22:48 <+bridge> [ddnet] Jupeyy already told me i fucked up 22:49 <+bridge> [ddnet] ah 22:49 <+bridge> [ddnet] I'm such a bad developer, good thing I'm not developing anything important πŸ‘€ 23:03 <+bridge> [ddnet] Found out what it was: I was passing the wrong class as thread data and therefore interpreting it as the wrong class. 23:45 <+bridge> [ddnet] I also guessed wrong pointer