forked from mirror/openmw-tes3mp
[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)
|
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.guid = mwmp::PlayerList::getPlayer(target)->guid;
|
||||||
attack->target.refId.clear();
|
attack->target.refId.clear();
|
||||||
|
|
Loading…
Reference in a new issue