From 164e3d12feb079f1d043aea51a7075a013c0834f Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Wed, 16 May 2018 11:18:22 +0400 Subject: [PATCH] Display weapon reach on tooltips in feet. --- apps/openmw/mwclass/weapon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index 9fb4a9767..e59567aac 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -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().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}"); }