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-09-03 00:00:00Z and 2022-09-04 00:00:00Z
Avatar
'拏 MAhdiyar 2022-09-03 00:38:13Z
xD
Avatar
true gigachad url
Avatar
Avatar
fokkonaut
@Voxel you can access tunings from CPlayers using m_pClient->m_aTuning
it took me way to long to figure this out on my own LOL
06:48
but now i'm at a point where i just need to test it and hope everything turns out well
Avatar
One last thing before I submit: Is there another way to do this?
Avatar
I did crunch it down like how the switch case in the hand position is treated, so that's a tiny bit better,
07:30
I guess we can talk about it during submitting
Avatar
Avatar
Voxel
One last thing before I submit: Is there another way to do this?
i think we usually do (float) style casts not float()
Avatar
Ohh. Okay, thanks!
Avatar
for some reason, the cmd keep saying i need to create a new rule to let through udp on port 8303, but i already did that and i tried to disable the firewall and nothing.
Avatar
Avatar
Voxel
One last thing before I submit: Is there another way to do this?
This is C++, there are lots of different ways to do this. I think your way is fine. This way might be faster because it's just an array lookup, so O(1): static float s_aWeaponsFireDelay[] = { [WEAPON_HAMMER] = (float)1, // your real value here [WEAPON_GUN] = (float)2, [WEAPON_SHOTGUN] = (float)3, [WEAPON_GRENADE] = (float)4, [WEAPON_LASER] = (float)5, [WEAPON_NINJA] = (float)6, }; static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons"); float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
08:01
To get rid of the magic number: static_assert(NUM_WEAPONS == std::size(s_aWeaponsFireDelay), "s_aWeaponsFireDelay has to be adapted to new weapons");
Avatar
Avatar
deen
This is C++, there are lots of different ways to do this. I think your way is fine. This way might be faster because it's just an array lookup, so O(1): static float s_aWeaponsFireDelay[] = { [WEAPON_HAMMER] = (float)1, // your real value here [WEAPON_GUN] = (float)2, [WEAPON_SHOTGUN] = (float)3, [WEAPON_GRENADE] = (float)4, [WEAPON_LASER] = (float)5, [WEAPON_NINJA] = (float)6, }; static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons"); float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
Very useful! I'll try implementing that to see if it works!
08:09
Ends up with a lot of errors, mainly stating that "WEAPON_X" is not a variable
Avatar
Added in two more animation states, for running at a fast enough speed and for when you're AFK. Both of these states are bi-directional, and actually mirror very well inside the code. The running animation I feel like gives a better explanation for how fast you're going, and stopping now would result in skidding. Old run cycle, which is just really fast walk: https://user-images.githubusercontent.com/95713843/188262126-a2f63f92-88b5-408e-a1dd-af9288541c54.mp4 New run cycle: https://us...
Avatar
GitHub Gist: instantly share code, notes, and snippets.
Avatar
Odd. It might just be my Visual Studio then. I'll look into it tomorrow when I wake up, It's kind of late here. (edited)
Avatar
@Voxel is it possible to make the afk thing an option? I don't know how it looks like with like 10+ tees afk next to each other, also did you test in freeze how it looks?
Avatar
Avatar
archimede67
@Voxel is it possible to make the afk thing an option? I don't know how it looks like with like 10+ tees afk next to each other, also did you test in freeze how it looks?
I could try and make AFK state an option. And in freeze the tee sits normally, holding no weapon.
Avatar
Alright
Avatar
Avatar
Voxel
One last thing before I submit: Is there another way to do this?
you can also do it the way the server does it
Avatar
Avatar
deen
This is C++, there are lots of different ways to do this. I think your way is fine. This way might be faster because it's just an array lookup, so O(1): static float s_aWeaponsFireDelay[] = { [WEAPON_HAMMER] = (float)1, // your real value here [WEAPON_GUN] = (float)2, [WEAPON_SHOTGUN] = (float)3, [WEAPON_GRENADE] = (float)4, [WEAPON_LASER] = (float)5, [WEAPON_NINJA] = (float)6, }; static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons"); float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
didn't know that was possible till I saw some code from some XDP examples, this is amazing (c) (edited)
09:54
My new video
09:55
This is real I just made it
Avatar
hi adam back
Avatar
teecoin gaming
Avatar
Avatar
Erik van Velzen
My new video
pls move to #off-topic thanks
Avatar
Adam Back (born July 1970) is a British cryptographer and cypherpunk. He is the CEO of Blockstream, which he co-founded in 2014. He invented Hashcash, which is used in the Bitcoin mining process.
Avatar
@Erik van Velzen Adam did some cool work! But just to be clear, I never thought you're being insincere with your intentions. I just don't think blockchain projects fit well into TW/DDNet
Avatar
Avatar
Jupstar ✪
pls move to #off-topic thanks
Erik van Velzen 2022-09-03 12:00:33Z
Ok sorry for that just wanted to make the point you're right it had to be on a different topic
Avatar
" https://master1.ddnet.tw/ddnet/15/register failed. libcurl error: ERROR: the master server reports that clients can not connect to this server. ERROR: configure your firewall/nat to let through udp on port 8303. registering..."
Avatar
Avatar
Voxel
One last thing before I submit: Is there another way to do this?
as already said by deen, you can use an array because enum values are automatically generated as following numbers starting from 0. You don't need the float cast, it is implicit with the division by float number
Avatar
I'll impliment an array cast soon
Avatar
i don't think that's necessary
Avatar
i guess but
Avatar
This reverts commit 8996d152abe1eef489e6457617ef7df5f64e0765. Maybe only for 16.3.2? New: !screenshot-20220903@171243 Old: !screenshot-20220903@171324

Checklist

  • [x] Tested the change ingame
  • [x] Provided screenshots if it is a visual change
  • [ ] Tested in combination...
Avatar
  • Refactor editor automapper config list using CScrollRegion. Also fix some other minor issues with this list.
    • Fix the currently selected item not being highlighted after opening the dialog.
    • Remove static limit of 255 automapper rules, after which the editor previously caused out-of-bounds accesses, by using the address of the automapper config name as button ID.
Avatar
anybody on the master issue?
Avatar
what master issue?
Avatar
can only see half servers
16:32
560 instead of around 1020
16:36
@Chairn seems like i'm not the only one having that issue
Avatar
is master2.ddnet.tw a real running master or?
Avatar
Avatar
fokkonaut
Where are all the servers in master?
@ReiTW
17:51
had the same
Avatar
Avatar
fokkonaut
had the same
which master do you have set? ddnet.tw or ddnet.org ?
Avatar
tw probably, i havent touched anything
17:54
but its working again, it was just on that day
17:54
i had like only a few servers, maybe 2 browser sizes
Avatar
That's DoS attack, should work again
Avatar
Ah okay
17:55
someone really wants to destroy the whole game
17:55
xd
Avatar
we really need to get blockchain in the game to prevent this troll
Avatar
Yes, same as for the last ~7 years non-stop
Avatar
Yup. I always wonder how many problems someone has to have in order to do something like this without a reward
17:57
Attacking big companies often is connected to getting money or whatever
Avatar
Avatar
fokkonaut
@ReiTW
seems fixed
Avatar
Yes, deen fixed it
Avatar
yea saw the msg
Avatar
Previously, close messages were entirely ignored during the connection process, this meant that ban messages weren't shown to players. Instead, they'd see the standard "no answer from server yet" message. Fixes #5792.

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
  • [ ] Conside...
