Skip to content

Commit 95b00a1

Browse files
committed
Clarify comment about copying coordinates in path following cases
1 parent 1f1a897 commit 95b00a1

File tree

1 file changed

+2
-2
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update

1 file changed

+2
-2
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,7 +2682,7 @@ void AIUpdateInterface::aiDoCommand(const AICommandParms* parms)
26822682
break;
26832683
case AICMD_FOLLOW_PATH:
26842684
{
2685-
// Keep AICommandParms const; use a local copy of the coordinates when following the path.
2685+
// Copy coordinates to a local vector since privateFollowPath requires a non-const pointer.
26862686
std::vector<Coord3D> coords = parms->m_coords;
26872687
privateFollowPath(&coords, parms->m_obj, parms->m_cmdSource, FALSE);
26882688
break;
@@ -2692,7 +2692,7 @@ void AIUpdateInterface::aiDoCommand(const AICommandParms* parms)
26922692
break;
26932693
case AICMD_FOLLOW_EXITPRODUCTION_PATH:
26942694
{
2695-
// Keep AICommandParms const; use a local copy of the coordinates when following the exit path.
2695+
// Copy coordinates to a local vector since privateFollowPath requires a non-const pointer.
26962696
std::vector<Coord3D> coords = parms->m_coords;
26972697
privateFollowPath(&coords, parms->m_obj, parms->m_cmdSource, TRUE);
26982698
break;

0 commit comments

Comments
 (0)