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 2019-05-01 00:00:00Z and 2019-05-02 00:00:00Z
Avatar
@Learath2 I'll try to do it tomorrow, since it's late now and I have to sleep.
Avatar
3cfbd83 Forgot default color for ui - Learath2
Avatar
I knew that hack wouldnt work well :/
07:39
Colors with alpha take the whole 32bits
07:39
I need to save them in a different format
Avatar
Okay while its safe to store them as ints its not safe to manipulate them as such
10:03
I guess I can work with that
Avatar
324c389 Accept negatives aswell, don't clamp - Learath2
Avatar
f479f69 Add a flag for colors with alpha - Learath2
Avatar
bfeef8f Use the color macro - Learath2 b16c0b8 Lighten the default authed color - Learath2
Avatar
the color isn't artificially lighted anymore, that's why it looked darker
11:16
@deen your third bug I can't recreate, even after completely deleting my config
11:18
(If I could I wouldn't have told you to it's okay to merge :D)
Avatar
a451bb1 Dummy colors are also colors - Learath2
Avatar
okay, done with the quick fixes, I'll stop pushing to master 🙂
Avatar
Should help relieve some of the issues reported on discord.
Avatar
a910d9e Persist show_ips setting on map changes - def- 9bca330 Merge #1691 - bors[bot]
Avatar
@Learath2 could you make the score format change soon? Right now, it is completely wrong - the client receives it as a system message, not a game message and it generally belongs to an extended player netobject, doesnt it?
Avatar
I think it belongs to a CNetObj_DDNetPlayer
Avatar
yes.
Avatar
@heinrich5991 do you agree?
Avatar
no. DDNetGameObj
Avatar
Ah right, you told me earlier
15:19
CNetObj_DDNetGameInfo
Avatar
See I think it belongs there
15:23
but for fokkonauts usecase that'd be useless
15:23
as with GameInfo everyone would have the same score type
15:24
(which makes sense to you and me, but for a mod that mixes many elements it doesn't)
Avatar
Ahh, right
15:25
Okay, so it needs to be in that Player obj
Avatar
hmmmm
15:29
do we really need that complexity? 😦
Avatar
Yes, please :D
Avatar
u
Avatar
@heinrich5991 we don't but it'd be nice for modifiability
16:43
question is do we want to accomodate that or not
Avatar
ChillerDragon 2019-05-01 16:48:03Z
yo does anyone have an solution for using cd during pipeing? cd foo/;./a | cd bar/;./b i want to pipe output of into b but they are in different directorys and have to be executed from their directory
Avatar
use subshells
16:48
(cd abc; cmd1) | (cd def; cmd2)
Avatar
ChillerDragon 2019-05-01 16:48:57Z
interesting and that works? why
Avatar
because you spawn subshells
Avatar
ChillerDragon 2019-05-01 16:49:18Z
isnt cmd1 result getting piped into cd and then killing cd?
16:49
magic ima try
Avatar
as you can see there is no pipe between cmd1 and cd
16:51
how can it even pipe the result without a pipe? 😄
Avatar
ChillerDragon 2019-05-01 16:51:06Z
and if i have a third binary in a third pipe same dir as second?
16:51
do i have to use cd agian i guess?
16:51
cmd1) | (cd def
16:51
i see a pipe there
16:52
lol it worked
16:52
awesome thanks heinrich
Avatar
pSelf->m_World.m_Core.m_apCharacters[Victim]->m_Super is the same as pChr->Core()->m_Super, right?
17:59
and, why would you use GameServer()->m_World. instead of GameWorld()->?
Avatar
GameWorld returns m_world
17:59
i think
Avatar
isnt it the same?
Avatar
so the first one with super is also smarter to use the right version?
Avatar
depends on where you are obviously
Avatar
the hierachy in ddnet code
18:00
is messed up imo
18:00
everything is everywhere
Avatar
I can imagine CCharacterCore *pChr and CCharacter *pChr
18:01
or CCharacterInfo
Avatar
CCharacterCore is not usually defined as pChr
18:01
on code
18:01
from what i rmeember
Avatar
more pCore
Avatar
or pCharCore
Avatar
anyways, the point is how you access somewhere depends on where you are accessing from
Avatar
so, from an entity class i can use GameWorld()-> instead of GameServer()->m_World. right?
Avatar
and for the example with super, (its in ddracecommands.cpp) i can also use pChr->Core()-> instead of the way using the GameServer, right?
Avatar
[quakenet] Learath2 BOT 2019-05-01 18:03:47Z
does CEntity even have access to CGameServer()?
Avatar
yes?
Avatar
[quakenet] Learath2 BOT 2019-05-01 18:05:19Z
yep, weird, I wonder why we needed that :P
Avatar
for this, maybe if (GameServer()->Collision()->GetCollisionAt(m_Pos.x, m_Pos.y) == TILE_DEATH)
Avatar
[quakenet] Learath2 BOT 2019-05-01 18:06:49Z
the hierarchy is so weird here
Avatar
indeed
Avatar
ChillerDragon 2019-05-01 18:09:14Z
hmm am i the only person having real trouble connecting a dummy on a 0.6.5 vanilla server?
18:09
im not sure what version debian testing currently has but i dont think its latest.
Avatar
am i stupid or is this the uselessest thing ever? This line is in gameworld.cpp XD CCharacter *p = (CCharacter *)GameServer()->m_World.FindFirst(ENTTYPE_CHARACTER);
Avatar
ChillerDragon 2019-05-01 18:10:15Z
i get cp or i gltich through walls see glitches etc
18:10
why should it be useless?
Avatar
GameServer()->m_World == this file
Avatar
ChillerDragon 2019-05-01 18:10:47Z
ah
Avatar
you can just go ahead and write FindFirst
Avatar
ChillerDragon 2019-05-01 18:10:49Z
xd
18:11
ya probably stupid then
Avatar
@fokkonaut where?
Avatar
ChillerDragon 2019-05-01 18:11:22Z
gamecore
18:11
gameworld
18:11
xd
18:11
he just wrote it
Avatar
oh, nvm
18:11
it was a function by me wtf
Avatar
ChillerDragon 2019-05-01 18:11:59Z
xxxxxxxxxxxxxD
Avatar
im st00pid
18:12
@Learath2 i assume its okay to use GameWorld() instead of GameServer()->m_World. from character.cpp?
Avatar
Look at it's definition @fokkonaut ofc that's always safe
Avatar
ChillerDragon 2019-05-01 18:13:06Z
oh also tested on windows
18:13
latest ddnet
18:13
dummys are broken in vanilla 0.6.5
Avatar
Actually there is a function in CGameWorld that does that
18:13
it's by oy 😛
Avatar
GameServer()->m_World.m_Core.m_apCharacters[m_pPlayer->GetCID()] = 0; is in character.cpp, should be okay to use m_Core = 0;?
Avatar
Dummys get really glitchy on latest vanilla. Probably they can't handle the anti spoof. Graphic bugs connection problems and falling through walls -.-
Avatar
close the bug
18:15
no one uses dummyo n vanilla
Avatar
ChillerDragon 2019-05-01 18:15:14Z
i do
troll 1
Avatar
its useless
Avatar
ChillerDragon 2019-05-01 18:15:17Z
for testing
18:15
and if its not working the connect dummy button should atleast be hidden in vanilla
18:15
since it forces the player to reconnect
Avatar
ur so annoying with vanilla
Avatar
use vanilla client for vanilla
Avatar
ChillerDragon 2019-05-01 18:16:18Z
yes sure switching client all the time xd
Avatar
@Learath2
Avatar
@fokkonaut I don't know
18:17
ofc not
18:18
Look at the definitions instead of asking me
18:19
CGameworld.m_Core is the CWorldCore, CCharacter.m_Core is CCharacterCore
Avatar
but it leads to m_apCharacters, which is a CaharacterCore, just as m_Core
Avatar
it sets a pointer to this characters core to 0
18:47
not this characters core to 0
Avatar
I figured out what's wrong with the tee colors, I'm lightening it twice :/
19:30
dunno a good way to fix it though
19:36
@heinrich5991 have a minute? 😛
Avatar
not really
19:37
what's it about?
Avatar
Now that I store colors accurately, I have to lighten colors when reading from the config, but I also have to lighten colors I get from the server
19:38
so I end up lightening twice
19:38
well if you don't have a minute no point explaining 🙂
Avatar
5d0a1c8 Unlighten colors when sending to server - Learath2 ca888c5 Lighten when rendering the teeselector aswell - Learath2
Avatar
@deen any advice?
20:12
I'm starting to think maybe I didn't make anything better with this whole pr :/
Avatar
Why did you even start? I mean what was your idea behind it
Avatar
I wanted to implement a proper color picker for the tees, but there were color functions everywhere
Avatar
What does it mean, everyhwere?
Avatar
like color.h had some, CGameClient had some
Avatar
nah, I think your PR makes things better 🙂
Avatar
the editor had its own
Avatar
And how is it right now?
Avatar
I think there were 3 implementations of HslToRgb
Avatar
b86c457 Remember whether a color is lit or not - Learath2
Avatar
I'll stop pushing to master now, I think this works
20:36
dont you test your stuff?
Avatar
I do, some bugs like these aren't very apparent
20:37
like in this case, the colors got lighter every time you restarted the client
Avatar
ah yea
Avatar
when testing I usually restart once or twice
Avatar
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
Avatar
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
Avatar
I am using pChr->Core()-> here, is that ok?
Avatar
I couldn't come up with something cleaner :/
20:42
@fokkonaut yeah looks okay
20:42
ThatCCharacter::GetCore() looks wrong btw, it seems to return a copy of the core
20:42
idk why that was ever needed
Avatar
Yes, also got confused what its for
Avatar
maybe some prediction blackmagic
Avatar
I dont think so :D
20:43
but maybe
20:45
Ah, found it
20:45
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
Avatar
it's okay I guess @Learath2
Avatar
@fokkonaut GetCore is older then teehistorian, greyfox seems to have added it
Avatar
oh, really?
Avatar
let me introduce you to a very useful tool
20:48
git blame
20:48
in teeworlds it'll always lead you to "copied refactor to trunk" but if it doesn't it's helpful 😛
Avatar
maybe i should have based the color classes on a single int instead of an actual vector
Avatar
Hey @heinrich5991, could you help me some time for the file iterator? :D
Avatar
file iterator?
Avatar
given that I just told @Learath2 that I have no time, probably not right now
Avatar
@Learath2 iterating over files using the callback method
Avatar
@fokkonaut what are you stuck with? You have about 15 minutes before I pass out 😄
Avatar
I cant right now, in bed already :/ But if you could help me tomorrow, it would be cool
Avatar
I'm going to be pretty much off the grid tomorrow, have a couple flights to catch
Avatar
(I need a loop in Gamecontext::OnInit, which goes through some files and changes one line entry per file using this ofstream thing)
Avatar
well I'll have internet at the airports so i can give you a hand if you manage to catch me at the correct time 😛
Avatar
it works for one file, just dont know how to go through all together
Avatar
ofstream is definitely not the teeworlds way, shameful
Avatar
I will try to
21:13
@Learath2 xd what do you recommend
Avatar
std::string CResourceManager::LoadFile(std::string path) { std::ifstream t(path); std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>()); t.close(); return str; } isnt it beutiful
Avatar
NOOOOO
Avatar
dfq xd
Avatar
c++11 way to load files
Avatar
my eyes are bleeding, thanks
Avatar
i like it hto its super simple xd
Avatar
I wonder if the C++ people are even thinking at this point
Avatar
look at that expression, it looks HUGE
Avatar
here comes daily learath rant
Avatar
I don't rant daily
21:15
biweekly at most
Avatar
std::vector<unsigned char> CResourceManager::LoadBinaryFile(std::string path) { std::ifstream t(path, std::ios::binary); return std::vector<unsigned char>(std::istreambuf_iterator<char>(t), {}); } @Learath2 👹
Avatar
keep it away from me
Avatar
yay found a new way to torture u
21:16
xd
Avatar
using namespace std;
Avatar
btw: what is an unsigned variable?
Avatar
it's a variable that doesn't have a sign
Avatar
u dont know that? xd
Avatar
it can only have positive values
Avatar
(and thus doesn't need the sign bit, and thus can hold larger numbers)
Avatar
and it has a more upper limit on what value it can hold
21:19
@fokkonaut read about Ca2
21:19
wait thats the spanish word
21:19
xd
Avatar
Carbonic anhydrase?
Avatar
Two's complement
Avatar
makes more sense
21:19
in spanish is "complemento a dos"
Avatar
@Ryozuki DoSer
Avatar
complemento a due in italian
Avatar
@heinrich5991 wat xd
Avatar
wait, what happens if an integer is 100k big? i mean can it hold this big Numbers?
Avatar
100k big?
Avatar
it overflows
Avatar
what does that mean
Avatar
if your number is too large for your type it overflows
21:22
if a signed integer overflows it's undefined behaviour
21:22
if an unsigned one overflows it wraps around (goes back to 0)
Avatar
and how to use big numbers then xd
Avatar
use a long, or a long long, or an arbitrary precision math library
Avatar
u dont need numbers that high usually
Avatar
or code your own arbitrary precision math library
Avatar
+2147483647 is the max int for c+
21:23
+?*
Avatar
unsigned long long = 18446744073709551615
Avatar
No, that's the minimum allowed
21:24
The standard only tells you how big it has to be at the least
Avatar
The actual implementation is allowed to make it as big as it wants
21:24
<climits> tells you how big each type is
Avatar
u cant have unlimited things in computers (for now)
21:25
u will run out of memory
Avatar
at which point you can write to disk, and after you run out of that you can write to an amazon S3 bucket \o/
Avatar
Looked through character/core and tried to add those of the remaining variables that would be useful to have (as suggested in #1659). This adds flags for available weapons, strong/weak id, number of jumps, and the currently active tele checkpoint (which would be needed for tele prediction when/if it is added).
Exported 254 message(s)