Merge pull request #608 from spdkils/BotXTarget

Adding AutoXTarget for bot owner when hate is added to bot's owner.
This commit is contained in:
Akkadius 2017-04-13 18:20:28 -05:00 committed by GitHub
commit 989a638693

View File

@ -2541,8 +2541,10 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
AddFeignMemory(other->CastToBot()->GetBotOwner()->CastToClient()); AddFeignMemory(other->CastToBot()->GetBotOwner()->CastToClient());
} }
else { else {
if(!hate_list.IsEntOnHateList(other->CastToBot()->GetBotOwner())) if (!hate_list.IsEntOnHateList(other->CastToBot()->GetBotOwner())) {
hate_list.AddEntToHateList(other->CastToBot()->GetBotOwner(), 0, 0, false, true); hate_list.AddEntToHateList(other->CastToBot()->GetBotOwner(), 0, 0, false, true);
other->CastToBot()->GetBotOwner()->CastToClient()->AddAutoXTarget(this);
}
} }
} }
#endif //BOTS #endif //BOTS