mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
removed hookdir from snapshot data
This commit is contained in:
parent
09ef13b9b9
commit
b99368e3d7
|
@ -147,8 +147,6 @@ Objects = [
|
|||
|
||||
NetIntAny("m_HookX"),
|
||||
NetIntAny("m_HookY"),
|
||||
NetIntAny("m_HookDx"),
|
||||
NetIntAny("m_HookDy"),
|
||||
]),
|
||||
|
||||
NetObject("Character:CharacterCore", [
|
||||
|
|
|
@ -150,7 +150,9 @@ void CCharacterCore::Tick(bool UseInput)
|
|||
{
|
||||
m_HookedPlayer = -1;
|
||||
m_HookState = HOOK_IDLE;
|
||||
m_HookPos = m_Pos;
|
||||
m_HookPos = vec2(0,0);
|
||||
m_HookDir = vec2(0,0);
|
||||
m_HookTick = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -410,8 +412,6 @@ void CCharacterCore::Write(CNetObj_CharacterCore *pObjCore)
|
|||
pObjCore->m_HookTick = m_HookTick;
|
||||
pObjCore->m_HookX = round(m_HookPos.x);
|
||||
pObjCore->m_HookY = round(m_HookPos.y);
|
||||
pObjCore->m_HookDx = round(m_HookDir.x*256.0f);
|
||||
pObjCore->m_HookDy = round(m_HookDir.y*256.0f);
|
||||
pObjCore->m_HookedPlayer = m_HookedPlayer;
|
||||
pObjCore->m_Jumped = m_Jumped;
|
||||
pObjCore->m_Direction = m_Direction;
|
||||
|
@ -428,8 +428,7 @@ void CCharacterCore::Read(const CNetObj_CharacterCore *pObjCore)
|
|||
m_HookTick = pObjCore->m_HookTick;
|
||||
m_HookPos.x = pObjCore->m_HookX;
|
||||
m_HookPos.y = pObjCore->m_HookY;
|
||||
m_HookDir.x = pObjCore->m_HookDx/256.0f;
|
||||
m_HookDir.y = pObjCore->m_HookDy/256.0f;
|
||||
m_HookDir = normalize(m_HookPos-m_Pos);
|
||||
m_HookedPlayer = pObjCore->m_HookedPlayer;
|
||||
m_Jumped = pObjCore->m_Jumped;
|
||||
m_Direction = pObjCore->m_Direction;
|
||||
|
|
Loading…
Reference in a new issue