mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Only use individual character flags for collision when ddnetchar is available
This commit is contained in:
parent
03fbb9f423
commit
984352dd00
|
@ -2217,6 +2217,13 @@ void CGameClient::UpdatePrediction()
|
||||||
else
|
else
|
||||||
m_GameWorld.TuningList()[TuneZone] = m_GameWorld.m_Core.m_Tuning[g_Config.m_ClDummy] = m_Tuning[g_Config.m_ClDummy];
|
m_GameWorld.TuningList()[TuneZone] = m_GameWorld.m_Core.m_Tuning[g_Config.m_ClDummy] = m_Tuning[g_Config.m_ClDummy];
|
||||||
|
|
||||||
|
// if ddnetcharacter is available, ignore server-wide tunings for hook and collision
|
||||||
|
if(m_Snap.m_aCharacters[m_Snap.m_LocalClientID].m_HasExtendedData)
|
||||||
|
{
|
||||||
|
m_GameWorld.m_Tuning[g_Config.m_ClDummy].m_PlayerCollision = 1;
|
||||||
|
m_GameWorld.m_Tuning[g_Config.m_ClDummy].m_PlayerHooking = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// restore characters from previously saved ones if they temporarily left the snapshot
|
// restore characters from previously saved ones if they temporarily left the snapshot
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
if(m_aLastWorldCharacters[i].IsAlive() && m_Snap.m_aCharacters[i].m_Active && !m_GameWorld.GetCharacterByID(i))
|
if(m_aLastWorldCharacters[i].IsAlive() && m_Snap.m_aCharacters[i].m_Active && !m_GameWorld.GetCharacterByID(i))
|
||||||
|
|
|
@ -559,6 +559,9 @@ void CCharacterCore::ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet)
|
||||||
m_NoHookHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HOOK;
|
m_NoHookHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HOOK;
|
||||||
m_Super = pObjDDNet->m_Flags & CHARACTERFLAG_SUPER;
|
m_Super = pObjDDNet->m_Flags & CHARACTERFLAG_SUPER;
|
||||||
|
|
||||||
|
m_Hook = !m_NoHookHit;
|
||||||
|
m_Collision = !m_NoCollision;
|
||||||
|
|
||||||
// Endless
|
// Endless
|
||||||
m_EndlessHook = pObjDDNet->m_Flags & CHARACTERFLAG_ENDLESS_HOOK;
|
m_EndlessHook = pObjDDNet->m_Flags & CHARACTERFLAG_ENDLESS_HOOK;
|
||||||
m_EndlessJump = pObjDDNet->m_Flags & CHARACTERFLAG_ENDLESS_JUMP;
|
m_EndlessJump = pObjDDNet->m_Flags & CHARACTERFLAG_ENDLESS_JUMP;
|
||||||
|
|
Loading…
Reference in a new issue