Guild icon
DDraceNetwork
Development / bugs
Report client & server bugs, especially but not limited to release candidates.
Between 2022-04-26 00:00:00Z and 2022-04-27 00:00:00Z
Avatar
Avatar
Kaffeine
Weird work with m_JumpedTotal in CCharacterCore::Tick(): https://github.com/ddnet/ddnet/blob/1dea02d4562ef6028db47da1a3fb3fd0c4efdfc8/src/game/gamecore.cpp#L156-L211 if(m_Input.m_Jump) { // ... if(Grounded) { m_JumpedTotal = 1; } // ... } // No any read from m_JumpedTotal if(Grounded) { m_JumpedTotal = 0; } I do not know about the intention so I can't propose a fix. If there is no bug then at least m_JumpedTotal = 1; can be removed without behavior changes. (edited)
m_JumpedTotal and m_Jumped needs to be refactored/reworked anyway because it is incorrect if you have 1 jump. Also we have a special case with -1 availible jumps that also creates strange results xD ... But yes your point is correct, the check if you are grounded should be done before the check if you make a ground jump. so that if you do a ground jump m_JumpedTotal is 1 and not 0. But this was always like this xD but we could finaly fix it. Do you want to try fixing it?
08:11
m_JumpedTotal is always one off because of this... It laggs one jump behind because ground jump is not counted. but because of this, you have to care about the other physic logic and not just count ground jump
08:12
😄 It was always like this, so take care to break no physics
Avatar
Avatar
Kaffeine
Weird work with m_JumpedTotal in CCharacterCore::Tick(): https://github.com/ddnet/ddnet/blob/1dea02d4562ef6028db47da1a3fb3fd0c4efdfc8/src/game/gamecore.cpp#L156-L211 if(m_Input.m_Jump) { // ... if(Grounded) { m_JumpedTotal = 1; } // ... } // No any read from m_JumpedTotal if(Grounded) { m_JumpedTotal = 0; } I do not know about the intention so I can't propose a fix. If there is no bug then at least m_JumpedTotal = 1; can be removed without behavior changes. (edited)
If there is no bug then at least m_JumpedTotal = 1; can be removed without behavior changes.
I would prefer the correct value of m_JumpedTotal, so ground jump should also be counted. So please do not just delete m_JumpedTotal = 1; Instead fix the complete logic xD
Avatar
Avatar
APFFF
Only happened once so far: Rendered Video is sped up gameplay, Sound is normal speed. Was rendered after recent Render changes
I can not reproduce it, what version do you use? can you share the demo? I tested it with a demo on 3x speed, sound is correct
Avatar
Avatar
c0d3d3v
If there is no bug then at least m_JumpedTotal = 1; can be removed without behavior changes.
I would prefer the correct value of m_JumpedTotal, so ground jump should also be counted. So please do not just delete m_JumpedTotal = 1; Instead fix the complete logic xD
it is being counted
09:32
also, JumpedTotal is being used in CCharacter
09:33
all correct
Avatar
Avatar
fokkonaut
all correct
no it is not correct, at least not in the predicted code
Avatar
what is incorrect?
Avatar
i never understood why the prediction code is almost a copy paste of the real code
09:36
why didn't they just share it to avoid such problems?
Avatar
Avatar
Chairn
i never understood why the prediction code is almost a copy paste of the real code
to predict it? xD
Avatar
Avatar
Chairn
why didn't they just share it to avoid such problems?
was too complicated on the fly
Avatar
yeah, but you don't need to copy paste it, just makes the interface usable by both
Avatar
not entirely easy
Avatar
well, i guess some data is only server side
Avatar
thats why the charactercore is shared, and the character itself isnt
Avatar
Avatar
Chairn
well, i guess some data is only server side
thats why we predict the missing data xD lol
Avatar
Avatar
fokkonaut
what is incorrect?
I can make a video one moment xD
Avatar
just explain
Avatar
I already explained it
Avatar
where
Avatar
Avatar
c0d3d3v
m_JumpedTotal and m_Jumped needs to be refactored/reworked anyway because it is incorrect if you have 1 jump. Also we have a special case with -1 availible jumps that also creates strange results xD ... But yes your point is correct, the check if you are grounded should be done before the check if you make a ground jump. so that if you do a ground jump m_JumpedTotal is 1 and not 0. But this was always like this xD but we could finaly fix it. Do you want to try fixing it?
just read it
Avatar
Avatar
c0d3d3v
thats why we predict the missing data xD lol
i think my brain turned off this morning
Avatar
Avatar
Chairn
yeah, but you don't need to copy paste it, just makes the interface usable by both
I would also prefer one interface, so that we share the code for server and client. But I also think we have in the client partially also vanilla physic predictions ... so it is not very easy to do that
Avatar
Avatar
c0d3d3v
I can not reproduce it, what version do you use? can you share the demo? I tested it with a demo on 3x speed, sound is correct
Ver 16.0.3 (I think). But as I said, only happened once so far
Avatar
Avatar
APFFF
Only happened once so far: Rendered Video is sped up gameplay, Sound is normal speed. Was rendered after recent Render changes
Jupstar ✪ 2022-04-26 14:26:38Z
if u find a way to reproduce tell us ^^
Avatar
Jupstar ✪ 2022-04-26 14:27:02Z
nice
Exported 32 message(s)