fix: fix acquire target action
This commit is contained in:
@@ -42,17 +42,16 @@ namespace Interlude
|
|||||||
auto target = m_NetworkHandler.GetUser(objectId);
|
auto target = m_NetworkHandler.GetUser(objectId);
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
if (target->objectId == objectId) {
|
auto currentTargetId = 0;
|
||||||
auto hero = m_NetworkHandler.GetHero();
|
auto hero = m_NetworkHandler.GetHero();
|
||||||
// Reset target
|
if (hero && hero->pawn && hero->pawn->lineagePlayerController) {
|
||||||
if (hero)
|
currentTargetId = hero->pawn->lineagePlayerController->targetObjectId;
|
||||||
{
|
|
||||||
m_NetworkHandler.Action(hero->objectId, hero->pawn->Location, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (currentTargetId != objectId) {
|
||||||
m_NetworkHandler.Action(objectId, target->pawn->Location, 0);
|
m_NetworkHandler.Action(objectId, target->pawn->Location, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Attack(int objectId) const override
|
void Attack(int objectId) const override
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user