- Shoulder view, auto shoulder switch, standing preview, deferred preview
rotation, move 360, smooth view change and [Game] smooth movement are
on by default.
- Collision ease-out: the camera still snaps in on collision but eases
back out (0.15 s half-life, 60 u/s minimum speed).
- Aim mode: with a ranged weapon or a spell readied in third person the
view stays over the shoulder, moves closer and narrows the FOV. Camera
interface v2 adds getAimWeight and enable/disable functions.
- Pure math in camera/ease.lua with unit tests; SCENARIO=camera with
PASS/FAIL checks; docs in docs/ashlar/CAMERA.md.
- ashlar-run.sh deletes stored Lua settings before each run so changed
defaults are tested.
Closes#29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New [Game] sprint setting, on by default, with sprint speed multiplier
(1.4 times run speed), sprint fatigue drain (10 per second on top of
running, halved at Athletics 100) and sprint fatigue threshold (0.1 of
maximum fatigue to start). A sprint ends when fatigue falls below 1% of
maximum; regeneration keeps fatigue just above 0 while running, so
exactly 0 is never reached.
Sprint is engine action 52, Lua input.ACTION.Sprint and the player's
'Sprint' Lua action, with self.controls.sprint. Defaults are Left Alt
and D-pad up, because L3 is already Sneak. Sprinting needs forward
movement within 45 degrees, and isn't possible while sneaking, in the
block stance, swimming, levitating, knocked down or paralyzed. Pressing
Use with a weapon or spell ready ends the sprint until Sprint is
released, so no attack starts while sprinting. A sprint counts as
running for animations, Athletics and the running fatigue cost. AI
doesn't sprint. With the setting off the control does nothing.
The rules are in mwmechanics/sprint.cpp with unit tests. The movement
scenario gains sprint, tiredsprint and sprintuse phases, run in a
circle from the start point so the player stays on land.
Closes#27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The built-in player controls cleared self.controls.block whenever combat
controls were not allowed, which also wiped a block requested by a
script that called I.Controls.overrideCombatControls(true).
Refs #19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With [Game] 'real time combat' on, the player blocks by holding the new
Block action instead of relying on the classic block roll. Holding Block
with a shield equipped and the weapon drawn raises the block stance: no
new attacks start, movement slows to [Game] 'block stance speed'
(default 0.5), and every melee hit inside the fCombatBlockLeftAngle to
fCombatBlockRightAngle arc is blocked with no roll. Shield durability,
fatigue loss and Block skill training work as before, but the fatigue
cost now falls with Block skill, to half at 100. Without the stance the
player doesn't block. NPCs and creatures keep the classic roll (#20).
Block is engine action 51, exposed to Lua as input.ACTION.Block and as
the player's 'Block' Lua action, with self.controls.block. Defaults are
the middle mouse button and D-pad down, which nothing else uses. With
the setting off, behavior is unchanged.
The pure rules (arc, stance gate, fatigue scaling) live in the new
mwmechanics/activeblock.cpp with unit tests.
Closes#19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previously the number renderer silently discarded input outside the
min/max range and restored the stored value, forcing users to guess the
limits. Clamp to the nearest bound instead.
The integer check runs before clamping so that non-integer input is
still rejected for integer settings rather than accepted whenever it
happens to clamp to an integral bound.
The focusLoss handler now always stores the resolved value - the clamped
number, or the previous value when the input cannot be parsed. Writing
the setting is what rebuilds the widget, so a value that clamps onto the
value already stored would otherwise leave the raw text on display.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>