From 210b19042d7e90dd43fedf4f73a610a543027de6 Mon Sep 17 00:00:00 2001 From: Learath Date: Wed, 1 Jun 2022 19:52:19 +0200 Subject: [PATCH] Avoid unnecessary copy leading to crash --- src/game/client/gameclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index d187f33da..f5d368ce6 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -2192,14 +2192,14 @@ int CGameClient::IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, in float Distance = 0.0f; int ClosestID = -1; - CClientData OwnClientData = m_aClients[ownID]; + CClientData &OwnClientData = m_aClients[ownID]; for(int i = 0; i < MAX_CLIENTS; i++) { if(i == ownID) continue; - CClientData cData = m_aClients[i]; + CClientData &cData = m_aClients[i]; if(!cData.m_Active) continue;