mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-28 21:15:34 +00:00
[Client] Fix assignAttackTarget() not assigning LocalPlayer as target
This commit is contained in:
parent
61cedfa192
commit
6c2bbd6608
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue