Remove dead code and obsolete TODO

It seems unlikely we that would want to introduce a variable to tweak the hook behavior at this point, so the TODO is removed.
This commit is contained in:
Robert Müller 2024-07-09 22:02:06 +02:00
parent 8e83049054
commit aeee2f561d
2 changed files with 1 additions and 11 deletions

View file

@ -332,8 +332,6 @@ void CCharacterCore::Tick(bool UseInput, bool DoDeferredTick)
int teleNr = 0;
int Hit = m_pCollision->IntersectLineTeleHook(m_HookPos, NewPos, &NewPos, 0, &teleNr);
// m_NewHook = false;
if(Hit)
{
if(Hit == TILE_NOHOOK)
@ -418,10 +416,6 @@ void CCharacterCore::Tick(bool UseInput, bool DoDeferredTick)
m_HookState = HOOK_RETRACTED;
m_HookPos = m_Pos;
}
// keep players hooked for a max of 1.5sec
// if(Server()->Tick() > hook_tick+(Server()->TickSpeed()*3)/2)
// release_hooked();
}
// don't do this hook routine when we are already hooked to a player
@ -471,9 +465,6 @@ void CCharacterCore::TickDeferred()
if(!pCharCore)
continue;
// player *p = (player*)ent;
// if(pCharCore == this) // || !(p->flags&FLAG_ALIVE)
if(pCharCore == this || (m_Id != -1 && !m_pTeams->CanCollide(m_Id, i)))
continue; // make sure that we don't nudge our self
@ -505,7 +496,7 @@ void CCharacterCore::TickDeferred()
// handle hook influence
if(!m_HookHitDisabled && m_HookedPlayer == i && m_Tuning.m_PlayerHooking)
{
if(Distance > PhysicalSize() * 1.50f) // TODO: fix tweakable variable
if(Distance > PhysicalSize() * 1.50f)
{
float HookAccel = m_Tuning.m_HookDragAccel * (Distance / m_Tuning.m_HookLength);
float DragSpeed = m_Tuning.m_HookDragSpeed;

View file

@ -120,7 +120,6 @@ enum
COREEVENT_HOOK_ATTACH_GROUND = 0x10,
COREEVENT_HOOK_HIT_NOHOOK = 0x20,
COREEVENT_HOOK_RETRACT = 0x40,
// COREEVENT_HOOK_TELE=0x80,
};
// show others values - do not change them