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 2021-11-20 00:00:00Z and 2021-11-21 00:00:00Z
Avatar
there's a horrible fucking bug ive gotten twice now where if you confirm a new map save with enter it just exits the game doesnt save
04:04
like type map name, enter, boom closes game
04:05
i think it's incorrectly setting the enter action to exit game
😭 1
04:07
ok it definitely just crashes the game
04:07
it's not a clean exit (edited)
Avatar
do you use the new rc build? I can't reproduce it
Avatar
this is regular steam release, i dont know if this is even version specific
Avatar
and you're on linux? maybe it's OS specific
Avatar
Avatar
lynn
i think it's incorrectly setting the enter action to exit game
are you sure it's not just crashing?
Avatar
Avatar
lynn
ok it definitely just crashes the game
.
Avatar
Avatar
murpi
and you're on linux? maybe it's OS specific
windows
Avatar
lol i only hread so far i guess
Avatar
DDNet editor has so many crashes :(
09:22
Its not fun to map anymore without pressing ctrl s everytime you change something
Avatar
@lynn do you know the exact steps? If you could make a video while reproducing that would help
Avatar
it's pretty ez to describe 1) open editor 2) save 3) enter any map name 4) press enter
09:39
seems like it happens invariably though
09:39
so there's something im missing
09:42

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
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
Avatar
Can't reproduce, but I found another bug at least 😄
09:47
i think the map name i used was "lair" ???
09:47
if it matters even
Avatar
i took sometimes to figure why “moving texture” at a quad is very hard and inhuman to control (found this problem before but not report it because less use) i think this should be fix
Reported by cheeser0613
Avatar
chillerdragon BOT 2021-11-20 11:24:12Z
clang format be like:
11:24
image.png
Avatar
well thats the best u can get it to look i guess
Avatar
I've also been getting crashes when saving maps using save as, really frustrating as you actually lose the map
Avatar
ur abusing short ifs
Avatar
chillerdragon BOT 2021-11-20 11:26:00Z
image.png
11:26
id prefer this
11:26
a: buse
Avatar
try moving the ? to next line
Avatar
chillerdragon BOT 2021-11-20 11:30:58Z
lol now it single lined it :D
11:31
clangformat go brrr
11:31
it even removed \ i add to swallow line breaks :D
11:32
well does not matter its just some debug in a ugly code base anyways just wanted to share clang fromat memes here
Avatar
Can you send me the text?
Avatar
chillerdragon BOT 2021-11-20 11:34:39Z
u curious? :D
Avatar
there is also // clang-format off if you really mind
Avatar
chillerdragon BOT 2021-11-20 11:34:55Z
dbg_msg( "drop", "dropping weapon=%d (%s) dropped=%ld", WeaponID, WeaponID == WEAPON_GUN ? "gun" : WeaponID == WEAPON_SHOTGUN ? "shotgun" : WeaponID == WEAPON_GRENADE ? "grenade" : WeaponID == WEAPON_LASER ? "laser" : WeaponID == WEAPON_NINJA ? "ninja" : WeaponID == WEAPON_HAMMER ? "hammer" : "unknown", m_pPlayer->m_vWeaponLimit[WeaponID].size());i do not mind :D
Avatar
So far I was mostly able to make clang-format and devs happy
Avatar
chillerdragon BOT 2021-11-20 11:35:17Z
well tbh so far i like clang format
11:35
i found my self even skipping code indentation and just running fix_style.py :D
Avatar
i would just make a function with a switch tbh
Avatar
chillerdragon BOT 2021-11-20 11:36:21Z
elvis operator is so pretty \o/
Avatar
ur not even using it
Avatar
chillerdragon BOT 2021-11-20 11:39:03Z
?
Avatar
elvis operator
Avatar
Yeah, at work I implemented something like this for automated enum pretty-printing: https://stackoverflow.com/questions/28828957/enum-to-string-in-modern-c11-c14-c17-and-future-c20
Contrary to all other similar questions, this question is about using the new C++ features. 2008 c Is there a simple way to convert C++ enum to string? 2008 c Easy way to use variables of enum typ...
Avatar
chillerdragon BOT 2021-11-20 11:39:37Z
isnt elvis opertaor ? :
Avatar
it's ternary operator when u do ? cond1 : cond2 (edited)
Avatar
chillerdragon BOT 2021-11-20 11:39:56Z
akak tenary
11:40
thozght its thesame
Avatar
afaik when u do elvis there's nothing between ? and :
Avatar
chillerdragon BOT 2021-11-20 11:40:23Z
ah i see
11:40
oh wow
11:40
oke u right
11:40
wo thats cool
11:40
i should try to use that to flex
11:41
its like what the cool kids use || in the high level langs right?
11:41
var foo = ENV["foo"] : "foo";
11:41
ye thats neat @deen when add to ddnet?
11:43
especially with those enums from the network py scripts its more than a ctrl+click in my setup to get their value -,-
Avatar
not really worth it since we don't print them much
Avatar
chillerdragon BOT 2021-11-20 11:44:01Z
.-.
11:44
i print them all day during debug
Avatar
Add UNICODE and _UNICODE defines on Windows and use either the A or the W variant of the Windows API methods explicitly where it was left unspecified. I supposed this fixes shell_execute for unicode paths (e.g. username with unicode) and fixes debug logger output with unicode. I renamed logger_debugger to logger_win_debugger to make it clear that it's only available on windows. I'm using the A-variant for WSAStringToAddress and FormatMessage because they don't really n...
Avatar
30c65de add UNICODE defines on windows, misc. unicode fixes - Robyt3 82b5f08 Merge #4373 - bors[bot]
Avatar
Fix opening user data folders with unicode username. str_format(aBuf, sizeof(aBuf), "start %s", link); was without effect.

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
  • [ ] Changed no physics that affect existing m...
Avatar
00606d1 fix open_link with unicode on windows - Robyt3 6081b4a Merge #4374 - bors[bot]
Avatar
bd1a2a6 No wasd moving when dialog is open (fixes #4370) - def- c10b925 Merge #4371 - bors[bot]
Avatar
I'll also fix all usages of WideCharToMultiByte and MultiByteToWideChar next, because the wrong buffer size is specified.

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
  • [ ] Changed no physics that affect existing maps
-...
Avatar
robyt the windows fixer
Avatar
the more you work with the WinAPI the more you hate it
16:25
somehow duplicating every function was the best design they could come up with so there is a A and W variant for everything
Avatar
I’m very close to saying fuck it to dracut and making my own initramfs. God forbid redhat makes any software that can work outside of the most cookie cutter situations
Avatar
Are you sure that you want to disconnect and switch to a different server? == Êtes vous sur de vouloir vous déconnecter et changer de serveur? Refreshing... == Actualisation... Show local player's key presses == Montrer les touches appuyées des autres joueurs updated.

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 wor...
Avatar
chillerdragon BOT 2021-11-20 20:01:21Z
baguette
Avatar
i hate clang format
22:54
its set a pretty terrible standard for readable code imo
Avatar
Avatar
chillerdragon
i should try to use that to flex
elvis operator is a GCC extension, it is not in the C++ standard
22:58
but clang supports it too
Exported 88 message(s)