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
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)CCharacterCore::Tick()
it is
m_JumpedTotal = 1;
m_JumpedTotal = 0;
The first m_JumpedTotal = 1;
is never read. It does not mean that the member variable is not used at all.