Skip to content

Commit

Permalink
attempt to fix too speed bots
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Jul 15, 2011
1 parent 966ecb2 commit 8a02ceb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8815,8 +8815,11 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
{
if(Player* leader = ((Player*)this)->GetPlayerbotAI()->GetLeader())
{
SetSpeedRate(mtype, leader->GetSpeedRate(mtype), forced);
return;
if (leader != ((Player*)this))
{
SetSpeedRate(mtype, leader->GetSpeedRate(mtype), forced);
return;
}
}
}
break;
Expand Down
2 changes: 1 addition & 1 deletion src/game/playerbot/PlayerbotAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef std::map<ObjectGuid, BattleGroundPlayer> BattleGroundPlayerMap;
#define MAX_DIST_COMBAT_RANGED_TARGET 25.0f
#define MIN_DIST_COMBAT_CAC_TARGET 2.0f
#define MAX_DIST_COMBAT_CAC_TARGET 20.0f
#define MAX_RANGE_MOVEMENT 500.0f
#define MAX_RANGE_MOVEMENT 250.0f

enum RacialTraits
{
Expand Down

0 comments on commit 8a02ceb

Please sign in to comment.