mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #4630
4630: Fix two bugs introduced by the dummy refactoring in #4623 r=def- a=heinrich5991 Fixes #4629. CC `@fokkonaut` CC #4623 ## 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 if it works standalone, system.c especially - [ ] 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/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
commit
590f29944c
|
@ -1812,7 +1812,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aBuf);
|
||||
}
|
||||
}
|
||||
else if(!Dummy && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_RCON_CMD_ADD)
|
||||
else if(Conn == CONN_MAIN && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_RCON_CMD_ADD)
|
||||
{
|
||||
const char *pName = Unpacker.GetString(CUnpacker::SANITIZE_CC);
|
||||
const char *pHelp = Unpacker.GetString(CUnpacker::SANITIZE_CC);
|
||||
|
@ -1820,7 +1820,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
if(Unpacker.Error() == 0)
|
||||
m_pConsole->RegisterTemp(pName, pParams, CFGFLAG_SERVER, pHelp);
|
||||
}
|
||||
else if(!Dummy && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_RCON_CMD_REM)
|
||||
else if(Conn == CONN_MAIN && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_RCON_CMD_REM)
|
||||
{
|
||||
const char *pName = Unpacker.GetString(CUnpacker::SANITIZE_CC);
|
||||
if(Unpacker.Error() == 0)
|
||||
|
|
|
@ -1573,7 +1573,7 @@ void CGameClient::OnNewSnapshot()
|
|||
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
if(!m_DDRaceMsgSent[i] && m_Snap.m_pLocalInfo)
|
||||
if(m_DDRaceMsgSent[i] || !m_Snap.m_pLocalInfo)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue