Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Core/GameEngine/Source/Common/System/Radar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,7 @@ Bool Radar::tryEvent( RadarEventType event, const Coord3D *pos )
{

// get distance from our new event location to this event location in 2D
Real distSquared = m_event[ i ].worldLoc.x - pos->x * m_event[ i ].worldLoc.x - pos->x +
m_event[ i ].worldLoc.y - pos->y * m_event[ i ].worldLoc.y - pos->y;
const Real distSquared = sqr(m_event[ i ].worldLoc.x - pos->x) + sqr(m_event[ i ].worldLoc.y - pos->y);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces instead of tabs for indentation

The new line uses 6 spaces for indentation, while the rest of the file (including immediately surrounding lines like the comment on line 1188 and the if block on line 1191) uses tabs. This creates a subtle whitespace inconsistency.

Suggested change
const Real distSquared = sqr(m_event[ i ].worldLoc.x - pos->x) + sqr(m_event[ i ].worldLoc.y - pos->y);
const Real distSquared = sqr(m_event[ i ].worldLoc.x - pos->x) + sqr(m_event[ i ].worldLoc.y - pos->y);
Prompt To Fix With AI
This is a comment left during a code review.
Path: Core/GameEngine/Source/Common/System/Radar.cpp
Line: 1189

Comment:
**Spaces instead of tabs for indentation**

The new line uses 6 spaces for indentation, while the rest of the file (including immediately surrounding lines like the comment on line 1188 and the `if` block on line 1191) uses tabs. This creates a subtle whitespace inconsistency.

```suggestion
			const Real distSquared = sqr(m_event[ i ].worldLoc.x - pos->x) + sqr(m_event[ i ].worldLoc.y - pos->y);
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


if( distSquared <= closeEnoughDistanceSq )
{
Expand Down
Loading