Skip to content

Commit eb7bde5

Browse files
committed
Refactor
1 parent 98a9267 commit eb7bde5

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
24472447

24482448
CVector vecCollision;
24492449
ElementID CollisionEntityID = INVALID_ELEMENT_ID;
2450-
CClientEntity* pCollisionEntity = nullptr;
2450+
CClientEntity* collisionEntity = nullptr;
24512451

24522452
if (bCollision && pColPoint)
24532453
{
@@ -2458,7 +2458,7 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
24582458
CClientEntity* pEntity = pPools->GetClientEntity((DWORD*)pGameEntity->GetInterface());
24592459
if (pEntity)
24602460
{
2461-
pCollisionEntity = pEntity;
2461+
collisionEntity = pEntity;
24622462
if (!pEntity->IsLocalEntity())
24632463
CollisionEntityID = pEntity->GetID();
24642464
}
@@ -2511,23 +2511,23 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
25112511
if (std::isnan(vecCollision.fZ))
25122512
vecCollision.fZ = 0;
25132513

2514-
float fMarkerDistance = 0.0f;
2515-
CClientMarker* pClickedMarker = CheckMarkerClick(static_cast<float>(iX), static_cast<float>(iY), fMarkerDistance);
2516-
if (pClickedMarker)
2514+
float markerDistance = 0.0f;
2515+
CClientMarker* clickedMarker = CheckMarkerClick(static_cast<float>(iX), static_cast<float>(iY), markerDistance);
2516+
if (clickedMarker)
25172517
{
2518-
CVector vecMarkerPosition;
2519-
pClickedMarker->GetPosition(vecMarkerPosition);
2518+
CVector markerPosition;
2519+
clickedMarker->GetPosition(markerPosition);
25202520

25212521
CLuaArguments MarkerArguments;
25222522
MarkerArguments.PushString(szButton);
25232523
MarkerArguments.PushString(szState);
25242524
MarkerArguments.PushNumber(vecCursorPosition.fX);
25252525
MarkerArguments.PushNumber(vecCursorPosition.fY);
2526-
MarkerArguments.PushNumber(vecMarkerPosition.fX);
2527-
MarkerArguments.PushNumber(vecMarkerPosition.fY);
2528-
MarkerArguments.PushNumber(vecMarkerPosition.fZ);
2529-
MarkerArguments.PushNumber(fMarkerDistance);
2530-
pClickedMarker->CallEvent("onClientMarkerClick", MarkerArguments, false);
2526+
MarkerArguments.PushNumber(markerPosition.fX);
2527+
MarkerArguments.PushNumber(markerPosition.fY);
2528+
MarkerArguments.PushNumber(markerPosition.fZ);
2529+
MarkerArguments.PushNumber(markerDistance);
2530+
clickedMarker->CallEvent("onClientMarkerClick", MarkerArguments, false);
25312531
}
25322532

25332533
// Call the event for the client
@@ -2539,8 +2539,8 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
25392539
Arguments.PushNumber(vecCollision.fX);
25402540
Arguments.PushNumber(vecCollision.fY);
25412541
Arguments.PushNumber(vecCollision.fZ);
2542-
if (pCollisionEntity)
2543-
Arguments.PushElement(pCollisionEntity);
2542+
if (collisionEntity)
2543+
Arguments.PushElement(collisionEntity);
25442544
else
25452545
Arguments.PushBoolean(false);
25462546
m_pRootEntity->CallEvent("onClientClick", Arguments, false);
@@ -2583,8 +2583,8 @@ bool CClientGame::ProcessMessageForCursorEvents(HWND hwnd, UINT uMsg, WPARAM wPa
25832583
DoubleClickArguments.PushNumber(vecCollision.fX);
25842584
DoubleClickArguments.PushNumber(vecCollision.fY);
25852585
DoubleClickArguments.PushNumber(vecCollision.fZ);
2586-
if (pCollisionEntity)
2587-
DoubleClickArguments.PushElement(pCollisionEntity);
2586+
if (collisionEntity)
2587+
DoubleClickArguments.PushElement(collisionEntity);
25882588
else
25892589
DoubleClickArguments.PushBoolean(false);
25902590
m_pRootEntity->CallEvent("onClientDoubleClick", DoubleClickArguments, false);

0 commit comments

Comments
 (0)