@@ -413,7 +413,7 @@ CClientGame::~CClientGame()
413413 m_bBeingDeleted = true ;
414414 // Remove active projectile references to local player
415415 if (auto pLocalPlayer = g_pClientGame->GetLocalPlayer ())
416- g_pGame->GetProjectileInfo ()->RemoveEntityReferences (pLocalPlayer->GetGameEntity ());
416+ g_pGame->GetProjectileInfo ()->RemoveEntityReferences (pLocalPlayer->GetGameEntity ());
417417
418418 // Stop all explosions. Unfortunately this doesn't fix the crash
419419 // if a vehicle is destroyed while it explodes.
@@ -1028,7 +1028,7 @@ void CClientGame::DoPulsePostFrame()
10281028 }
10291029
10301030 auto taskManager = pLocalPlayer->GetTaskManager ();
1031- auto task = taskManager->GetActiveTask ();
1031+ auto task = taskManager->GetActiveTask ();
10321032 auto pVehicle = pLocalPlayer->GetOccupiedVehicle ();
10331033 bool useZoneName = true ;
10341034
@@ -1082,7 +1082,7 @@ void CClientGame::DoPulsePostFrame()
10821082
10831083 discordState = taskState.strState ;
10841084 useZoneName = taskState.bUseZone ;
1085- }
1085+ }
10861086
10871087 if (useZoneName)
10881088 {
@@ -2338,10 +2338,11 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
23382338 CMatrix cameraMatrix;
23392339 camera->GetMatrix (&cameraMatrix);
23402340 CVector origin = cameraMatrix.vPos ;
2341-
2342- CVector target, screen (screenX, screenY, CLICK_RAY_DEPTH);
2341+
2342+ CVector target;
2343+ CVector screen (screenX, screenY, CLICK_RAY_DEPTH);
23432344 g_pCore->GetGraphics ()->CalcWorldCoors (&screen, &target);
2344-
2345+
23452346 CVector rayDirection = target - origin;
23462347 rayDirection.Normalize ();
23472348
@@ -2352,21 +2353,21 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
23522353 {
23532354 if (!marker || !marker->IsStreamedIn () || !marker->IsVisible ())
23542355 continue ;
2355-
2356+
23562357 if (!marker->IsClientSideOnScreen ())
23572358 continue ;
23582359
23592360 CSphere boundingSphere = marker->GetWorldBoundingSphere ();
2360-
2361+
23612362 CVector toSphere = boundingSphere.vecPosition - origin;
23622363 float projection = toSphere.DotProduct (&rayDirection);
2363-
2364+
23642365 if (projection <= 0 .0f )
23652366 continue ;
2366-
2367+
23672368 CVector closestPoint = origin + rayDirection * projection;
23682369 float distanceToRay = (boundingSphere.vecPosition - closestPoint).Length ();
2369-
2370+
23702371 if (distanceToRay <= boundingSphere.fRadius && projection < closestDistance)
23712372 {
23722373 closestDistance = projection;
@@ -2376,7 +2377,7 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
23762377
23772378 if (closestMarker)
23782379 distance = closestDistance;
2379-
2380+
23802381 return closestMarker;
23812382}
23822383
@@ -2448,7 +2449,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
24482449 CVector vecCollision;
24492450 ElementID CollisionEntityID = INVALID_ELEMENT_ID;
24502451 CClientEntity* collisionEntity = nullptr ;
2451-
2452+
24522453 if (bCollision && pColPoint)
24532454 {
24542455 vecCollision = pColPoint->GetPosition ();
@@ -2517,7 +2518,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
25172518 {
25182519 CVector markerPosition;
25192520 clickedMarker->GetPosition (markerPosition);
2520-
2521+
25212522 CLuaArguments MarkerArguments;
25222523 MarkerArguments.PushString (szButton);
25232524 MarkerArguments.PushString (szState);
0 commit comments