mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
Fix some +showhookcoll
This commit is contained in:
parent
182c5aefc9
commit
bf658945a5
|
@ -1286,6 +1286,9 @@ int CGameClient::IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2& NewPos2, in
|
||||||
float Distance = 0.0f;
|
float Distance = 0.0f;
|
||||||
int ClosestID = -1;
|
int ClosestID = -1;
|
||||||
|
|
||||||
|
if (!m_Tuning.m_PlayerHooking)
|
||||||
|
return ClosestID;
|
||||||
|
|
||||||
for (int i=0; i<MAX_CLIENTS; i++)
|
for (int i=0; i<MAX_CLIENTS; i++)
|
||||||
{
|
{
|
||||||
CClientData cData = m_aClients[i];
|
CClientData cData = m_aClients[i];
|
||||||
|
@ -1294,7 +1297,7 @@ int CGameClient::IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2& NewPos2, in
|
||||||
|
|
||||||
vec2 Position = mix(vec2(Prev.m_X, Prev.m_Y), vec2(Player.m_X, Player.m_Y), Client()->IntraGameTick());
|
vec2 Position = mix(vec2(Prev.m_X, Prev.m_Y), vec2(Player.m_X, Player.m_Y), Client()->IntraGameTick());
|
||||||
|
|
||||||
if (!cData.m_Active || cData.m_Team == TEAM_SPECTATORS || i == ownID || !m_Teams.CanCollide(i, ownID) || !m_PredictedChar.m_Collision)
|
if (!cData.m_Active || cData.m_Team == TEAM_SPECTATORS || i == ownID || !m_Teams.SameTeam(i, ownID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
vec2 ClosestPoint = closest_point_on_line(HookPos, NewPos, Position);
|
vec2 ClosestPoint = closest_point_on_line(HookPos, NewPos, Position);
|
||||||
|
|
Loading…
Reference in a new issue