1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Display weapon reach on tooltips in feet.

This commit is contained in:
Andrei Kortunov 2018-05-16 11:18:22 +04:00
parent 3197ebd8e7
commit 164e3d12fe

View file

@ -325,7 +325,10 @@ namespace MWClass
// add reach and attack speed for melee weapon
if (ref->mBase->mData.mType < 9 && Settings::Manager::getBool("show melee info", "Game"))
{
text += MWGui::ToolTips::getPercentString(ref->mBase->mData.mReach, "#{sRange}");
// 64 game units = 1 yard = 3 ft, display value in feet
const float combatDistance = store.get<ESM::GameSetting>().find("fCombatDistance")->getFloat() * ref->mBase->mData.mReach;
text += MWGui::ToolTips::getWeightString(combatDistance*3/64, "#{sRange}");
text += " #{sFeet}";
text += MWGui::ToolTips::getPercentString(ref->mBase->mData.mSpeed, "#{sAttributeSpeed}");
}