Skip to content

Commit 4799ded

Browse files
committed
removes obsolete code, adds comments for readability
1 parent 5529abc commit 4799ded

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/game/logic/ai/aigroup.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,14 +1641,18 @@ void Get_Helicopter_Offset(Coord3D &pos, int count)
16411641
}
16421642
}
16431643

1644+
/**
1645+
Group_Tighten_To_Position - Performs tightening of the group members towards a target position.
1646+
This method iterates over the group members, calculates their distances to the target position,
1647+
and sorts them in ascending order based on the squared distance. It then applies tightening
1648+
behavior to each member based on the specified conditions.
1649+
1650+
@param target_pos The target position to tighten towards.
1651+
@param append A flag indicating whether to append to existing waypoints or not.
1652+
@param cmd_source The source of the command.
1653+
*/
16441654
void AIGroup::Group_Tighten_To_Position(const Coord3D *target_pos, bool append, CommandSourceType cmd_source)
16451655
{
1646-
if (cmd_source == COMMANDSOURCE_PLAYER && g_theWriteableGlobalData->m_groupMoveClickToGatherAreaFactor > 0.0f) {
1647-
Coord2D min;
1648-
Coord2D max;
1649-
Coord3D center;
1650-
Get_Min_Max_And_Center(&min, &max, &center);
1651-
}
16521656

16531657
MemoryPoolObjectHolder holder(nullptr);
16541658
SimpleObjectIterator *iter = new SimpleObjectIterator();

0 commit comments

Comments
 (0)