Implement Add switch for armor degradation fix. #6888

check_span
Ivan Beloborodov 2 years ago committed by psi29a
parent 461fdcd11b
commit f960e30d01

@ -189,6 +189,7 @@
Feature #6706: Save the size of the Options window
Feature #6721: [OpenMW-CS] Add option to open records in new window
Feature #6867: Add a way to localize hardcoded strings in GUI
Feature #6888: Add switch for armor degradation fix.
Task #6078: First person should not clear depth buffer
Task #6161: Refactor Sky to use shaders and be GLES/GL3 friendly
Task #6162: Refactor GUI to use shaders and to be GLES and GL3+ friendly

@ -108,6 +108,7 @@ bool Launcher::AdvancedPage::loadSettings()
if (numPhysicsThreads >= 0)
physicsThreadsSpinBox->setValue(numPhysicsThreads);
loadSettingBool(allowNPCToFollowOverWaterSurfaceCheckBox, "allow actors to follow over water surface", "Game");
loadSettingBool(unarmedCreatureAttacksDamageArmorCheckBox, "unarmed creature attacks damage armor", "Game");
}
// Visuals
@ -262,6 +263,7 @@ void Launcher::AdvancedPage::saveSettings()
saveSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
saveSettingInt(physicsThreadsSpinBox, "async num threads", "Physics");
saveSettingBool(allowNPCToFollowOverWaterSurfaceCheckBox, "allow actors to follow over water surface", "Game");
saveSettingBool(unarmedCreatureAttacksDamageArmorCheckBox, "unarmed creature attacks damage armor", "Game");
}
// Visuals

@ -805,7 +805,12 @@ namespace MWClass
}
if (hasArmor)
{
if (!object.isEmpty() || attacker.isEmpty() || attacker.getClass().isNpc()) // Unarmed creature attacks don't affect armor condition
static const bool creatureDamage = Settings::Manager::getBool("unarmed creature attacks damage armor", "Game");
if (!object.isEmpty() ||
attacker.isEmpty() ||
attacker.getClass().isNpc() ||
creatureDamage) // Unarmed creature attacks don't affect armor condition unless it was explicitly requested.
{
int armorhealth = armor.getClass().getItemHealth(armor);
armorhealth -= std::min(damageDiff, armorhealth);

@ -474,3 +474,16 @@ day night switches
:Default: True
Some mods add models which change visuals based on time of day. When this setting is enabled, supporting models will automatically make use of Day/night state.
unarmed creature attacks damage armor
-----------------------------------------
:Type: boolean
:Range: True/False
:Default: False
If disabled unarmed creature attacks do not reduce armor condition, just as with vanilla engine.
If enabled unarmed creature attacks reduce armor condition, the same as attacks from NPCs and armed creatures.
This setting can be controlled in Advanced tab of the launcher, under Game Mechanics.

@ -360,6 +360,9 @@ default actor pathfind half extents = 29.27999496459961 28.479997634887695 66.5
# Enables use of day/night switch nodes
day night switches = true
# Enables degradation of NPC's armor from unarmed creature attacks.
unarmed creature attacks damage armor = false
[General]
# Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16).

@ -175,6 +175,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="unarmedCreatureAttacksDamageArmorCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Makes unarmed creature attacks able to reduce armor condition, just as attacks from NPCs and armed creatures.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unarmed creature attacks damage armor</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalUnarmedStrengthLayout">
<item>

Loading…
Cancel
Save