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-25 00:00:00Z and 2023-03-26 00:00:00Z
Avatar
i hate being bad at coding :((
Avatar
@Voxel teams.h includes gamecontext.h and that includes gameworld.h
00:21
so how do i include the teams stuff without reintroducing the repeating thingd
Avatar
@Voxel are you including teams in gameclient? it already includes the other gameworld from prediction so that could be the redefinition
Avatar
no i'm including it in killmessages.cpp
00:45
should have specified
Avatar
Avatar
Voxel
no i'm including it in killmessages.cpp
ok so in killmessages.cpp you have both gameclient.h -> prediction/gameworld.h and teams.h -> gamecontext.h -> server/gameworld.h and both have a CGameWorld class, I guess that's your problem
Avatar
Avatar
Ravie
ok so in killmessages.cpp you have both gameclient.h -> prediction/gameworld.h and teams.h -> gamecontext.h -> server/gameworld.h and both have a CGameWorld class, I guess that's your problem
So how can I be able to call things over like TeamSize(), which is a part I added into teams.cpp? (edited)
Avatar
@Voxel looks like teams are a server thing so you can't really access them (maybe I'm wrong) but you can try using GameClient()->m_Teams without including teams.h
Avatar
But can you also use Teams()->GetTeamState(), or any other function inside of teams.h? (edited)
02:56
c++ if(Kill.m_VictimDDTeam != TEAM_FLOCK && Kill.m_TeamSize != 1 && Teams()->GetTeamState(Kill.m_VictimDDTeam) != 1) { for(int i = 0; i < MAX_CLIENTS; i++) { if(i != Kill.m_VictimID && m_Core.Team(i) == Team && GameServer()->m_apPlayers[i]) { m_aVictimSkinBuffer[m_VictimSkinCurrent + 1] = m_pClient->m_aClients[i].m_RenderInfo; m_VictimSkinCurrent = (m_VictimSkinCurrent + 1) % (MAX_KILLMSGTEAM - 1); } } } m_aVictimSkinBuffer[0] = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
Avatar
nah m_Teams is only CTeamsCore but looks like it has some basic info and functions
Avatar
That's unfortunate. I kind of need these factors if I want to put all of the logic inside killmessages.cpp
Avatar
you can't use server functions in client code
03:03
what do you mean by "not adding an extra message"?
03:03
how do you want to do it with the existing ones?
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...
03:05
I had a revelation, that I don't even NEED multiple messages to merge the killfeed stuff
Avatar
ah
Avatar
I'm just trying to figure out how to incorperate some of the logic inside of killmessages.cpp
Avatar
I see
Avatar
Like TeamSize() and GetTeamState()
Avatar
these are server functions
03:07
you can't use them in client code
03:07
you'll need to figure out how the client represents that information
03:07
(I don't know that)
03:07
probably in the snap somewhere?
03:07
you could look into the scoreboard code, it renders the teams after all
Avatar
you can check a player's team with GameClient()->m_Teams.Team( int ) so throwing it in a loop and counting would give you team size, about team state idunno (edited)
Avatar
Avatar
Ravie
you can check a player's team with GameClient()->m_Teams.Team( int ) so throwing it in a loop and counting would give you team size, about team state idunno (edited)
That's exactly that TeamSize() in teams.h is
Avatar
there is no teams.h in the client
Avatar
it's not teams.h, it's teamscore.h and CGameClient has it
Avatar
TeamSize() seems to be teams.h and teams.h isn't in the server (I was replying to Voxel)
03:22
you can get the team size in the client in the way you describe
Avatar
m_pClient->m_Snap.m_aTeamSize[]?
03:25
Isn't that for vanilla teams?
Avatar
yep
Avatar
Avatar
Voxel
m_pClient->m_Snap.m_aTeamSize[]?
what do you need the team size for? ^^
03:36
you can loop over all client IDs and check their team ID using GameClient()->m_Teams.Team(ClientID)
Avatar
Avatar
heinrich5991
what do you need the team size for? ^^
To determine how many tees it needs to write into the buffer.
03:37
And how many it needs to render onto the killfeed.
Avatar
then count them like Ravie described
03:38
loop over all client IDs
03:38
if GameClient()->m_Teams.Team(ClientID) is equal to the team you're interested in
03:38
increment your team size counter by one
Avatar
c++ bool TeamKill; if(Kill.m_VictimDDTeam == TEAM_FLOCK) TeamKill = false; else { int TeamSize = 0; for(int i = 0; i < MAX_CLIENTS; i++) { if(m_pClient->m_Teams.Team(i) == Kill.m_VictimDDTeam) TeamSize++; } Kill.m_TeamSize = minimum(TeamSize, 4); TeamKill = TeamSize != 1; } (edited)
03:41
like this?
Avatar
yes
03:42
the first if looks wrong though
Avatar
should be == TEAM_FLOCK?
Avatar
I fixed that
03:46
Now I just need to figure out how to do team states
03:46
So ONLY when the entire team starts, should the killfeed be crunched.
Avatar
ChillerDragon BOT 2023-03-25 09:18:44Z
Is there a way to alter configs before save on client shutdown without touch ddnet code? Im trying to do it in my components OnShutdown but that gets called after the config manager wrote to disk. Im trying to not write any code outside of my component.cpp to avoid conflicts
09:20
i would call the config manager my self and resave but its private :c
09:27
ok found a weird workaround :D
Avatar
Leftover from #6372.

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 (especially base/) or added coverage to integration test
  • [ ] 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...
Avatar
It's possible for the HTTP request task to be aborted after the curl request has finished, so the returned State will be HTTP_DONE but m_Abort is true. The State never changes to HTTP_ABORTED, because the progress callback is not called after the HTTP request has completed. This causes the client to crash when a skin download is aborted after the HTTP request finished but before the completion callback is called. This is fixed by checking if m_Abort is true and setting t...
Avatar
ChillerDragon BOT 2023-03-25 13:33:35Z
@Ryozuki any chance we can get some python bindings for rustyman?
13:39
first i need to make sure it works properly
Avatar
ChillerDragon BOT 2023-03-25 13:40:45Z
oof its not?
Avatar
i think it had some issues
13:44
you see
13:44
there is huffman
13:44
and then the way tw does huffman
Avatar
did kog servers already got update with fixing timeout in some parts of map?
Avatar
ChillerDragon BOT 2023-03-25 14:40:46Z
rip heinrich
14:41
heinricho ur irc died ._.
Avatar
Reduce duplicate code by using loop and by merging implementation of net_set_blocking and net_set_non_blocking.

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
  • [ ] Changed no physics that affect existing ...
Avatar
ChillerDragon BOT 2023-03-25 15:17:55Z
o/
15:20
im using the same tool rust uses for error reporting
Avatar
aa0ad18 Refactor net_set_blocking and net_set_non_blocking - Robyt3 48b6dea Merge #6462 - bors[bot]
Avatar
econ was meant to be used with ssh?
Avatar
ChillerDragon BOT 2023-03-25 15:31:52Z
wot? econ ssh?
15:32
like its just tcp connection
15:33
ah yup ssh is secured
15:35
tw econ is meaningless
cryNooo 1
Avatar
econ is useful in the sense u can execute tw server commands
15:41
but ye its not secure
Avatar
Avatar
Ryozuki
econ is useful in the sense u can execute tw server commands
i mean my crate tw-econ is meaningless xd
Avatar
3c3a802 Replace usage of fmodf with std::fmod - Robyt3 f2df348 Merge #6460 - bors[bot]
Avatar
ChillerDragon BOT 2023-03-25 16:00:11Z
life is meaningless
Avatar
To delete files and empty folders from the user's save directory. Only files and folders from the user's save directory can be deleted. Only empty folders can be deleted. Error message popups are shown when the deletion fails. Closes #6272. Screenshots:
Avatar
ChillerDragon BOT 2023-03-25 17:14:13Z
yo @heinrich5991 any chance you could rename this field name to something thats not a blocked python keyword? xd https://github.com/heinrich5991/libtw2/blob/a6e26ebd0a8669034404ab5b59de61e25e16a2a8/gamenet/generate/spec/teeworlds-0.7.5.json#L401
Some Teeworlds stuff in Rust. Contribute to heinrich5991/libtw2 development by creating an account on GitHub.
17:14
17:14
i am trying to use the json to generate python code :)
Avatar
ChillerDragon: I think the trick is that you rename the fields
17:24
you could rename keyword to keyword_
Avatar
ChillerDragon BOT 2023-03-25 17:24:27Z
?
Avatar
self.pass_: int = pass_ (edited)
Avatar
ChillerDragon BOT 2023-03-25 17:24:54Z
and then add some weird if statement in my parser?
17:25
but pass is not very nice to type ..
Avatar
no, you list all the keywords of your language
17:25
and just append an underscore
17:25
I didn't do the naming, you can ask teeworlds or ddnet to rename it (edited)
17:25
it's all generated
Avatar
ChillerDragon BOT 2023-03-25 17:26:02Z
wot the json is generated?
Avatar
yes
Avatar
ChillerDragon BOT 2023-03-25 17:26:35Z
yea ok then renaming is weird
17:26
hmm
17:26
im not sure what to do i do not like the _
Avatar
it's official python style, I thnik
17:27
ctrl-f "python keyword"
Avatar
ChillerDragon BOT 2023-03-25 17:28:10Z
i guess but its so weird
17:29
i guess ill hardcode a if statement in and map "pass" to "passed"
17:29
is this field even used? xd
17:30
17:30
calculated by the server and set by the client in voting.cpp but never read?
Avatar
seems like it
Avatar
ChillerDragon BOT 2023-03-25 17:31:40Z
drunk devs
17:31
im still not sure if passed would work since the vote is not over
17:32
@Swarfey sos
Avatar
'pass' seems to be the amount of people who have not voted?
Avatar
ChillerDragon BOT 2023-03-25 17:35:01Z
oh yea true
17:35
what does pass stand for then?
17:36
calling it left seems okay to me
17:37
but it could be confused with time
17:37
maybe pending
Avatar
since no one is going to use that field, why not call it pass_? ^^
Avatar
ChillerDragon BOT 2023-03-25 17:37:32Z
also an argument xd
17:37
might as well name it _pass xd
17:37
as in unused
Avatar
^^
Avatar
Were there any changes to antiping from version 16.7.2 to 16.8?
Avatar
I'm almost done! All I need to do now is to find out how to only make the teams crunched when the team starts
Avatar
Avatar
murpi
Were there any changes to antiping from version 16.7.2 to 16.8?
don't know
Avatar
Avatar
heinrich5991
don't know
Wanna help debug an issue? ^^
20:51
I don't know the cause of the issue, and it's not easy to describe, but I can show it to you.
Avatar
hmm hmm
21:00
I don't have time right now
21:02
sorry
Avatar
No problem :D I'll try finding the specific commit that causes the issue.
Avatar
do you know git bisect?
21:05
it cuts down the time you need for finding a bad commit
Avatar
n -> log n
Avatar
i.e. from something like 100 to 7
Avatar
@heinrich5991 do you have a comfy way to bisect ddnet btw?
Avatar
git bisect and then cmake --build build
21:09
that's probably not comfy enough?
Avatar
Having to cd back and forth from the build dir is a tad annoying, but I never gave a thought how to streamline it
21:09
Oooh, I can stay outside build/
Avatar
yes
Avatar
That's smart
Avatar
Is it enough to rebuild game-client after each bisect step?
Avatar
You also need re-run cmake if CMakeLists was changed
👍 1
Avatar
d855f9e Add 3 € funding by Lem0n - def-
22:46
The ninja attack direction is wrong and the client feels extremely janky with each attack. Only happens after crossing the startline. Reproduced on map "Rapid": https://user-images.githubusercontent.com/60477660/227745827-06e1f9f7-fc9a-4a66-89da-b8273a08cafc.mp4 Leftside: recorded with the bad commit Rightside: recorded without the bad commit ```e4157a744b720fb89216640f6586a61cd44a1bd1 is the first bad commit commit e4157a744b720fb89216640f6586a61cd44a1bd1 Author: Zwelf Date: ...
Avatar
@heinrich5991 found it, thanks for the tip 🙂
Avatar
fd98ed0 Add IStorage::RemoveFolder - Robyt3 6f1533e Group UI code of right and left editor file dialog buttons - Robyt3 fda8507 Add "Delete" button to editor file browser - Robyt3 781ec43 Merge #6463 - bors[bot]
Avatar
705be7c Implement random skin button - HiRavie eb41ecf Icon button, tooltip and various fixes - HiRavie 20ac914 Tooltip ID - HiRavie 214053e Merge #6459 - bors[bot]
Exported 162 message(s)