Avatar
@Erik van Velzen To be honest, the idea of using crypto currency as a main objective for a game like this wouldn't cut it, since this game never received any micro transactions outside of third-party purchases from some teeworlds servers' services. My honest opinion about this would be that, we would kinda need a rework for a client which supports this idea. But rather to invest fully in crypto currency, it should be an alternative payment option of currency, under a well made trading system. So, instead of using crypto currency only to play some games, we should concentrate on making a trading system, where we can sell quality items, like skins for any Asset (tee skin, weapons, particles, animations, etc) and have them under real life currency, so as a micro transaction would be.
19:53
It might also cause some trouble over Europe's gambling addiction rules, if crypto is being comforted on trading sides as part of interest to the game.
19:53
It could backfire real fast
Avatar
summary: shitty idea
Avatar
Avatar
Cellegen
@Erik van Velzen To be honest, the idea of using crypto currency as a main objective for a game like this wouldn't cut it, since this game never received any micro transactions outside of third-party purchases from some teeworlds servers' services. My honest opinion about this would be that, we would kinda need a rework for a client which supports this idea. But rather to invest fully in crypto currency, it should be an alternative payment option of currency, under a well made trading system. So, instead of using crypto currency only to play some games, we should concentrate on making a trading system, where we can sell quality items, like skins for any Asset (tee skin, weapons, particles, animations, etc) and have them under real life currency, so as a micro transaction would be.
tf2 market ddnet version
Avatar
sort of, I would like that tbh
Avatar
@Davide what 🤡
19:55
say it bravely
Avatar
what would we sell in the ddnet market?
Avatar
well, if the client would be restricted, so that it gets skins from the ddnet skin database and based on profile data justatest , some skins would have different prizes, depending on quality, then it would be sold like that
19:57
what ddnet doesn't have is usage of the forum's profile system as part of login to ddnet (edited)
Avatar
Avatar
Cellegen
say it bravely
It might also cause some trouble over Europe's gambling addiction rules, if crypto is being comforted on trading sides as part of interest to the game. It could backfire real fast
= Shitty idea
Avatar
How to ruin a good game:
Avatar
Avatar
Davide
It might also cause some trouble over Europe's gambling addiction rules, if crypto is being comforted on trading sides as part of interest to the game. It could backfire real fast
= Shitty idea
That's what I meant
Avatar
Avatar
Davide
It might also cause some trouble over Europe's gambling addiction rules, if crypto is being comforted on trading sides as part of interest to the game. It could backfire real fast
= Shitty idea
yeah that's what I was mentioning :v
Avatar
Avatar
Davide
😂
I thought it was for rudeness, mb then
Avatar
also with how moddable ddnet is wouldnt you think ppl will just... install the expensive items?
Avatar
with the current state of the client and the database, which is both accessible by anybody and open-source, yeah.
19:59
it's not possible to make a system like that. (edited)
Avatar
People wouldn't like microtransactions at all
20:00
it has no benefits, but some people prefer on "having more value over the poor"
20:01
so basically little monopoly
Avatar
Avatar
deen
That's DoS attack, should work again
If you have the opportunity, try to lookup the first incoming IPv4 address(s) from the DoS if possible. It could be feasible that one of my scripts was used where I implemented an extra secret arg which you need to pass, otherwise the server will spoof the first packet(s) with its real IPv4 address(s) and false calculations.
20:58
8989105 Update hungarian language file (by Cellegen) - def- 818f9e8 Version 16.3 - def- 0deeadb Update brazilian_portuguese.txt - rffontenelle bdfbd33 Update french.txt - archimede67 1dbfea0 Better words - archimede67 38035bb Update Korean translations by CHaBek - cwh7435 23cf903 Add libpng dylib to mac dmg (fixes #5764) - def- 605bad3 Fix png error handling by setting jmpbuf, else libpng will kill the thread - Jupeyy d3204d9 Prefer bundled libs because of old libpng version on CI - def- 8d4a2f7 Version 16.3.1 - def- 60ca445 Add CWindowsComLifecycle RAII wrapper for Windows COM library - Robyt3 fdd173c Fix close messages not being shown when connecting - heinrich5991 256f844 Version 16.3.2 - def-
Avatar
5028423 Fix close messages not being shown when connecting - heinrich5991 671bf95 Merge #5806 - bors[bot]
21:15
21:16
Avatar
130275a Refactor editor automapper config list using CScrollRegion - Robyt3 977f1a8 Refactor editor server settings list using CScrollRegion - Robyt3 ecce223 Merge #5805 - bors[bot]
Avatar
@Ravie Senpai hope u didn't came back to annoy people
Avatar
Progress: I added this to gamecore.cpp and gamecore.h; now all i have to do is to figure out how to call it inside where i need it.
22:32
ok i found out how i think
Avatar
Avatar
Voxel
Progress: I added this to gamecore.cpp and gamecore.h; now all i have to do is to figure out how to call it inside where i need it.
tbh u don't even need to break if you return
22:36
break is only to avoid unecessary condition check after
22:39
Is this even right?
22:39
found a good explanation
Avatar
Avatar
Voxel
Is this even right?
you didn't initialize Tuning
Avatar
Avatar
ReiTW
you didn't initialize Tuning
how do you initialize pointers? isn't it something with the & symbol?
Avatar
idk ur code but depends on what u're doing
Avatar
Avatar
Voxel
Click to see attachment 🖼️
ah and didn't see
22:56
but here you attempt to use CGameClient *m_pClient; which isn't initialized too
22:57
also to be clear with that
22:57
m_ means it's a class member
22:57
it's just easier for people to know that
Avatar
fair ennough
Avatar
p stands for pointer
Avatar
I changed Tuning to pTuning then
Avatar
I don't have much experience with client-side to help you for the rest, will let others answer you (can only help abit for server-side) (edited)
Avatar
Avatar
Voxel
Click to see attachment 🖼️
looked rly fast, why don't you just return m_<weapon>FireDelay
23:10
you're inside CTuningParams class
23:10
23:10
then from there you just call your function GetWeaponFireDelay
23:14
smth like float CTuningParams::GetWeaponFireDelay(int Weapon) { switch (Weapon) { case WEAPON_HAMMER: return (float)m_HammerHitFireDelay / 1000.f; case WEAPON_GUN: return (float)m_GunFireDelay / 1000.f; case WEAPON_SHOTGUN: return (float)m_ShotgunFireDelay / 1000.f; case WEAPON_GRENADE: return (float)m_GrenadeFireDelay / 1000.f; case WEAPON_LASER: return (float)m_LaserFireDelay / 1000.f; case WEAPON_NINJA: return (float)m_NinjaFireDelay / 1000.f; default: dbg_assert(false, "Invalid weapon."); } }
Avatar
Avatar
Voxel
Click to see attachment 🖼️
m_pClient is unitialized
23:15
try with GameClient() instead
Avatar
then smth like bool IsActive = !m_pClient->m_aClients[ClientID].m_Afk || LastAttackTime < m_pClient->m_aTuning[g_Config.m_ClDummy].GetWeaponFireDelay(Player.m_Weapon); (edited)
Avatar
yea one sec
Avatar
Idk but what I said is maybe the better way to go Instead of accessing CGameClient from CTuningParams (edited)
Avatar
I'll try it
Avatar
Avatar
archimede67
@Voxel is it possible to make the afk thing an option? I don't know how it looks like with like 10+ tees afk next to each other, also did you test in freeze how it looks?
Also to answer your questions:
Avatar
Is this a good placement for this?
23:58
I don't want to create a new tab in appearance dedicated for 1 option. (Or two, depending if you would want running state as a toggle as well. Both are off by default) (edited)
Exported 136 message(s)