mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
[Client] Fix assignAttackTarget() not assigning LocalPlayer as target
This commit is contained in:
parent
61cedfa192
commit
6c2bbd6608
@ -59,7 +59,12 @@ Attack *MechanicsHelper::getDedicatedAttack(const MWWorld::Ptr& ptr)
|
||||
|
||||
void MechanicsHelper::assignAttackTarget(Attack* attack, const MWWorld::Ptr& target)
|
||||
{
|
||||
if (mwmp::PlayerList::isDedicatedPlayer(target))
|
||||
if (target == MWBase::Environment::get().getWorld()->getPlayerPtr())
|
||||
{
|
||||
attack->target.guid = mwmp::Main::get().getLocalPlayer()->guid;
|
||||
attack->target.refId.clear();
|
||||
}
|
||||
else if (mwmp::PlayerList::isDedicatedPlayer(target))
|
||||
{
|
||||
attack->target.guid = mwmp::PlayerList::getPlayer(target)->guid;
|
||||
attack->target.refId.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user