fix: fix acquire target action

This commit is contained in:
Иванов Иван 2024-08-08 21:12:24 +02:00
parent c84a086447
commit 38c8a67bfb

View File

@ -42,15 +42,14 @@ 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);
} }
} }