@@ -413,7 +413,7 @@ CClientGame::~CClientGame()
413
413
m_bBeingDeleted = true ;
414
414
// Remove active projectile references to local player
415
415
if (auto pLocalPlayer = g_pClientGame->GetLocalPlayer ())
416
- g_pGame->GetProjectileInfo ()->RemoveEntityReferences (pLocalPlayer->GetGameEntity ());
416
+ g_pGame->GetProjectileInfo ()->RemoveEntityReferences (pLocalPlayer->GetGameEntity ());
417
417
418
418
// Stop all explosions. Unfortunately this doesn't fix the crash
419
419
// if a vehicle is destroyed while it explodes.
@@ -1028,7 +1028,7 @@ void CClientGame::DoPulsePostFrame()
1028
1028
}
1029
1029
1030
1030
auto taskManager = pLocalPlayer->GetTaskManager ();
1031
- auto task = taskManager->GetActiveTask ();
1031
+ auto task = taskManager->GetActiveTask ();
1032
1032
auto pVehicle = pLocalPlayer->GetOccupiedVehicle ();
1033
1033
bool useZoneName = true ;
1034
1034
@@ -1082,7 +1082,7 @@ void CClientGame::DoPulsePostFrame()
1082
1082
1083
1083
discordState = taskState.strState ;
1084
1084
useZoneName = taskState.bUseZone ;
1085
- }
1085
+ }
1086
1086
1087
1087
if (useZoneName)
1088
1088
{
@@ -2338,10 +2338,11 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
2338
2338
CMatrix cameraMatrix;
2339
2339
camera->GetMatrix (&cameraMatrix);
2340
2340
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);
2343
2344
g_pCore->GetGraphics ()->CalcWorldCoors (&screen, &target);
2344
-
2345
+
2345
2346
CVector rayDirection = target - origin;
2346
2347
rayDirection.Normalize ();
2347
2348
@@ -2352,21 +2353,21 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
2352
2353
{
2353
2354
if (!marker || !marker->IsStreamedIn () || !marker->IsVisible ())
2354
2355
continue ;
2355
-
2356
+
2356
2357
if (!marker->IsClientSideOnScreen ())
2357
2358
continue ;
2358
2359
2359
2360
CSphere boundingSphere = marker->GetWorldBoundingSphere ();
2360
-
2361
+
2361
2362
CVector toSphere = boundingSphere.vecPosition - origin;
2362
2363
float projection = toSphere.DotProduct (&rayDirection);
2363
-
2364
+
2364
2365
if (projection <= 0 .0f )
2365
2366
continue ;
2366
-
2367
+
2367
2368
CVector closestPoint = origin + rayDirection * projection;
2368
2369
float distanceToRay = (boundingSphere.vecPosition - closestPoint).Length ();
2369
-
2370
+
2370
2371
if (distanceToRay <= boundingSphere.fRadius && projection < closestDistance)
2371
2372
{
2372
2373
closestDistance = projection;
@@ -2376,7 +2377,7 @@ CClientMarker* CClientGame::CheckMarkerClick(float screenX, float screenY, float
2376
2377
2377
2378
if (closestMarker)
2378
2379
distance = closestDistance;
2379
-
2380
+
2380
2381
return closestMarker;
2381
2382
}
2382
2383
@@ -2448,7 +2449,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
2448
2449
CVector vecCollision;
2449
2450
ElementID CollisionEntityID = INVALID_ELEMENT_ID;
2450
2451
CClientEntity* collisionEntity = nullptr ;
2451
-
2452
+
2452
2453
if (bCollision && pColPoint)
2453
2454
{
2454
2455
vecCollision = pColPoint->GetPosition ();
@@ -2517,7 +2518,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
2517
2518
{
2518
2519
CVector markerPosition;
2519
2520
clickedMarker->GetPosition (markerPosition);
2520
-
2521
+
2521
2522
CLuaArguments MarkerArguments;
2522
2523
MarkerArguments.PushString (szButton);
2523
2524
MarkerArguments.PushString (szState);
0 commit comments