Skip to content

Commit 40cf9e1

Browse files
authored
Position follow bots in rear arc behind master (#294)
1 parent 1c95d30 commit 40cf9e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ float MovementAction::GetFollowAngle()
154154

155155
if ( ref->getSource() == bot)
156156
{
157-
return 2 * M_PI / (group->GetMembersCount() -1) * index;
157+
int botCount = (int)group->GetMembersCount() - 1;
158+
return M_PI / 2.0f + M_PI * (index - 1) / std::max(botCount - 1, 1);
158159
}
159160

160161
index++;

0 commit comments

Comments
 (0)