Minor code cleanup in dragger.cpp

This commit is contained in:
def 2020-11-04 23:09:22 +01:00
parent 5a9d93f160
commit 2c3000ba81

View file

@ -57,10 +57,9 @@ void CDragger::Move()
continue;
}
int Res =
m_NW ? GameServer()->Collision()->IntersectNoLaserNW(m_Pos,
Temp->m_Pos, 0, 0) :
GameServer()->Collision()->IntersectNoLaser(m_Pos,
Temp->m_Pos, 0, 0);
m_NW ?
GameServer()->Collision()->IntersectNoLaserNW(m_Pos, Temp->m_Pos, 0, 0) :
GameServer()->Collision()->IntersectNoLaser(m_Pos, Temp->m_Pos, 0, 0);
if(Res == 0)
{
@ -81,9 +80,10 @@ void CDragger::Move()
}
if(!m_Target)
{
m_Target = Id != -1 ? TempEnts[Id] : 0;
if(m_Target)
}
else
{
for(auto &SoloEnt : m_SoloEnts)
{
@ -95,8 +95,9 @@ void CDragger::Move()
void CDragger::Drag()
{
if(m_Target)
{
if(!m_Target)
return;
CCharacter *Target = m_Target;
for(int i = -1; i < MAX_CLIENTS; i++)
@ -129,7 +130,6 @@ void CDragger::Drag()
}
}
}
}
void CDragger::Reset()
{