mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
revert change of dragger range
This commit is contained in:
parent
8d644d0638
commit
9180fa70e4
|
@ -63,7 +63,8 @@ void CDragger::LookForPlayersToDrag()
|
||||||
CCharacter *pPlayersInRange[MAX_CLIENTS];
|
CCharacter *pPlayersInRange[MAX_CLIENTS];
|
||||||
mem_zero(pPlayersInRange, sizeof(pPlayersInRange));
|
mem_zero(pPlayersInRange, sizeof(pPlayersInRange));
|
||||||
|
|
||||||
int NumPlayersInRange = GameServer()->m_World.FindEntities(m_Pos, g_Config.m_SvDraggerRange,
|
int NumPlayersInRange = GameServer()->m_World.FindEntities(m_Pos,
|
||||||
|
g_Config.m_SvDraggerRange - CCharacter::ms_PhysSize,
|
||||||
(CEntity **)pPlayersInRange, MAX_CLIENTS, CGameWorld::ENTTYPE_CHARACTER);
|
(CEntity **)pPlayersInRange, MAX_CLIENTS, CGameWorld::ENTTYPE_CHARACTER);
|
||||||
|
|
||||||
// The closest player (within range) in a team is selected as the target
|
// The closest player (within range) in a team is selected as the target
|
||||||
|
|
|
@ -46,8 +46,7 @@ void CDraggerBeam::Tick()
|
||||||
!GameServer()->Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
|
!GameServer()->Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
|
||||||
// This check is necessary because the check in CDragger::LookForPlayersToDrag only happens every 150ms
|
// This check is necessary because the check in CDragger::LookForPlayersToDrag only happens every 150ms
|
||||||
if(!IsReachable ||
|
if(!IsReachable ||
|
||||||
distance(pTarget->m_Pos, m_Pos) >= g_Config.m_SvDraggerRange + pTarget->GetProximityRadius() ||
|
distance(pTarget->m_Pos, m_Pos) >= g_Config.m_SvDraggerRange || !pTarget->IsAlive())
|
||||||
!pTarget->IsAlive())
|
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue