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 2023-03-27 00:00:00Z and 2023-03-28 00:00:00Z
Avatar
@Voxel what are you currently trying?
00:31
you could make a "team killed" message that shows the whole team in the kill feed
00:33
I'm just basing the logic from teams.cpp, in CGameTeams::OnCharacterDeath()
00:33
line 1056: if(GetTeamState(Team) != TEAMSTATE_OPEN)
Avatar
Avatar
heinrich5991
you could make a "team killed" message that shows the whole team in the kill feed
Wait, make a netmsg for that? I kind of did that already
Avatar
but why do you need the team state then?
00:36
if the server sends "whole team was killed" then the whole team was killed
Avatar
And how do we determine that?
Avatar
that the whole team was killed?
00:38
that happens in server code
00:39
Exactly
Avatar
you're asking me how the server determines whether the whole team is killed?
Avatar
Not really, I'm asking how it knows when to kill off the entire team when someone dies, or just that person
00:40
Which is why I was wondering about teamstates
Avatar
the server already does that
00:41
so you could go into the code and add the "the whole team was killed" message into the server code there
00:42
(and find a way to suppress the other individual kill messages)
Avatar
But how do I fluently communicate that to the client-sided code, which you said can't be linked with server sided code? (edited)
Avatar
no client side code was involved in my description so far
00:44
my client side code would be 'if I get the "the whole team is killed" message, then display that the whole team was killed' (edited)
Avatar
Did you see my update to #6437 yet
Avatar
For those who still have the killfeed on, I wanted to modernize it, by having team kills become one line instead of a bunch! This is still in progress, because there are some technicality issues I...
Avatar
I'm just clang formatting it right now
Avatar
I think that's a bit complicated right now
00:56
you're using two messages to transport information about one kill
00:56
NETMSGTYPE_SV_KILLMSG → one tee was killed
00:56
NETMSGTYPE_SV_KILLTEAM → a whole team was killed
00:57
no need to reimplement team state logic in the client this way
00:57
if a team is killed, only send one NETMSG_SV_KILLTEAM message
00:57
no NETMSG_SV_KILLMSG
00:57
if someone from a team dies without killing their entire team, only send a NETMSG_SV_KILLMSG
00:58
then the client code will be very easy
01:16
i'll try and refactor all of this tommorow
01:18
Does this mean I have to m_aKillmsgs[m_KillmsgCurrent] = Kill; for both messages in killmessage.cpp?
Avatar
yes
Avatar
I'll refactor everything tommorow, but in its current state it produces the exact output I want it to
Avatar
cool! 🙂
01:30
I really like the idea, but I think I said that already
Avatar
Thanks! (edited)
02:10
Actually, I can split it right now, it shouldn't be too hard.
Avatar
@heinrich5991 Okay, I submitted another PR. Hopefully I understood you right.
03:04
I'll be squashing it with the other one when I know it's perfect.
Avatar
now you're sending one NETMSG_SV_KILLTEAM per team member,I think
03:56
instead of just one for the whole team
03:56
if I understand the code correctly
Avatar
Avatar
heinrich5991
now you're sending one NETMSG_SV_KILLTEAM per team member,I think
void CCharacter::Die(int Killer, int Weapon, bool Single) has a new bool (Single) for if it's only going to be one tee dying By default it's true, but if it's false the killmessage packet doesn't even send (edited)
Avatar
ah, I see 🙂
04:14
yea, the logic looks good now, then
Avatar
@Voxel Change Parameter Single to "Teamkill" or "SendKillMsg"
06:27
and send or not send the kill msg according to that
06:27
And pass it from where the team kills each character.
06:27
And send a team kill msg before then
Avatar
f15d975 Update brazilian_portuguese.txt - rffontenelle 15e83dd Merge #6473 - bors[bot]
Avatar
When dragging a layer up, the wrong layer is selected after. Should be merged before #6467.

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 (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [x] Changed no physics that affect existing maps
  • [ ] Tested the c...
Avatar
927c801 update selected layer correctly after dragging - Marmare314 b31d28d Merge #6474 - bors[bot]
Avatar
is github down
12:27
haha
12:27
Avatar
@deen HEH???
12:59
@Ryozuki wtf this is so unexpected
12:59
LMAO
12:59
you can create a Con folder without error
12:59
wtf
13:00
needless to say what version is this lol
Avatar
we hacked windows
Avatar
why do u ping everyone
Avatar
you coded it didn't you kek
13:11
Does windows break if you have a Con folder?
Avatar
tf are u talking about
13:13
xd
Avatar
as you can see u broke your setup. a con directory now exists and u have to reinstall windows
Avatar
no disrespect but sometimes i dont understand you xD
Avatar
i correct myself, windows is now broken for you forever. please install linux to continue
👍 1
Avatar
Avatar
fokkonaut
And pass it from where the team kills each character.
wait, don't i already do that? im confused i just woke up
Avatar
ryo, i was joking (edited)
13:23
and about the Con folder, I was genuine xd
Avatar
Avatar
Voxel
wait, don't i already do that? im confused i just woke up
didnt Check
Avatar
Avatar
Jupstar ✪
i correct myself, windows is now broken for you forever. please install linux to continue
greenthing
Avatar
isn't it more than Con?
13:23
some random hash id (edited)
13:24
in curled brackets
Avatar
Con was DOS times I think used for the I/O of hardware
13:24
shouldn't be like that anymore
13:25
but maybe I am clueless
Avatar
i managed to get a git push through
13:25
Avatar
Avatar
default
Con was DOS times I think used for the I/O of hardware
con still can't be a file name on modern windows
Avatar
a file name
13:34
but in this case it was a folder
Avatar
Avatar
Cellegen
and about the Con folder, I was genuine xd
ah, my bad, i didnt know Con name was special or meaningful
13:40
so to me i was, wtf is this guy saying lol
13:40
xD
Avatar
Windows doesn't allow you to do that, so it was like dark magic for me xd
Avatar
@Chairn what do you think about https://github.com/chipsalliance/chisel
Chisel: A Modern Hardware Design Language. Contribute to chipsalliance/chisel development by creating an account on GitHub.
13:46
Chisel/FIRRTL Hardware Compiler Framework
Avatar
Avatar
Cellegen
@deen HEH???
Doesn't work for me on Windows 10. Are you using Windows 11? Maybe it was changed there.
13:49
Same issue xd
13:50
eh, you mean the folder creating part? maybe it's changed on windows 11
13:50
but windows 11 doesn't allow you still
Avatar
Maybe it's not allowed when you use Windows Explorer to create the folder but it works with the Windows API now, so they game can create the folder
Avatar
so all i need to do is to rename Single to KillMsg and then that's it? Idk what i'm supposed to be moving where @fokkonaut
Avatar
Avatar
default
but in this case it was a folder
I'm pretty sure folder names aren't different in that respect
Avatar
Avatar
heinrich5991
I'm pretty sure folder names aren't different in that respect
yeah, I can't create a "con" or "Con" folder in the game on Windows 10
13:54
Must be a change in Windows 11 or a different option in Windows to allow some of the previously forbidden names
Avatar
either that, or im just that talented
Avatar
you can create a con folder
13:56
with \\?\C:\path\to\con
13:56
but you need the other syntax which ddnet doesn't use
Avatar
Yeah, but we never use long paths internally
13:57
This also allows going beyond the normal maximum path length
Avatar
yup
13:57
the normal maximum path length is super weird in windows ^^
Avatar
Avatar
default
but in this case it was a folder
u can't do a folder too
Avatar
but wasnt there an option to change that
13:59
maybe its active in win11
13:59
aswell as the con stuff
Avatar
Avatar
Robyt3
Must be a change in Windows 11 or a different option in Windows to allow some of the previously forbidden names
w11 doesn't allow
Avatar
Avatar
ReiTW
w11 doesn't allow
Also ingame? Maybe Windows Explorer is different
Avatar
ah ingame didn't try (not home) (edited)
Avatar
you can try in python as well @ReiTW
14:00
if you have that on your work computer
Avatar
Avatar
heinrich5991
you can try in python as well @ReiTW
well as simple with os.makedirs("Con"), it doesn't work (edited)
14:10
oh lol fullpath works, but con only doesn't
Avatar
Avatar
Ryozuki
@Chairn what do you think about https://github.com/chipsalliance/chisel
looks way too verbose. I already knew it existed, but never really delved into it. Functionnal paradigm to describe circuit can be interesting, but not sure if it is the best (though still better than VHDL or Verilog i guess)
Avatar
isnt verbose kinda good sometimes tho
14:38
depends on what kind of verbosity i guess
14:38
i like rust verbosity but not java one
Avatar
Verbosity in a language is imo fine as long as you have tools to abstract it away
14:42
Though I'm not a HDL user, so idk if my opinion applies to those aswell
Avatar
it also depends on your goals. sometimes making a language to explicit can make prototyping harder
Avatar
HDL languages, especially VHDL are really verbose, yet they don't say anything about how the language is interpreted
14:44
it's up to the compiler to guess what you meant, it's not really standardized
14:45
SPICE also had this, what is it with you hardware people and your aversion to standards?
Avatar
hardware people are driven by industry de facto...
14:47
you can't really do open hardware like you can do software open source
14:47
now, it's starting to be more open
14:47
but all the tools are proprietary ones
Avatar
@Chairn have u used such languages in RL?
Avatar
VHDL for teaching in Europe and some projects, SystemVerilog for my PhD
Avatar
nice
Avatar
right now, im preparing research and teaching projects to apply for Associate Professor position in France, and i have 71h10 mins left...
Avatar
this community just epic
14:51
we have everything
Avatar
Avatar
Chairn
right now, im preparing research and teaching projects to apply for Associate Professor position in France, and i have 71h10 mins left...
Ask chatgpt for help
Avatar
and i wrote less than 3 pages (but these 3 pages are common to all positions)
Avatar
Avatar
Learath2
Ask chatgpt for help
Never, we are thinking of banning it in my current school
Avatar
with ryo now even a compiler guy
Avatar
we already caught some students with it
Avatar
Avatar
Chairn
Never, we are thinking of banning it in my current school
In all seriousness. I agree. It has no place in academia
Avatar
Avatar
Chairn
we already caught some students with it
as long as the information is checked and correct it sounds like a useful tool to use
14:52
why ban it?
Avatar
I don't care if you use it at your job and fuck over your boss, but if you want to learn/teach, it really does nothing but harm
Avatar
Avatar
Jupstar ✪
as long as the information is checked and correct it sounds like a useful tool to use
because they don't check the information...
14:53
for the same reason Wikipedia was said to be a bad tool when it appeared and students used it
Avatar
i also did my english homework with google translate xD
Avatar
they just copy paste, no critical thinking at all
Avatar
yeah
14:53
but students simply are like that. for math its useless anyway
Avatar
you can ask simple questions to students on what they "wrote", they will try to bullshit some stuff
Avatar
Avatar
Jupstar ✪
i also did my english homework with google translate xD
I think this is just a disservice to yourself. Unless you are far beyond the curriculum and you truly have nothing to learn
Avatar
and for english its better than most teachers ez
Avatar
Avatar
Learath2
I think this is just a disservice to yourself. Unless you are far beyond the curriculum and you truly have nothing to learn
well it saved my sleep
14:54
i'd call it a success
Avatar
Well is it not more of a time management issue? I'm sure you could have made some time for an english homework especially if it's below your level
14:55
There should be no need to sacrifice your sleep 😛
Avatar
nah was not possible for me
14:56
bcs i had friends and hobbies
Avatar
Avatar
Chairn
for the same reason Wikipedia was said to be a bad tool when it appeared and students used it
all tools can be used wrongly
14:56
wikipedia is amazing, and good pages have references to the sources
14:56
so u also read sources
14:57
students are a bit idiot and dont actually read the references xd
Avatar
Avatar
Jupstar ✪
bcs i had friends and hobbies
I find it hard to believe you didn't have 30 minutes for an english homework in an entire week 😄
Avatar
yeah i agree, but chatGPT pushes things a little bit too far and too fast imo
14:58
we'll need time to adapt
Avatar
But anyway, you do you. If it was below your level there wasnt anything for you to learn, so not much harm
Avatar
15 years, everyone will be using it 😉
Avatar
thats too long timespan
14:58
maybe yes back in 2010
14:58
but now things move faster
Avatar
you can't accelerate social acceptation
Avatar
i think u can
Avatar
Avatar
Learath2
I find it hard to believe you didn't have 30 minutes for an english homework in an entire week 😄
why in an entire week? we got homework every day
14:59
and school until 16 o'clock
Avatar
Avatar
Jupstar ✪
why in an entire week? we got homework every day
You got homework for every subject every day?
Avatar
Avatar
Learath2
You got homework for every subject every day?
pretty much yes
Avatar
We usually had one homework per subject per week
Avatar
well seems like its different in ger
Avatar
universe broken
Avatar
Avatar
Learath2
You got homework for every subject every day?
kinda ye
Avatar
Huh, so you had every subject every day? How long was school even?
Avatar
not but we got homework for each subject we got each day
Avatar
i had most subjects 3 days in a 5 day week
Avatar
usually just 1 day in between
15:01
but all kids prefer to play games duh
15:01
so u do it last day rushed
Avatar
Avatar
Jupstar ✪
i had most subjects 3 days in a 5 day week
Okay that sounds about right. And every time you got homework?
Avatar
Avatar
Learath2
Okay that sounds about right. And every time you got homework?
especially in the earlier classes i'd say yes
Avatar
Huh, we usually got a homework only on the last occurance of a subject within a week and we'd be expected to finish it until the next week first occurance
15:03
So that gave about 5, 6 days to do it
15:04
Different countries do handle it different apparently, no idea why I was surprised 😄
Avatar
Avatar
Jupstar ✪
and school until 16 o'clock
yeah this sucks xd, had this up from fifth grade to tenth
Avatar
I think 8 to 16 school is pretty universal except nordic countries
Avatar
u have to be taught early that u a slave
Avatar
they allowed us to prepare to exams this year
15:06
so no homework at all
Avatar
It took me so long but I finally understand why they give homework. It's really where you learn things
Avatar
not if u hate them
15:07
and thats the whole problem
15:08
if u like stuff u open to learn it
Avatar
nah, homework is just method of controlling your learning curve
Avatar
The problem is that kids mostly don't give 3 shits about learning anything 😄
Avatar
i am too hipster for our school form
Avatar
im still learning but it became easier this year
Avatar
👋 gotta go take my train to go back to Paris, see you guys
Avatar
the only good skill i took from my math homework is vieta theorem
Avatar
Avatar
Chairn
👋 gotta go take my train to go back to Paris, see you guys
хорошего пути!
Avatar
Until university honestly if you are smart-ish you can get away with not practicing at all. But when you get to uni and have no practice habit you finally understand why they were trying to get you to build a homework habit
Avatar
Avatar
Learath2
Until university honestly if you are smart-ish you can get away with not practicing at all. But when you get to uni and have no practice habit you finally understand why they were trying to get you to build a homework habit
i think this depends on university
15:10
and teachers
Avatar
Avatar
gerdoe
i think this depends on university
If you are planning to do anything numerical, unless you are a genius you'll need practice
Avatar
ah yep xd
15:12
friends told me about useless subjects related to IT
15:12
not math
15:13
math is always good and addictive
Avatar
Programming especially benefits from practice imo. The more you code the better you get
15:14
That's why I think chatgpt and copying from stackoverflow is not okay for students
Avatar
Yo, why is the random skin button only cycles through the vanilla skins?
Avatar
Also why I think C is a good language to get students started on
Avatar
c is just good language
Avatar
0ce70f8 add proof mode for menu backgrounds closes #3009 - Marmare314 9537656 use array again and consider checkpoints - Marmare314 8e2869e add tooltips - Marmare314 0cbc725 fix formatting and include array - Marmare314 7f0c052 fix formatting - Marmare314 93d204f show duplicate positions in tooltip - Marmare314 a27dbb1 Merge #6435 - bors[bot]
Avatar
Avatar
Cellegen
Yo, why is the random skin button only cycles through the vanilla skins?
Hm, I guess only because it's coded that way and no one thought about it
Avatar
It the cycling done through an Array of sort?
Avatar
Avatar
Learath2
Also why I think C is a good language to get students started on
the only thing c missing is ecosystem
15:16
thats why rust is better i think
15:16
but borrow checker uh
Avatar
Yeah cargo is godsent
15:17
I don't think rust is a good language to teach beginners. Only because borrow checker is such an alien concept and I would want to stop them from using collections but that'd be extremely unidiomatic rust
15:17
Why teach them bad crippled rust?
Avatar
rust and c exclusive and thats it
Avatar
C is so small that it doesn't take long to understand the basics
Avatar
If I was creating a software engineering curriculum I think I'd teach C and follow it up with C++ for teaching about OOP. I'd like to teach rust too but honestly 3 languages in a 3/4 year degree sounds annoying to me
Avatar
no no no pls don't use cpp for teaching
Avatar
Avatar
gerdoe
no no no pls don't use cpp for teaching
YEP
15:21
why not
Avatar
Avatar
gerdoe
no no no pls don't use cpp for teaching
I have to show OOP and I'd rather not go with Java
Avatar
cpp hides many things from programmer
Avatar
Avatar
Learath2
I have to show OOP and I'd rather not go with Java
c#?
15:22
same problem thouhj
15:22
though
Avatar
Avatar
gerdoe
cpp hides many things from programmer
This is what the C is for
15:26
I have some good ideas on how to produce a good software engineer. They should gimme a university
Avatar
i'd probably teach c++98
15:27
and assembler
Avatar
To introduce OOP? I had a similar idea in mind though I was thinking C++03
Avatar
and then combine both
Avatar
Since when is University for producing software engineers? Computer science has little to do with learning how to program, I'm afraid.
Avatar
Avatar
Learath2
To introduce OOP? I had a similar idea in mind though I was thinking C++03
yes and i think the best u can do is how OOP is "implemented" in assembly then
15:28
getting a feeling for vtables, memory layout etc
Avatar
Avatar
Robyt3
Since when is University for producing software engineers? Computer science has little to do with learning how to program, I'm afraid.
I said a software engineering curriculum. I didn't say a CS curriculum
Avatar
imagine ddnet written in pure assembly (edited)
Avatar
what even is pure assembly?
15:29
hardware binary code?
15:29
that can be displayed as e.g. x86 assembly
Avatar
Avatar
Voxel
imagine ddnet written in pure assembly (edited)
Avatar
The extreme focus in theory is why the industry is plagued by people that are "programmers"
15:32
Mfw can't code without internet access pepeW
Avatar
Avatar
Voxel
imagine ddnet written in pure assembly (edited)
Would probably be pretty shit, modern compilers are far beyond what we can produce by hand nowadays
Avatar
Avatar
Learath2
The extreme focus in theory is why the industry is plagued by people that are "programmers"
many ppl that study CS dont want to "actually" be CS anyway
15:34
so i agree
15:34
u kinda have to be bit nerdy
Avatar
Most of them effectively work as software engineers. Why not train them properly for it?
Avatar
Is there any reason why the naming conventions are not checked with clang-tidy? I was thinking about trying to add that
Avatar
Avatar
ReiTW
C is so small that it doesn't take long to understand the basics
the university lecturers don't really understand C
16:15
with rust it seems to be a little bit better
16:15
because there's less UB
16:15
UB seems to be a hard concept to teach
Avatar
why tho
Avatar
Avatar
marmare_314
Is there any reason why the naming conventions are not checked with clang-tidy? I was thinking about trying to add that
you can try doing that, however there's >1000 naming violations that I found when I wrote the script
Avatar
its literally unexpected behavior xd
16:17
its called undefined but actually mostly ends up with unexpected
Avatar
Avatar
marmare_314
Is there any reason why the naming conventions are not checked with clang-tidy? I was thinking about trying to add that
those would need to be fixed, or there needs to be a way for it to only affect patches
Avatar
Avatar
gerdoe
its called undefined but actually mostly ends up with unexpected
that's the misunderstanding that people have with it, basically
Avatar
Avatar
heinrich5991
you can try doing that, however there's >1000 naming violations that I found when I wrote the script
I think clang-tidy supports changing them automatically but ill have to check
Avatar
they think int function() { g(); } just returns "the last thing that was in the rax register"
16:18
but it's more complicated than that
16:18
but because it's hard to observe it, it's hard to understand it, I guess
Avatar
you just need to have an example of every ub
16:19
examples
16:19
so students can analyze it and make conclusions
Avatar
if you are suggesting "let them try and see what happens", then they might get to the wrong conclusion
16:20
e.g. that int *p = nullptr; *p = 0; always crashes
Avatar
would u feel bad for doing X thing that a coworker was trying to fix because you knew how to fix it right away? i tried to explain how to do the fix but i kinda sucked explaining xD
16:25
and he seemed kinda lost
16:25
but its on my mind now
16:25
im a bad person maybe
16:26
(this guy is rly competent, thats probs not the issue, the thing is he just entered the project)
16:26
i also wanted this fixed asap xd
Avatar
Avatar
heinrich5991
with rust it seems to be a little bit better
I wish there was a UBless C that would be easier to teach on. I would teach Rust but the problem is I'd have to teach with an arbitrarily crippled version of Rust to achieve my teaching goals, but that'd be a disservice to the student as it'd be bad Rust
Avatar
Avatar
Ryozuki
im a bad person maybe
Doubt that has anything to do with it, if he is competent and cares about it he will review it on his own time and figure out how you fixed it
16:29
Or he will ask followup questions if you didn't appear as a complete dickhead 😄
16:29
our work relationship is awkward, we both introverts
16:29
altho we differ as devs
16:29
as far as i know he has 0 open source projects :p
16:29
but i know he is good
Avatar
How do you know he is good if he is new and doesn't have public projects?
Avatar
cuz what he has done in internal projects
16:30
in the company
16:30
well
16:30
so far looks like he knows
16:31
altho sometimes idk
16:31
he sometimes said "you probs need unsafe to do X" but i pointed out with refcells and interior mutability u dont need unsafe xd
16:31
things like this
16:32
definitly more than ur average web dev
16:32
his uni project was doing simd matrices in assembly or smth i forgot tbh
Avatar
Avatar
Ryozuki
would u feel bad for doing X thing that a coworker was trying to fix because you knew how to fix it right away? i tried to explain how to do the fix but i kinda sucked explaining xD
overall, if he didn't look sad/angry I wouldn't care either
Avatar
imagine a constant expresionless person
16:33
idk lmao
16:33
anyway moving on
Avatar
he doesnt seem to care
16:35
gigachad
Avatar
Avatar
Learath2
Programming especially benefits from practice imo. The more you code the better you get
+1
16:37
im just reading the convo
Avatar
Avatar
gerdoe
c is just good language
learning language*
Avatar
Avatar
Voxel
so all i need to do is to rename Single to KillMsg and then that's it? Idk what i'm supposed to be moving where @fokkonaut
was this question ever answered
Avatar
Avatar
gerdoe
but borrow checker uh
borrow checker good
Avatar
i wanna know what im doing when i get home from .work
Avatar
Avatar
gerdoe
its literally unexpected behavior xd
do you know what is ub and why happens?
Avatar
Avatar
Voxel
was this question ever answered
i dont think he answered
Avatar
I don't think that's what he means
16:44
he wants a KillMessage parameter that functions differently from the current one
Avatar
the current parameter name Single doesn't really capture what it does
17:34
I'm not entirely sure what he proposes or why
17:35
this thing should go btw: MsgPlus.m_Size = Teams()->TeamSize(Team());
17:35
this is information the client has
17:35
but in general, only very few things are still missing
17:35
or should be changed
17:36
it looks quite good already
Avatar
Avatar
heinrich5991
the current parameter name Single doesn't really capture what it does
I'll be renaming that (edited)
Avatar
@Voxel you can get rid of that parameter if you change the code inside CCharacter::Die to something along these lines bool TeamKill = Team() != 0 && Teams()->GetTeamState(Team()) == CGameTeams::TEAMSTATE_STARTED; if(TeamKill) { // Send your team kill message here } else { // send the kill message CNetMsg_Sv_KillMsg Msg; Msg.m_Killer = Killer; Msg.m_Victim = m_pPlayer->GetCID(); Msg.m_Weapon = Weapon; Msg.m_ModeSpecial = ModeSpecial; Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, -1); }
18:35
waot
Avatar
if the tee is not in a team you send single kill message, if he's in a team that is locked or whatever u send team kill message
Avatar
@heinrich5991 do you remember how you added the hungarian notation? i cannot figure out how to not add prefixes for primitive types. i tried these but none seem to work. - key: readability-identifier-naming.HungarianNotation.PrimitiveType.int value: null value: value: none value: None I guess it should also be possible using the normal options, but this would be nicer. (edited)
Avatar
Avatar
Ravie
@Voxel you can get rid of that parameter if you change the code inside CCharacter::Die to something along these lines bool TeamKill = Team() != 0 && Teams()->GetTeamState(Team()) == CGameTeams::TEAMSTATE_STARTED; if(TeamKill) { // Send your team kill message here } else { // send the kill message CNetMsg_Sv_KillMsg Msg; Msg.m_Killer = Killer; Msg.m_Victim = m_pPlayer->GetCID(); Msg.m_Weapon = Weapon; Msg.m_ModeSpecial = ModeSpecial; Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, -1); }
wait, you mean the Single parameter?
18:56
if I remove that, it will send the kill message for every member in the team
Avatar
ah I c, but you can still create the TeamKill bool inside rather than an additional parameter
Avatar
Isn't that what I did?
Avatar
nah you added this bool Single
19:08
you can see inside the function itself if it's a single kill or team kill, no need to pass some bool
Avatar
if I remove that, it will send the kill message for every member in the team
19:09
Teams()->OnCharacterDeath(GetPlayer()->GetCID(), Weapon); }
19:09
it iterates through all the IDs and kills each tee. i need a way to prevent duplicates
Avatar
but you can let it kill the tees normally and inside CCharacter::Die you decide if it should send the message
Avatar
but how does it know if it's the one killing?
19:14
like, how does it detect who's strong
Avatar
it doesn't know that anyway
19:17
the only difference from how you have it currently is that you do the check inside the function rather than passing a bool
Avatar
there is a guaranteed order of spawn iirc though
19:26
the person who kills will have the lowest entity id iirc
Avatar
Kotlin as a first OOP language? :p
Avatar
Avatar
marmare_314
@heinrich5991 do you remember how you added the hungarian notation? i cannot figure out how to not add prefixes for primitive types. i tried these but none seem to work. - key: readability-identifier-naming.HungarianNotation.PrimitiveType.int value: null value: value: none value: None I guess it should also be possible using the normal options, but this would be nicer. (edited)
I made my own script on top of libclang, didn't use clang-tidy, sorry
Avatar
not just at private companies either, I've heard very scary things from people that work at government jobs
Avatar
@marmare_314 have you tried value: ""
20:12
?
Avatar
Avatar
heinrich5991
@marmare_314 have you tried value: ""
yes, and also value: '' which is supposed to work for the normal prefix options
Avatar
what does it do if you try "" or ''?
Avatar
Avatar
heinrich5991
they think int function() { g(); } just returns "the last thing that was in the rax register"
imagine having a rax register
Avatar
on amd64
Avatar
Avatar
Learath2
I wish there was a UBless C that would be easier to teach on. I would teach Rust but the problem is I'd have to teach with an arbitrarily crippled version of Rust to achieve my teaching goals, but that'd be a disservice to the student as it'd be bad Rust
not completely UBless, but -pedantic -Wall -Wextra -Werror gives you way less error already 😄
Avatar
Avatar
heinrich5991
on amd64
yeah, but C is platform agnostic
Avatar
heinrich deletor
20:59
Its Monday
20:59
😔
Avatar
heinrich is like the elderly lady not allowing kids to play on the grassfield
Avatar
Avatar
Chairn
yeah, but C is platform agnostic
the C standard doesn't talk a lot about platforms, it's not completely agnostic though. the "not completely agnostic" isn't relevant to the the current discussion though
21:00
but I think my point still stands, even if you add "on current amd64 ABIs" to the statement
21:02
see also https://utcc.utoronto.ca/~cks/space/blog/programming/CAsAbstractMachine on the point of "C is just an abstract machine"
Avatar
Avatar
heinrich5991
e.g. that int *p = nullptr; *p = 0; always crashes
doesn't crash on lots of embedded system
Avatar
yes, it also doesn't crash cat (edited)
21:02
I was talking about amd64, though
Avatar
yes
Avatar
what's cat here?
Avatar
$ echo 'int *p = nullptr; *p = 0;' | cat int *p = nullptr; *p = 0;
21:04
didn't crash for me
21:05
what I was trying to say was that you're talking about microcontrollers when I already specified that I'm talking about amd64
21:05
i.e. not really relevant for the point I was trying to make
21:05
I was trying to say that instructors say something like int *p = nullptr; *p = 0; always crashes on amd64
21:05
which isn't true
21:06
trying to point out that some instructors in university don't understand C, even if you try to explain what UB is
Avatar
Avatar
heinrich5991
what does it do if you try "" or ''?
it ignores the value, probably related to https://github.com/llvm/llvm-project/issues/56358
I wish to enforce a particular prefix on global variables which are not constants. I would expect to be able to do this via the following options to readability-identifier-naming: - key: readabilit...
Avatar
Avatar
heinrich5991
trying to point out that some instructors in university don't understand C, even if you try to explain what UB is
or they just simplify it to not complicate things too much
Avatar
but when asked about that point, they should be able to tell you "I just simplified it" and not "you're wrong, check this sample program", right?
Avatar
Avatar
marmare_314
it ignores the value, probably related to https://github.com/llvm/llvm-project/issues/56358
i just noticed, the exact issue is linked there so i guess i'll just try the other option
Avatar
Avatar
Ryozuki
do you know what is ub and why happens?
ub for me is absence of guarantee from language standard or what language comes up with
21:49
i can actually call possibility of us states to leave usa in xix ub just because constitution had nothing about states right of leaving
21:50
constitution nor allowed this nor prohibited it
Avatar
Avatar
ReD
Kotlin as a first OOP language? :p
Isn't it basically java with a new syntax? I mean u probably learn enough about oop to understand the idea behind it. But maybe too few to understand it's flaws^^
Avatar
@Jupstar ✪ I finally actually started on the tee rendering ^^
23:21
bonus points for whoever recognizes the clip
23:23
what you see is rendering of demo snapshots without interpolation
23:24
now that I have this first version running, I can incrementally build upon it. I'm really happy I finally picked twgpu up again :)
Avatar
Avatar
Patiga
@Jupstar ✪ I finally actually started on the tee rendering ^^
oooh, what's this (edited)
Avatar
https://gitlab.com/Patiga/twgpu my rust renderer, so far it only rendered maps brownbear
Avatar
Avatar
Patiga
bonus points for whoever recognizes the clip
is it the hammering clip?
hey 1
Avatar
Avatar
heinrich5991
is it the hammering clip?
@heinrich5991 you get the 100 points, gratz heartw
Avatar
cool ❤️
23:58
but cool rendering!
23:58
how did you render it to video?
Avatar
no, recorded with obs
Avatar
ah
23:59
(feature request:) having a video backend would be super cool as well
23:59
😄
Exported 430 message(s)