|
|
|
@ -97,7 +97,10 @@ MWWorld::Ptr MechanicsHelper::getPlayerPtr(const Target& target)
|
|
|
|
|
mwmp::Target MechanicsHelper::getTarget(const MWWorld::Ptr& ptr)
|
|
|
|
|
{
|
|
|
|
|
mwmp::Target target;
|
|
|
|
|
clearTarget(target);
|
|
|
|
|
|
|
|
|
|
if (ptr != nullptr)
|
|
|
|
|
{
|
|
|
|
|
if (ptr == MWBase::Environment::get().getWorld()->getPlayerPtr())
|
|
|
|
|
{
|
|
|
|
|
target.isPlayer = true;
|
|
|
|
@ -120,8 +123,7 @@ mwmp::Target MechanicsHelper::getTarget(const MWWorld::Ptr& ptr)
|
|
|
|
|
target.mpNum = ptrRef->getMpNum();
|
|
|
|
|
target.name = ptr.getClass().getName(ptr);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
clearTarget(target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return target;
|
|
|
|
|