Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2889,11 +2889,12 @@ void AIGroup::groupDoCommandButton( const CommandButton *commandButton, CommandS
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButton( commandButton, cmdSource );
}
Expand All @@ -2909,11 +2910,12 @@ void AIGroup::groupDoCommandButtonAtPosition( const CommandButton *commandButton
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButtonAtPosition( commandButton, pos, cmdSource );
}
Expand All @@ -2928,11 +2930,12 @@ void AIGroup::groupDoCommandButtonAtObject( const CommandButton *commandButton,
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButtonAtObject( commandButton, obj, cmdSource );
}
Expand Down
12 changes: 8 additions & 4 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2962,11 +2962,12 @@ void AIGroup::groupDoCommandButton( const CommandButton *commandButton, CommandS
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButton( commandButton, cmdSource );
}
Expand All @@ -2982,11 +2983,12 @@ void AIGroup::groupDoCommandButtonAtPosition( const CommandButton *commandButton
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButtonAtPosition( commandButton, pos, cmdSource );
}
Expand All @@ -3001,11 +3003,12 @@ void AIGroup::groupDoCommandButtonUsingWaypoints( const CommandButton *commandBu
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButtonUsingWaypoints( commandButton, way, cmdSource );
}
Expand All @@ -3020,11 +3023,12 @@ void AIGroup::groupDoCommandButtonAtObject( const CommandButton *commandButton,
std::list<Object *>::iterator i;
Object *source;

for( i = m_memberList.begin(); i != m_memberList.end(); ++i )
for( i = m_memberList.begin(); i != m_memberList.end(); /* empty */ )
{

// get object
source = *i;
++i; // Advance iterator before the call that might destroy the object

source->doCommandButtonAtObject( commandButton, obj, cmdSource );
}
Expand Down
Loading