Skip to content

Reprisal Differences: Controls, Camera and Aiming

This page covers how Reprisal reads a controller and a keyboard and mouse, motion aim, the Modern and Classic control schemes, the third-person camera and its shoulder view, lock-on and slowdown aim assist, throw mode, fast dismount and vibration. Touch controls, Instinct and the HUD have their own pages (Touch Controls, Instinct, Highlights and Gaze, HUD). Addresses are Ghidra's (ELF virtual address + 0x100000).

Summary

Feature PC Reprisal
Pad mode ini option UseGameController, fixed at start-up follows the last device used (pad, then keyboard and mouse, then touch); the pad flag flips at run time
Pad device DirectInput, 16 buttons, 4 axes XInput-style state, 20 buttons (4 extra for the touch pad), 6 axes (a stick for the action menus); a trigger counts at any non-zero value; X/Y swapped on Nintendo pads
Dead zone PS2 radial 0.3 same formula with GamepadDeadzonePercent/100, which is 0 when unset
Menu stick none on the PC the left stick presses the d-pad in menus (0.5 thresholds)
Bindings compiled-in HMControl string one of five .cfg files (encrypted) per device and scheme
Control schemes one GamepadLayout and KeyboardLayout: 0 Classic, 1 Modern (default Modern)
Aiming ToggleCamera toggles first person Modern: hold CameraAimModeHold for the shoulder camera; Classic: ToggleCamera to first person
Running on a pad stick deflection Modern: walk capped at 0.2 unless Run is held, then at least 0.5
Keyboard rebinding 32 × 6 table, editable Feral's own 32 × 3 table, custom keys per scheme; editing off (EnableKeyboardRebinding)
Normal camera distance 250, side 7, up 17 (armed 15, −1) CameraNormal*: 250, 40, 17 (armed 40, 15)
Shoulder camera none camera mode 10, a second console camera: CameraShoulder* 125, 22, 7 (armed 40, 17)
Normal ↔ shoulder none distance rate 125 / 0.3 s in, 125 / 0.4 s out, shaped by tanh(Δ/50) and a 3-frame average; offsets follow the distance
Shoulder look speed 1.0 × ShoulderSlowPercent/100 = 0.67
Camera spring per-frame K 0.5 / 0.085 damped spring in seconds, K 225, D 20
Field of view scene CameraFOV or 67.4° FIELD OF VIEW option, 55° vertical by default
Window climb camera positional camera pushed each time CheckClimbThroughCamera: an existing one is popped first
Recentre none RecentreCamera eases the camera behind 47
Auto-aim ZHitman3AutoAim present but off, no option AIM ASSIST: Off, Standard, Lock-on (default Lock-on)
Target search humans in ±40 × ±80 units, up to 40 m humans and dogs, ranked by type and armed state, range by weapon class (10–100 m), five search windows
Slowdown none Standard only: 0.3 + 0.7·min((|x|+|y|)/240, 1)
Lock-on none on entering the shoulder camera or pressing fire; broken by the right stick, death or a 2 s stale target; turns at 1.9 rad/s (shoulder) to the head or pelvis; shots not bent
Classic schemes — WorkaroundClassicAimAssist caps AIM ASSIST at Standard
Motion aim none MotionAimEnabled/MotionAimSensitivity stored, conflict rule with aim assist, but nothing reads them on Android
Rumble removed every PS2 rumble restored, an M13 heartbeat added, on by default, scaled by strength × AndroidHapticsModifier (× AndroidDualshockHapticsModifier on PlayStation pads)
Throwing hold ThrowItem (0.5 s on a pad) throw mode: Classic pad press/press, Modern pad hold then fire, keyboard FeralThrowModeToggle then fire, touch tap; throws can be called off; firearms by GamepadThrowGunCombo
Ladder, drainpipe and wall jump-down hold crouch through half the lean FastDescend action, lean always completes, "JUMP DOWN" prompt

PickupFast, PickupMenuOpen, ToggleCamera and ThrowItem are PC actions (they are in the PC's HMControl string); Reprisal changes how they are bound and read. The new actions are FeralInstinctMode, FeralThrowModeToggle, CameraAimModeHold, RecentreCamera, CameraZoomInHold, CameraZoomOutHold, Melee, DragBody, PlaceRetrieve, PickupDisguise, FastDescend, MapGoToHitman and the action-menu stick axes.

Many functions named on this page are reached only through vtables, and Ghidra's analysis did not create them, so they are missing from the decompiled tree (for example 0x162ced8, 0x1688b48, 0x16244c8, 0x150ae38). They were read from the disassembly or decompiled separately; the addresses are their real entry points.

How input reaches the game

PC behaviour

The PC reads the keyboard and mouse through DirectInput (ZKeyboardWintel, ZMouseWintel) and a pad through ZGameControlWintel, all registered with ZSysInput (src/engine/system/sysinput.cpp, sysinput.h). Each device keeps a table of digital and analogue controls that the action map (engine/system/actions_new.cpp) samples through bindings such as tap(kb,r) or ana(gc,leftx). The PC pad device has 16 buttons with IOI's PS2 names (triangle, circle, cross, square, left2, right2, left1, right1, select, leftstick, rightstick, start, up, right, down, left) and four axes (leftx, lefty, rightx, righty); see PC Differences: Key names of the PC devices.

Whether the game behaves as a pad game is fixed at start-up: ZSysInterface::m_bUseGameController is set only by the ini option UseGameController (The pad flag is a start-up option). ZHM3InputControl::UpdateBaseMovements (src/hitman3/characters/zhitman3inputcontrol.cpp) picks UpdateBaseMovementsConsole or UpdateBaseMovementsPC by that flag. The PS2 pad applies a radial dead zone of 0.3 (ZGameControlDevice::ApplyDeadZone, SetDeadZone(0.3f) in src/engine/system/_ps2/newsysinputps2.cpp). The bindings are the HMControl and ZWINDOWSKEYS_1 strings compiled into the executable plus the player's rebinds in the profile.

Reprisal: devices and the active input mode

Reprisal keeps ZSysInputWintel, ZKeyboardWintel, ZMouseWintel and ZGameControlWintel, but Feral rewrote the pad device and added an input mode that follows whatever the player last used. DirectInput survives only for the keyboard and mouse (Feral's IdxDirectInputDeviceKeyboard and IdxDirectInputDeviceMouse); there is no DirectInput joystick class.

ZSysInputWintel (created at 0x14e9910, constructor 0x14e9bc8) holds:

Offset Meaning Values
+0x14 input mode (0x1508e38 reads it) 0 keyboard, 1 keyboard and mouse, 2 gamepad, 3 touch (start value 3)
+0x18 prompt glyph set 0 keyboard/mouse, 1 Xbox, 2 PlayStation, 3 Nintendo, 4 touch
+0x1c prompt style flags 1 keyboard, 2 mouse, 4 Nintendo pad, 8 other pad, 0xc pad before the input system exists, 0x10 touch
+0x144 id of the connected physical controller, or -1
+0x148 id of the Virtual Control Pad (touch) controller, or -1

0x1508e40 ("keyboard or mouse mode") is mode < 2. Many Feral functions branch on these two tests.

Choosing the mode (0x14e99c8, called on device changes and from the options screens):

  1. If ForceTouchControls is on and a Virtual Control Pad exists, use touch (mode 3), whatever else is connected.
  2. Otherwise, if a physical controller is connected (+0x144 ≠ -1), use gamepad (mode 2) and bind the pad device to it.
  3. Otherwise, if both a physical keyboard and a mouse are present, use keyboard and mouse (mode 1).
  4. Otherwise, if a Virtual Control Pad exists, use touch (mode 3) and bind the pad device to the virtual pad (the device's +0x328 "virtual" flag is set).
  5. Otherwise keep the current mode.

Then it loads the binding file for the mode (below) and applies the mode (0x1508ccc):

  • Mode 0 or 1: style 1 or 2, glyph set 0; the "pad game" flag (g_pSysInterface+0x88) is cleared.
  • Mode 2: style 4 if the controller type is 26–30 (the Nintendo group, 0x14ea8e8), else 8; glyph set from the controller type (0x14ea9c0); the pad flag is set.
  • Mode 3: style 0x10, glyph set 4; the pad flag is cleared.
  • If the glyph set changed, the game data's prompt-refresh flag (+0x1479) is set so every prompt is rebuilt.

The flag at g_pSysInterface+0x88 plays the part of the PC's m_bUseGameController: ZHM3InputControl::Update (0x16c507c) reads it to choose the console or PC movement sampler, exactly as UpdateBaseMovements does in src/. So in Reprisal "pad game" is a live state that flips when the player picks up a controller, not an ini option. (The offset is inferred from that use; the field is not named.)

Controller types come from Feral's device database (CFeralInputDeviceManager, names parsed at 0x1fba4d0): 5 XboxOriginalGamepad, 6 Xbox360Gamepad, 7 XboxOneGamepad, 8 XboxSeriesSX, 9 XboxBackbone, 10 PS2Gamepad, 11 PS3Gamepad, 12 PS4Gamepad, 13 PS5Gamepad, 14 PSBackbone, 15 SteamGamepad, 16–18 RazerKishi…, 19–20 MFIGamepad…, 21 AppleTVRemote, 22–25 Quest headsets, 28 SwitchProGamepad, 34–37 wheels and pedals; an unknown device is 33. The glyph set table at 0x9f3d50 gives PlayStation glyphs to types 10–13, Nintendo glyphs to 26–30 and Xbox glyphs to everything else (including PSBackbone).

assets/inputdevices.json in the APK is the data behind that database: 163 entries, each with Name, VendorID, ProductIDs, Category (Gamepad, Wheel, Pedals, Keyboard, Mouse), Type (the names above), ImageType (the controller picture on the controls screen) and either an SDL ButtonMapping string or an Android block with per-device ButtonAndroidMapping overrides (HATX, LY, X, Y, L1… with scale and offset), AnalogueTriggers, AndroidMaxSDKVersion and VersionRanges. Its comment says it started from SDL_GameControllerDB and was "expanded for use on Android".

Reprisal: the pad device

ZGameControlWintel is built at 0x14e9cdc (and 0x14ebc9c) with 20 buttons and 6 axes. The name tables (0x3063768, 0x30638b8) keep the PC's 16 button names and add ex1–ex4; the axes are leftx, lefty, rightx, righty and two new ones, actionmenustickx and actionmenusticky.

Each update (ZGameControlWintel vtable slot 29, 0x14ebe80; not in the decompiled tree, read from the disassembly) reads an XInput-style state from Feral's controller layer (a 16-bit button word, two 8-bit triggers, four 16-bit stick values) and fills the PS2-named slots:

Slot Name Source
0 triangle Y (X on controller types 26–28)
1 circle B
2 cross A
3 square X (Y on types 26–28)
4 left2 left trigger, pressed when its value is not 0
5 right2 right trigger, pressed when its value is not 0
6 left1 left shoulder
7 right1 right shoulder
8 select Back / View
9 leftstick left stick click
10 rightstick right stick click
11 start Start / Menu
12–15 up, right, down, left d-pad
16–19 ex1–ex4 four extra buttons, read only while the device is bound to the Virtual Control Pad

The swap of X and Y on types 26–28 keeps triangle on the top face button of Nintendo-layout pads. The extra buttons are the touch controls' own (see Touch Controls).

Sticks: each axis is divided by 32767; Y axes are negated. The left and right stick each go through the PS2's radial dead zone unchanged (0x150a9cc, the same formula as ZGameControlDevice::ApplyDeadZone):

len = sqrt(x*x + y*y)
if len < dz:        x = y = 0
elif len < 1:       k = (len - dz) / ((1 - dz) * len); x *= k; y *= k
else:               x /= len; y /= len

dz is the device's +0xb4, set once at creation to GamepadDeadzonePercent / 100. The key has no registered default and its getter (0x11a6654) returns 0 when it is unset, so the game-side dead zone is 0 in a normal install; any dead zone the player feels comes from Feral's controller layer, which this page did not examine.

Routing of the analogue axes:

  • The right stick always feeds rightx/righty (axes 2, 3).
  • The left stick feeds actionmenustickx/actionmenusticky (axes 4, 5) while the object at game data +0x14a0 has flag 0x02 or 0x40 set in its +0xec word, and leftx/lefty (0, 1) otherwise. The bindings ActionMenuStickH/ActionMenuStickV read the new axes; this is how the stick drives the radial action and pickup menus without also moving 47 (the flag's owner is inferred to be the action-menu state).
  • In menus the left stick also presses the d-pad: when the game reports a menu (game data vtable +0x90), or a GUI flag (+0x1f0) is set, or the game state at +0x15d4 is 7, a stick position with 0.5 < x < 1.0 and −0.5 < y < 0.5 presses right; −1.0 < x < −0.5 (same y band) presses left; −0.5 < x < 0.5 with −1.0 < y < −0.5 presses up, and with 0.5 < y < 1.0 presses down (y after negation, up negative). The open upper bound means a stick pushed fully to the rim (length ≥ 1, normalised to exactly ±1.0) does not count; only partial pushes do. The PS2's ZWinInput did this through the Analog_Horizontal/Analog_Vertical bindings and the PC had no such path (Menu bindings are keyboard and mouse only).

When the device is not bound to the virtual pad and any button or stick is non-zero, the update calls a registered callback (inferred: the "controller used" notification that makes gamepad the active mode). Haptics are updated at the end of the same function; see Vibration.

Reprisal: binding files

The action map no longer uses the compiled-in HMControl string. The PC string is still in the library (static initialiser 0x16c5b64) but 0x14ea79c loads one of five configuration files from the encrypted data pack and records it in the ConfigFile preference:

Mode Layout option File
0, 1 (keyboard, mouse) KeyboardLayout = 0 feralkeyboardclassic.cfg
0, 1 KeyboardLayout ≠ 0 feralkeyboardmodern.cfg
2 (gamepad) GamepadLayout = 0 feralgamepadclassic.cfg
2 GamepadLayout ≠ 0 feralgamepadmodern.cfg
3 (touch) — feraltouch.cfg
any other — feralgamepadmodern.cfg

After loading a keyboard or gamepad file it also sets Hitman's "prefer first person" flag (+0x1154, the PreferFirstPerson option's runtime copy) to layout is Classic. Choosing a Classic scheme therefore also selects the original first-person aim perspective, and Modern the enhanced one; see Third-person camera. Then, if the player has custom keyboard bindings, they are applied over the file (0x17d6748, below).

The .cfg files are inside the encrypted packs, so the button each action is bound to in each scheme could not be read. What the code shows is which actions exist, how they are read, and how the menus label them (next section).

SwapUIControllerMode is a debug preference (registered default 0; the internal settings screen offers Off and "every 30/90/210 frames"). Its getter (0x11a5738) has no callers in this build, so it does nothing in the release.

Port. The port reads SDL gamepads directly and keeps the PS2 bindings, with the modern layout as a translator over them (port/engine/system/_sdl/sysinputsdl.cpp). With the modern layout a trigger counts as pressed at any value above 0 (MODERN_TRIGGER_PRESSED), as on Reprisal's pad device; without it the port keeps its 0.5 threshold. The stick-to-d-pad menu emulation and the dead zone come from the launcher settings rather than these rules.

Control schemes

PC behaviour

The PC has one keyboard-and-mouse scheme (the HMControl string quoted above, rebindable through ZButtonConfigurationList) and, with UseGameController, the PS2 pad bindings. Its rebinding table ZLevelLinking::s_asActionNames has 32 rows of five actions and an action set (PC Differences: key rebinding); the PS2 table in src/hitman3/levelcontrol/levellinking.cpp has 32 rows of three.

Reprisal: the scheme options

Two profile options choose the scheme, each read through ZHM3Options (option indices 0x18 and 0x19 in its extended name table at 0x17640e0):

Option Values Default Shown as
GamepadLayout 0 Classic, 1 Modern 1 CONTROL SCHEME: "CLASSIC (ORIGINAL CAMERA)" / "MODERN (ENHANCED CAMERA)"
KeyboardLayout 0 Classic, 1 Modern 1 CONTROL SCHEME: "CLASSIC" / "MODERN"

ZHM3Options::GetOptionValue (0x1764850) reads both with default 1. Before a profile is loaded the helpers answer 2 for the gamepad (0x1726f3c) and 1 for the keyboard (0x1727098); the file loader treats any non-zero value as Modern. The controls screen's cycle button (0x1727750) turns 0 into 1 and 1 into 0 and writes the option at once. 0x1727008(n) and 0x1727164(n) answer "the gamepad (keyboard) is the active device and its layout is n"; the aim-assist code uses them to tell the Classic schemes apart (see Aim assist and lock-on).

Setting either option also re-applies the aim-assist choice when WorkaroundClassicAimAssist is on (ZHM3Options::SetOptionValue, 0x1764da8, cases 0x18 and 0x19).

Reprisal: actions

Reprisal's ZHM3InputControl (static initialiser 0x16c5b64) declares these actions; the ones in bold are not in the PC's HMControl or the PS2 source:

CrouchSneak, UseAction, LeanOutLeftShoot, LeanOutRightShoot, LeanOutLeft, LeanOutRight, MovementIncrease, MovementDecrease, FireWeapon, FireWeapon2, FireWeapon2b (PC), ReloadWeapon, DropBody, CancelExit, DropItem, ThrowItem, PickupItem, Run, CameraAimModeHold, RecentreCamera, ToggleCamera, CameraZoomIn, CameraZoomOut, CameraZoomInHold, CameraZoomOutHold, CameraZoom, FeralInstinctMode, FeralThrowModeToggle.

Other Feral actions are read elsewhere: Melee (0x16e29d0, close combat: sets bit 0x4000 of the combat input word), DragBody, PlaceRetrieve, PickupDisguise (the action prompts, 0x170d200 and 0x171222c), FastDescend (two movement constructors, 0x16d0010 and 0x16d8c28; see Fast dismount), MapGoToHitman (the map, 0x16fa930), ActionMenuStickH/ActionMenuStickV (the new stick axes), and DropVideo2.

How ZHM3InputControl::Update (0x16c507c) samples them, compared with src/:

  • Camera actions (0x16c50d4). If the loaded binding file defines CameraAimModeHold, the camera mode field (+0xc) is that action's state (0 or 1) and ToggleCamera is not read: aiming is hold to aim. If the file does not define it, the field is 2 and ToggleCamera is read as on the PC: press to switch view. So the scheme decides hold or toggle by which action its file contains. RecentreCamera (+0x12) and the held zooms CameraZoomInHold/CameraZoomOutHold (+0x10, +0x11) are new; CameraZoomIn, CameraZoomOut, CameraZoom are kept.
  • Movement (0x16c5724 console, 0x16c580c PC). As in src/, but the console sampler skips CrouchSneak while flag 0x08 of the +0xec word at game data +0x14a0 is set (the same state object that reroutes the left stick), so crouch cannot change while it is up.
  • Weapons and items (0x16c51b8). FireWeapon2 or FireWeapon2b set the second fire bit. DropItem is also reported when the throw state (below) is 2. The PS2/PC rule that, on a pad, ThrowItem only fires 0.5 s after it is held and that drop is ignored for 0.5 s after a cut sequence is gone; Feral replaced it with throw mode, toggled by ThrowItem on the Classic gamepad, held with ThrowItem on the Modern gamepad and toggled by FeralThrowModeToggle on the keyboard. The per-frame rules are in Throw mode.
  • Instinct. With the AllowInstinctMode option on, in keyboard or gamepad mode FeralInstinctMode is a hold (Instinct runs while it is held; a latch at +0x29 stops a held button from re-triggering); in touch mode the button's state is passed straight through. See Instinct, Highlights and Gaze.
  • Running on the Modern gamepad (0x1698efc, 0x16e18d4). The movement speed input is the left-stick magnitude m rescaled to s = max(0, m − 0.2) / 0.8. With the Modern gamepad scheme, Run must be held to run: without it s is capped at 0.2 (a walk), with it s is at least 0.5. In some of 47's states (flags at +0x9a6/+0x990 bit 7, or +0x2125 with +0x2127) the cap without Run is 0.5 instead. In every scheme, when 47's state at +0x1140/+0x130 is 10 the result is capped at 0.4 (0.1 in the flagged state), and with GamepadLayout = 0 the function returns a flat 0.2 while a hitman flag (+0x540 bit 0x800, without the +0x1260 bits 0x180800) forbids running. Otherwise in the Classic scheme the stick alone sets the speed, as the Classic tutorial says ("The further you press {leftstick} the faster 47 will move"). The function is ZHitman3ControlConsole::GetMovementSpeedPrc (called from its Update, 0x16e1710); the first-person reader ZHitman3ControlConsoleStrafe (0x16e12c0, also inlined in its Update) gives min(s, 1) when running is allowed and a flat 0.2 otherwise. "Running allowed" (0x1698efc, Reprisal's ZHitman3::IsRunAllowed) is: 47 crouches or is forced to crouch or sneak (m_CurrentStatusExtended & 0x180800), or he drags no body (m_CurrentStatus & PLAYER_STATUS_DraggingBody clear) and, with the Modern gamepad, Run is held. The flagged state of the Modern rule is ZHM3InputControl::m_bActive (+0x9a6) with m_bCrouchSneak (+0x990 bit 7), the crouch input; state 10 at +0x1140/+0x130 is the camera's mode 10, the shoulder camera. (The flags +0x2125 and +0x2127 are not determined.)

Reprisal: hold, press and tap in prompts

Prompts ask the action map how an action is bound (ActionMap vtable +0x48): when it reports 1 (a hold binding), the prompt adds "(HOLD)" (InGame.Hold), otherwise "PRESS" or "TAP". This is done for DragBody, PlaceRetrieve and PickupDisguise (0x170d200, 0x1712320), so whether those are holds depends on the scheme's file, not on code. The context prompt (0x1718bf4) shows {ThrowItem}/{throw} on the Classic gamepad and {FeralThrowModeToggle}/{throwattack} elsewhere, {Melee} on a gamepad, {FireWeapon} on keyboard and mouse and {punch} on touch, and {FastDescend} ({crouch} on touch) for the fast dismount.

The tutorials pick a text per scheme (0x17b5f70): M00/Tutorials/<name> with the suffix _M&KModern or _M&KClassic (keyboard), _GamepadModern, _GamepadClassic or _Gamepad (gamepad, the last before a profile exists), _Touch or _Touch_Left (touch, left-handed layout), falling back to less specific texts. The strings that differ by scheme show the design:

Topic Modern / generic Classic
Movement "Hold {Run} while moving to run." "The further you press {leftstick} the faster 47 will move."
Distraction "hold {ThrowItem}" to aim the coin "press {ThrowItem}"; keyboard: "press {FeralThrowModeToggle}"
Sniping "hold {CameraAimModeHold} with the Sniper Rifle" "press {ToggleCamera}… again… to enter sniping mode"
Inventory — "hold {ZW_SELECT4}" (gamepad), "hold {InventoryMenuOpen}" (keyboard)
Ladders "press and hold {CrouchSneak}" to jump down same

Reprisal: the controls screen

ZFeralControlLayoutMenu shows the screen for the active device (0x1725d04):

  • Gamepad. A controller picture (ZControllerGraphic) with the CONTROL SCHEME cycle (0x17271e8 sets its text from GamepadLayoutModern/GamepadLayoutClassic, reloads the binding file and rebuilds the labels). The labeller (0x1727d88) walks every action bound in the loaded file, keeps the 24 it knows (CrouchSneak, Run, CancelExit, CameraZoomIn, CameraZoomOut, FireWeapon, Melee, Holster, ReloadWeapon, ThrowItem, FeralInstinctMode, DropItem, PickupDisguise, PlaceRetrieve, IngameMenu, Briefing, Map, Stick1h, Stick2h, UseAction, PickupFast, DragBody, InventoryMenuOpen, ToggleCamera), groups them by controller element, and labels each element with InGame.GamepadLabel_<action>, using …<action>Classic when the Classic scheme is active and such a string exists, joined when several actions share a button; a missing string shows "[MISSING]". Stick clicks get a "(PRESS)" suffix (GamepadLabel_Press).
  • Keyboard. The CONTROL SCHEME cycle (0x1727460) and the key list ZKeybindingsGUIList (ButtonConfigurationList).
  • Touch. The Virtual Control Pad layouts with ZControlLayoutCycleButton, ZControlLayoutCustomiseButton and ZControlLayoutDeleteButton; see Touch Controls.

The labels (English):

Action Label Classic label
Stick1h / Stick2h Move / Camera/Aim
FireWeapon Shoot Shoot
ToggleCamera Aim Switch View
ThrowItem Aim/Throw Mode Throw
Run Sprint
CrouchSneak Crouch
UseAction Interact
PickupFast / PickupMenuOpen Pick Up / Pickup Wheel
PickupDisguise Equip Disguise
PlaceRetrieve Place/Retrieve Item
DragBody Drag Body
Melee Melee
FeralInstinctMode Instinct Mode
ReloadWeapon, Holster, DropItem Reload, Holster, Drop
InventoryMenuOpen Open Inventory
IngameMenu, Map, Briefing Pause, View Map, View Objectives
CameraZoomIn / Out, CancelExit Zoom In / Zoom Out, Cancel
keyboard FeralThrowModeToggle Throw Mode (ThrowKBM)
keyboard ToggleCamera Switch View (SwitchViewKBMClassic)

InGame.GamepadThrowGunCombo reads "[UPDATED] HOLD {ThrowItem} + PRESS {FeralThrowModeToggle}"; InGame.KeyboardLayoutModified "(MODIFIED)" marks a keyboard scheme with custom keys (from strings only; the code that shows it was not traced).

Reprisal: keyboard rebinding

The rebinding table (0x32c92d0, 32 rows of three actions, the PS2 shape rather than the PC's six) is Feral's own:

Row Actions Row Actions
0–3 MoveLeft, MoveRight, MoveUp, MoveDown 16 PickupFast + PickupMenuOpen + PickupMenuClose
4 Run 17 IngameMenu
5 ReloadWeapon 18 Briefing
6 FireWeapon 19 Map
7 CameraAimModeHold (Modern) / ToggleCamera (Classic) 20 PickupDisguise
8 CrouchSneak 21 DragBody
9 ActionMenuFast + ActionMenuOpen + ActionMenuClose 22 PlaceRetrieve
10 FeralThrowModeToggle 23–29 CycleCCs … CycleCoins
11 DropItem 30 FeralInstinctMode
12, 13 CameraZoomIn, CameraZoomOut 31 DropVideo + DropVideo2 + DropCutSequence
14 Holster
15 InventoryMenuOpen

Against the PC table, Feral dropped FireWeapon2, UseAction, ToggleCamera (as its own row), ThrowItem, InventoryMenuClose, ContainerMenuClose and the menu rows (ZW_*, Accept, Enter), merged the tap/hold pairs into one key each (row 9 interact/action menu, row 16 pick up/pickup wheel), and added the Feral actions. When the list is built (0x1751b80 area), row 7's action is switched in the static table to CameraAimModeHold under the Modern keyboard scheme and to ToggleCamera under Classic. Rows are labelled from AllLevels/Interface/KeyConfiguration except the Feral actions, which use their GamepadLabel_ strings.

Custom keys are stored per scheme: two arrays of 32 (device, control) pairs at +0x1864 (Classic) and +0x1964 (Modern) of the binding store at game data +0x14b8 (0x17d9884, 0x17d98dc). Applying a row overrides every action in it. After any binding file is loaded the active scheme's array is applied on top (0x14ea79c).

EnableKeyboardRebinding (default off; getter 0x11ad5cc) gates editing:

  • When the list opens (0x156b4dc), if the preference is off every row is disabled.
  • A row's click handler (0x1752298) opens the "CONTROL CUSTOMISATION / Press the key you wish to assign to this action." dialog only when the preference is on.

So the release shows the keyboard bindings read-only; nothing else enables the preference.

Port

The port's modern layout (port/engine/system/_sdl/sysinputsdl.h, SModernPadSDL) is a reconstruction over the PS2 bindings, not Feral's files. Differences found:

  • Button assignments cannot be checked: Reprisal's are in the encrypted .cfg files. The port's choices: LT is CameraAimModeHold and ThrowItem (the Modern label "Aim/Throw Mode" puts them on one button), RT FireWeapon, LB Run, RS CrouchSneak (a toggle) and, held on a climb, FastDescend, L3 FeralThrowModeToggle.
  • Aiming: Reprisal makes "hold to aim" a property of the binding file (CameraAimModeHold) and sets Hitman's prefer-first-person flag to layout is Classic when the file loads. The port follows the same rule through its modern setting: with it, aiming is LT held and the shoulder camera; without it, the original toggle into first person.
  • Running: matches. ModernPadMoveSpeed is Reprisal's speed (s = max(0, m − 0.2) / 0.8, at most 0.2 without Run, at least 0.5 with it, at most 0.5 crouching without Run, at most 0.4 or 0.1 while the shoulder camera is up), and in first person Reprisal's strafe speed (0.2 without Run, s with it). ModernPadShapeStick sets the stick's length so that the game's own speed curve, which both readers share, gives that value. The shoulder cap follows the camera (ReprisalShoulderCameraActive, Reprisal's camera mode 10), not LT alone: LT held during a throw, with a human shield or on a climb does not bring the shoulder camera, and does not cap the speed. Left out, with no effect: Reprisal's run test also reads 47's crouch status bits, which ControlBody clears before the movement controls read the speed, and dragging a body, whose speed ZHM3MovementControl::GetMovementSpeedPrc reads as 0 anyway; the two hitman flags (+0x2125, +0x2127) whose meaning is not known are left out. m is the stick's length after the launcher's dead zone, not Feral's controller layer's. Checked in M05 with scripted input: a full stick walks, LB runs, LB with LT runs at about 60 % of that (the 0.4 cap), and LT alone leaves the walk as it is.
  • Throwing: matches; see Throw mode.
  • Tap/hold: the port keeps its own 300 ms hold threshold (HOLD_MS) for its tap-or-hold buttons. Which of Reprisal's bindings are fasttap/holddown (whose engine threshold is 0.2 s) is in the encrypted binding files.
  • Keyboard: the port keeps the PS2/PC action table; Reprisal's table above is not reproduced.

Third-person camera

Reprisal keeps IOI's camera classes (ZHM3Camera and its camera objects) but changes the third-person camera in five ways:

  • the normal third-person camera takes its distance and focal-point offsets from preferences, with a wider side offset than the PC;
  • a second third-person camera, the shoulder camera, is added as camera mode 10. Aiming switches to it, and the switch is a smoothed blend of distance and offsets;
  • the vertical camera spring and the distance pull are rewritten to work in seconds;
  • aiming (CameraAimModeHold, ToggleCamera) picks the shoulder camera or the first-person camera, depending on the control scheme and the AIM PERSPECTIVE option;
  • the field of view is a player option, applied as a vertical angle.

Offsets on this page are those of the 64-bit build. ZHM3Camera lives at hitman + 0x1140 and its current mode at camera + 0x130 (m_eCameraModeStack[0]). The console camera's own members are listed in Camera object layout.

Camera modes

PC (src/hitman3/camera/hm3camera.h, ZHM3Camera::ECameraMode) has modes 0 to 9: none, third-person (1), first-person (2), sniper scope (3), keyhole (4), closet (5), bullet (6), positional (7), dialog (8) and binoculars (9). Reprisal adds mode 10, the shoulder camera, at ZHM3Camera + 0x108, after the PC's nine camera pointers (+0xc0 current, +0xc8 scope, +0xd0 first person, +0xd8 console, +0xe0 observation, +0xe8 bullet, +0xf0 positional, +0xf8 dialog, +0x100 binoculars).

Wherever the PC tests for mode 1, Reprisal tests for 1 or 10:

  • ActivateCurrentCameraMode (0x1624b98);
  • the console camera's Activate (0x162bcec);
  • the aim-assist and lock-on code (0x1628f30, 0x168e1cc, 0x16c42fc and others).

Mode 10 counts as an "aim camera", together with 2 and 3. 0x168e344 is a new IsShoulderCamera() test (mode == 10).

The two console cameras

PC: ZHM3Camera::CreateCameras (hm3camera.cpp) creates one ZHM3CameraConsole. Its focal-point offsets come from four globals in hm3cameraconsole.cpp:

  • g_fDistFromFocalH = 7 and g_fDistFromFocalV = 17;
  • g_fDistFromFocalHArmed = 15 and g_fDistFromFocalVArmed = -1.

The constructor sets its distance to 250 (m_fCurrentCameraDist, PushDesiredCameraDist(250)).

Reprisal: CreateCameras (0x16244c8, not created by Ghidra's analysis; decompiled separately) builds two ZHM3CameraConsole objects. The Feral constructor (0x162bbb8) takes five floats (distance, H, V, armed H, armed V) and stores them per object, so the globals are no longer used by the console camera:

Object Slot Distance H V Armed H Armed V Turn rate (+0x258)
Normal (mode 1) +0xd8 CameraNormalDistance 250 CameraNormalOffsetH 40 CameraNormalOffsetV 17 CameraNormalArmedOffsetH 40 CameraNormalArmedOffsetV 15 1.4 rad/s (constructor default)
Shoulder (mode 10) +0x108 CameraShoulderDistance 125 CameraShoulderOffsetH 22 CameraShoulderOffsetV 7 CameraShoulderArmedOffsetH 40 CameraShoulderArmedOffsetV 17 1.9 rad/s (set after construction)
PC (one camera) — 250 7 17 15 -1 —

All ten preferences are integers in game units. Their getters (0x11a9f80 to 0x11aa814) are read once, when the cameras are created, and again in ActivateCamera (see below). "Armed" has the same meaning as on the PC: IsWeaponInHands() || IsThrowingStuff() (Reprisal 0x1699030 and 0x168df48). The normal camera therefore sits 40 units to the side in both control schemes, where the PC uses 7.

The turn rate at +0x258 is the camera's maximum auto-turn speed towards an aim-assist target; see Aim assist and lock-on.

Both objects are full console cameras: each has its own wall check (ZHM3CameraColi), vertical spring, desired-distance and focal-percentage stacks, and smoothing queue.

Switching between the normal and shoulder cameras

PC: ZHM3Camera::ActivateCamera(ECameraMode) deactivates the current camera, picks the new one, activates it and positions it once.

Reprisal (0x1624850) does the same and adds a hand-over between the two console cameras. When the new mode is 1 or 10:

  1. Read the normal and shoulder distances Dn (250) and Ds (125).
  2. Choose the offset pair from 47's state. Unarmed uses dH = NormalOffsetH - ShoulderOffsetH (18) and dV = NormalOffsetV - ShoulderOffsetV (10). Armed uses the armed preferences (0 and -2).
  3. Set the blend time T: 0.3 s when switching to mode 10, 0.4 s when switching to mode 1.
  4. Compute distRate = (Dn - Ds) / T (416.7 or 312.5 units/s) and offsetRate = max(|dH|, |dV|) / T.
  5. If the camera being replaced is the other console camera (normal to shoulder, or shoulder to normal), copy its live state into the new camera (0x162d15c). That state is the current V and H offsets, the current distance, the pose offset (m_vPoseOffset) and the whole vertical spring. Then store offsetRate at new + 0x210 and distRate at new + 0x218.

offsetRate (+0x210) is written but never read by any code (checked against every load of that offset in the disassembly). The offsets follow the distance instead, as described below.

The new camera's Activate (0x162bcec) copies yaw, pitch and roll from the previous camera when the old mode was 1 or 10, as the PC does for mode 1. It also skips re-seeding the spring for both modes. The result is that the view keeps its direction and simply slides in or out.

The rest of ActivateCamera matches the PC: the keyhole limits are ±0.1745 rad, and the closet limits are ±0.4363 rad yaw and ±0.3491 rad pitch. Reprisal also tells Feral's touch-control layer the new mode (0x14ee7f8), and ActivateCurrentCameraMode (0x1624b98) suspends Instinct for every mode other than 1, 2 and 10 (0x16a7780). See Touch Controls and Instinct, Highlights and Gaze.

Distance and offset blending (CalculateCameraPosition, 0x162cafc)

PC (ZHM3CameraConsole::CalculateCameraPosition): the current distance is pulled towards the top of the desired-distance stack each frame by min(2·|desired - current| / current, 5) units. The H and V offsets are pulled towards their targets in UpdateFocalPoint at a fixed 100 units/s.

Reprisal replaces both. Each frame, with cur the current distance, des the top of the desired-distance stack, dt the game frame time and R = camera + 0x218:

settled = (cur == des)                    // tested at the start
if R == -1:                               // default: no hand-over in progress
    raw = min(2 * |des - cur| / cur, 5)   // per frame, as on the PC
else:                                     // hand-over from ActivateCamera
    raw = R * dt * tanh(|des - cur| / 50)
push raw into a queue of the last 3 values (std::deque at +0x220, size limit at +0x250 = 3)
step = max(mean of the queue, 0.01)       // units this frame
camera + 0x214 = step / |des - cur|       // fraction of the remaining gap covered this frame
move cur towards des by step, without overshooting
if settled: camera + 0x214 = 0, camera + 0x218 = -1

The queue keeps two pairs per sample (weight 1, weight × value) and divides the sums, so it is a plain 3-sample average. The queue is never cleared. A settled camera keeps pushing zeros, so a transition ramps up over its first three frames.

UpdateFocalPoint (0x162c1e4) then moves each offset by camera + 0x214 × |target - current| per frame, clamped at the target (the targets are the armed or unarmed pair). The offsets therefore cover the same fraction of their gap as the distance covers of its gap, and they arrive together. The fraction comes from the previous frame, because UpdateFocalPoint runs before CalculateCameraPosition. Deactivate (0x162c720) zeroes it.

When both offsets reach their targets, +0x210 is reset to 100. That value is unused.

A consequence of this design (inferred from the code, not observed): the offsets move only while the distance moves. If 47 draws or holsters a weapon while the distance is settled, the armed and unarmed targets change, but +0x214 is 0, so the offsets stay where they are until the next distance change. This matters for the shoulder camera, whose unarmed and armed offsets differ by 18 and 10 units.

Timing of the hand-over, simulated from the algorithm above (125-unit change; the 0.01-unit minimum step makes the tail depend on the frame rate):

Frame rate Into the shoulder: 50 % / 90 % / done Out of the shoulder: 50 % / 90 % / done
30 fps 0.20 s / 0.37 s / 0.53 s 0.27 s / 0.50 s / 1.13 s
60 fps 0.18 s / 0.37 s / 0.95 s 0.23 s / 0.50 s / 1.30 s

The camera is then placed as on the PC: from = focal + rotation(yaw, pitch) × cur.

Vertical spring

PC: ZHM3CameraSpring (hm3cameraspring.cpp) moves the spring point by K × (length - rest) every frame. K is 0.5, or 0.085 while m_bVerticalSpringActive is set. The constants are per frame and the timestep only feeds the speed estimate.

Reprisal sets K = 225 and D = 20 every frame (constants at 0x8a3fa8) and ignores m_bVerticalSpringActive. The spring update (0x1634544, 0x16345d4) runs when at least 1/4096 s has passed:

len = |target - pos|
if len >= 1/4096:
    v   = v - dt * (D * v + K * (len - rest))   // v: rate of change of the length, +0x184
    pos = pos + (target - pos) * (-v * dt / len)

This is a damped spring that works in seconds: natural frequency 15 rad/s, damping ratio about 0.67. The PC's clamps are kept: the spring point stays between 100 units below the focal point and the focal point itself. When it is clamped upward, Reprisal also sets v to 0.

The spring's height is used only when the distance is settled at the start of the frame. During a distance change the camera aims at the unsprung focal point.

Climbing and wall-hugging focal point

PC (ZHM3CameraConsole::UpdateFocalPoint):

  • while climbing walls, ladders and drainpipes, pulling up and jumping balconies, the focal point blends towards a guide point at (0, 180, 25) in 47's frame;
  • while wall-hugging, the guide point is (0, 180, -25), or (0, 180, 0) when dismounting to a drainpipe;
  • the blend factor moves at 10 per second (DeltaFrameTime × 10).

Reprisal (0x162c1e4) changes two things:

  • the guide point's x is -H, the current target side offset (armed or unarmed). With the 40-unit side offset this keeps the camera's sideways shift while climbing (purpose inferred);
  • the blend factor moves at 1 per second (DeltaFrameTime with no factor), so the camera takes 1 s, not 0.1 s, to settle on the climbing guide.

The PC value is the PS2 source's; the PC executable was not checked.

Wall check

PC: when ZHM3CameraColi::CheckColi hits, the camera is put at max(coliLength - distWall, 0) from the focal point. Reprisal's UpdateCameraPosition (0x162c9cc) uses max(coliLength - distWall, 1), so the camera never collapses onto the focal point. Reprisal also calls UpdateInput through the vtable (+0x50), so the console camera's own override runs, where the PC calls the base class.

Look speed in the shoulder camera (ShoulderSlowPercent)

PC (ZHM3CameraConsole::UpdateInput): yaw -= 2 × 0.04 × input.x and pitch += 2 × 0.04 × input.y. Pitch is clamped to [-1.0472, 1.4312] rad, or [-0.9599, 0.6109] with a human shield, and yaw is wrapped to [0, 2π).

Reprisal (0x162ced8, the console camera's vtable slot 10, not created by Ghidra's analysis):

assist = AimAssistFactor()                  // 0x1628e18; 1.0 when no aim-assist target
scale  = (mode == 10) ? ShoulderSlowPercent / 100 : 1.0   // 67 -> 0.67
yaw   += input.x * 0.04 * (-2) * assist * scale
pitch += input.y * 0.04 * ( 2) * assist * scale

The clamps and wrap are unchanged. ShoulderSlowPercent (default 67, getter 0x11aa908) is read only here, and it applies only while the shoulder camera is the current camera. The aim-assist factor is described in Aim assist and lock-on.

Recentre camera

Reprisal adds a RecentreCamera action (handle 0x3743640, read into input-control +0x12). When it is down and the controls are active, ZHitman3's frame update calls 0x162648c. The action's bindings are in the encrypted .cfg files, so which layouts bind it is unknown. The recentre:

  1. Builds an interpolation from the current camera's (pitch, roll, yaw) to (0.1 rad, unchanged, rad(hitmanYaw + 180) + π/2), which is directly behind 47. Each angle is unwrapped to within π of its target.
  2. Sets the rate to 4.2 per second and t = 0, and raises the flag at ZHM3Camera + 0x1ec.

ZHM3Camera::FrameUpdate (0x162535c) then advances it:

t += min(dt, 0.016) * 4.2
u = 2t - 1;  s = (u * (2 - |u|) + 1) / 2     // ease in and out, clamped to the target when t > 1
pitch = lerp(start, target, s);  yaw = lerp(start, target, s)
stop when mode == 1, or t >= 1

As read from the code, the stop test ends the recentre after one step whenever the camera mode is 1. So it runs to completion only in the shoulder and first-person cameras. This may be a bug; it was not verified in the game.

Entering and leaving the aim camera

PC (ZHitman3::ClassFrameUpdate, zhitman3.cpp around line 2027): ToggleCamera toggles between mode 1 and mode 2 when m_bCameraToggleAllowed is set and 47 is not in a cut sequence. With m_bUseGameController set, a scoped weapon in base movement and no link action, it calls ToggleSniperModeGC instead.

Reprisal rewrites this block (0x1688b48, about 6 KB; not created by Ghidra's analysis). The input control at hitman + 0x988 gains these fields:

  • +0x994, the aim mode, written by 0x16c50d4:
    • if the active action map defines CameraAimModeHold (the Modern .cfg files), it is 1 while CameraAimModeHold is held and 0 otherwise;
    • if not (Classic), it is 2 and ToggleCamera is read as a tap into +0x99b;
  • +0x99a RecentreCamera, +0x998/+0x999 CameraZoomInHold/CameraZoomOutHold, and the PC's zoom actions.

The aim target depends on PreferFirstPerson (hitman + 0x1154): mode 2 (first person) when it is set, mode 10 (shoulder) when it is clear. The "other" aim mode is the remaining one of 2 and 10. Each frame:

aim      = controlsActive ? aimMode : 2
inAim    = mode in {2, 3, 10}
aimEff   = (mode == otherAimMode) ? 0 : aim
toggle   = controlsActive && ToggleCamera tap

if inAim and aimEff == 0:   request = true          // Modern: let go; or option changed
elif aimEff == 1 and !inAim: request = true          // Modern: held
else:                        request = toggle        // Classic tap, either way
if weapon scoped and mode == 10 and aimEff == 1: request = true

if request and m_bCameraToggleAllowed (+0x1b7d) and not in cut sequence
   and (no link action or PreferFirstPerson):
    [cancel throw mode if it is active and the weapon allows it; see Throw mode]
    if touch input and mode == 9: PopCameraMode   // touch aim button leaves the binoculars
    elif no link action and weapon scoped and base movement:
        ToggleSniperModeGC(weapon)                 // 0x16e5a14
    else:
        [keyboard layout 1 only: a throwable item starts throw mode]
        if mode == 1 and IsFirstPersonCameraAllowed:
            SetCurrentCameraMode(PreferFirstPerson ? 2 : 10)
        elif mode in {2, 10}:
            SetCurrentCameraMode(1)

IsFirstPersonCameraAllowed is inlined unchanged from the PC (g_iEnableFirstPersonMode = 1 at 0x32a5078; the same link-action list and human-shield test; not on a movement guide). It now guards the shoulder camera as well.

Reprisal's ToggleSniperModeGC (0x16e5a14) behaves as follows:

  • From mode 1, it goes to first person only when first person is allowed and preferred (0x168b254). Otherwise it goes straight to the scope.
  • From mode 2 or 10, it goes to the scope.
  • From the scope, it returns to mode 1.

The PC's m_bUseGameController test is gone, so the keyboard takes this path too. With the Modern scheme, holding aim with a sniper rifle therefore opens the scope directly, and letting go leaves it.

Two smaller additions:

  • With a keyboard and mouse, ExitBinoculars (handle 0x3743190) pops the binocular mode.
  • Throw mode and its flags (+0x9a3, +0x1249) are described in Throw mode.

Aim perspective: PreferFirstPerson

hitman + 0x1154 decides whether aiming uses the shoulder camera or the PC's first-person camera. Three things write it:

Writer When Value
ZHitman3 setup (0x16692a0 area) 47 is created option PreferFirstPerson, default false
Options handler 0x1764da8, case 15 the player changes AIM PERSPECTIVE 1 = ORIGINAL (InGame.FirstPerson), 0 = ENHANCED (InGame.ThirdPerson)
Control-config loader 0x14ea79c the input device or a layout changes gamepad or keyboard: layout == Classic; touch: unchanged

The save-details dump (0x17da040) labels option 15 AimPerspective, with the values "Enhanced (third-person)" and "Original (first-person)".

The loader also selects the action map: feralgamepadclassic.cfg, feralgamepadmodern.cfg, feralkeyboardclassic.cfg, feralkeyboardmodern.cfg or feraltouch.cfg. GamepadLayout and KeyboardLayout are 0 = Classic and 1 = Modern. So with a pad or keyboard, Classic aims in first person (the PC's camera; "CLASSIC (ORIGINAL CAMERA)") and Modern aims through the shoulder camera ("MODERN (ENHANCED CAMERA)"). The AIM PERSPECTIVE option governs touch play, and any device until the loader next runs. That the option is shown only for touch is inferred, because the menu XML is encrypted.

First-person camera

The first-person camera keeps the PC's behaviour, apart from aim assistance:

  • Update (0x1627c0c) writes the aim-assist factor into 47's turn multiplier (hitman + 0x9cc and +0x9d0), so it slows 47's yaw as well as the camera's pitch;
  • UpdateCameraPosition (0x1627d28) turns towards a lock-on target: pitch at 1.4 rad/s and 47's yaw through 0x16a0cf0.

See Aim assist and lock-on.

Field of view

PC: ZBaseCamera::Init (src/engine/camera/basecamera.cpp) sets the camera's field of view to the scene value CameraFOV, or 67.4° if the scene has none. ZHM3Camera::PushCameraFov and PopCameraFov override it for zoom views.

Reprisal adds the option FIELD OF VIEW (InGame.FieldOfView). It is entry 13 (FieldOfView) of ZDefaultOptions' option table (0x15764cc). Its details:

  • Value: an integer in degrees, held at 0x329fb98. The default is 55, both as initial data and after "reset to defaults" (0x14fcd8c).
  • Getter and setter: 0x14fc3e0 reads it; 0x14fc3ec stores it and re-applies it at once.
  • Applied by: the Feral ZBaseCamera::Init (vtable slot 18, 0x1320bf4) ignores the scene's CameraFOV and sets

    fov = 2 · atan( tan(FieldOfView / 2) · width / height )     // 0x11b303c, degrees
    

    width and height are the screen resolution (sysinterface + 0x94, +0x98). The option is therefore a vertical angle, turned into the horizontal angle the camera uses. 55° gives 69.5° at 4:3, 85.6° at 16:9 and 98.3° at 20:9.

  • Pop: PopCameraFov (0x16262fc) recomputes the same formula when the FOV stack becomes empty. It divides the aspect by the viewport's height/width ratio (ZCAMERA +0x1b0, set by SetViewport), so letterboxed views keep the same vertical angle. Otherwise it restores the pushed value.

  • Refresh: 0x16263b4 pushes the current FOV, sets 1.0 and pops again, so a changed option takes effect at once unless a zoom FOV is pushed.

The slider's range is not known; the menu XML is encrypted.

CheckClimbThroughCamera

PC: ZHM3MovementClimbThroughWindow::CalcWindowMatPos (zhitman3movement.cpp, PS2 0x35a374) puts a positional camera 175 units in front of or behind the window and 50 up, looking at the window centre + 50. It calls SetAndActivatePositionalCamera, which pushes mode 7.

Reprisal (0x16d5ab4) does the same. In addition, when CheckClimbThroughCamera is on (default on, getter 0x11a9568, cached in a static on first use) and the current mode is already 7, it first pops that positional camera (PopCameraMode(7)). Climbing through windows repeatedly no longer stacks positional cameras. That the fix targets a camera left behind after the climb is inferred from what it does.

Other camera classes

ZHM3CameraStick, ZHM3CameraDist, ZHM3CameraStrangle and ZHM3CameraVictim are in the library but not in the PS2 source:

Class What its code does
ZHM3CameraStick A console-camera variant with empty Update, Activate and Deactivate. Its input changes pitch only (0.04 per unit, same clamps). Holding CameraZoomIn sets a wanted distance of 50 and CameraZoomOut 350, eased by a ZHM3CameraDist. It has a wall check with a 5-unit margin.
ZHM3CameraDist A small helper (RTP::cBase) that eases a distance towards a target by a fixed step per frame.
ZHM3CameraStrangle, ZHM3CameraVictim Identical code. The camera sits 100 units along a bone axis of an actor (+0x30) and eases 5 % per frame towards that point, looking at another bone. If a line check from the bone finds a wall within half the distance, it pops the camera mode.

None of them is reachable. Their constructors (0x1634760, 0x1634af8, 0x16350e4) and vtables are referenced nowhere else in the library, and no camera mode selects them. They carry IOI-style property-info names (ZHM3CameraDist, ZHM3CameraStrangle, ZHM3CameraVictim as plain strings), no Feral source paths and no preferences, so they are most likely IOI's PC-era cameras compiled in but unused (inferred). They change nothing in Reprisal's behaviour.

Camera object layout

These are the Reprisal ZHM3CameraConsole members (64-bit) that the descriptions above refer to. On the PC the H/V targets are the globals and members +0x210 onwards do not exist.

Offset Member
+0x08, +0x0c, +0x10 yaw, pitch, roll
+0x170 vertical spring (ZHM3CameraSpring; K at +0x188, D at +0x18c, position at +0x194)
+0x1a0 focal point
+0x1ac wanted guide-point offset
+0x1b8, +0x1bc current V, H
+0x1c0, +0x1c4, +0x1c8, +0x1cc target V, H, armed V, armed H
+0x1d0 focal percentage
+0x1d4 current distance
+0x1d8 guide blend factor
+0x1e0, +0x1f8 desired focal-percentage and desired-distance stacks
+0x210 offset rate (unused)
+0x214 per-frame offset fraction
+0x218 distance rate, or -1 for the default pull
+0x220 3-sample smoothing queue
+0x258 auto-turn rate

Evidence

Ghidra address What it is Identified by
0x16244c8 ZHM3Camera::CreateCameras (two console cameras) CameraNormal*/CameraShoulder* getters, constructor 0x162bbb8 called twice, 1.9 stored at +0x258
0x1624850 ZHM3Camera::ActivateCamera(mode) the switch on modes 1 to 10, the keyhole/closet yaw-pitch constants, 0.3/0.4
0x1624b98 ActivateCurrentCameraMode mode bit mask 0x406, binocular item 0x10a
0x162590c, 0x1625ddc, 0x1625ed4 PushCameraMode, PopCameraMode, SetCurrentCameraMode the mode-stack shifts
0x162535c ZHM3Camera::FrameUpdate (recentre stepping) +0x1ec flag, 0.016 cap
0x162648c, 0x204e9ec, 0x204eba0, 0x204ec1c, 0x24a3bfc recentre setup and easing 4.2 rate, 0.1 pitch, (yaw + 180)
0x162bbb8 ZHM3CameraConsole constructor vtable 0x3084968; 1.4 at +0x258, 100 at +0x210, -1 at +0x218
0x162bcec ZHM3CameraConsole::Activate (slot 8) the PC's mode switch with mask 0x402 (modes 1 and 10)
0x162c720 Deactivate (slot 9) clears +0x214 and m_bActivated
0x162c1e4 UpdateFocalPoint (180, 25) at 0x8a50f8, -25, movement-type masks
0x162c9cc UpdateCameraPosition (slot 7) the wall-check minimum of 1
0x162cafc CalculateCameraPosition spring constants (225, 20), 50 in tanh, 0.01, the queue (0x162d05c)
0x162ced8 UpdateInput (slot 10) ShoulderSlowPercent, (-2, 2) at 0x8a4f38, pitch clamps
0x162d15c state copy between console cameras called only from 0x1624850
0x1634544, 0x16345d4 spring update 1/4096 threshold
0x1688b48 ZHitman3 frame update, aim camera block +0x1154, modes 2/10, CameraAimModeHold fields, 0x1625ed4 calls
0x16c50d4 ZHM3InputControl camera actions CameraAimModeHold, RecentreCamera, ToggleCamera handles (names from the initialiser in 016bfa88.c)
0x16e5a14 ToggleSniperModeGC modes 1, 2/10, 3
0x14ea79c control-config loader feral*classic.cfg/feral*modern.cfg, sets +0x1154
0x1764da8 Feral options handler case 15 PreferFirstPerson, cases 0x18/0x19 GamepadLayout/KeyboardLayout
0x1320bf4, 0x16262fc, 0x16263b4, 0x11b303c, 0x14fc3e0, 0x14fc3ec field of view tanf/atanf, π/360, 360/π, default 0x37
0x16d5ab4 ZHM3MovementClimbThroughWindow::CalcWindowMatPos 175, 50, CheckClimbThroughCamera
0x1634760, 0x1634af8, 0x16350e4, 0x1628d50 ZHM3CameraStick, Strangle, Victim and Dist constructors vtables 0x30855b8, 0x30856d0, 0x30857e8, 0x3083b70; no references

Functions marked "not created by Ghidra's analysis" (0x1688b48, 0x16244c8, 0x162c9cc, 0x162c720, 0x162ced8, the ZHM3CameraStick/Strangle/Victim slots) are absent from the decompiled tree. They are reached only through vtables or fall in gaps between functions. They were decompiled by creating the function in a read-only Ghidra session, and the disassembly was checked where constants mattered.

Port

port/hitman3/camera/_sdl/poseoffsetoverridesdl.cpp implements Reprisal's third-person camera for the built-in mod openblood.reprisal_aim: with the modern layout (modern), or with REPRISAL CAMERA (shoulder) and the original controls. Its arithmetic is in reprisalcamerasdl.h, which the host test openblood_reprisal_camera_test checks against the timing table above. With both settings off the camera is the PS2's. Compared with Reprisal:

  • Matches. The CameraNormal* and CameraShoulder* distances and offsets, the normal ones in both schemes. The hand-over: rates of 416.7 and 312.5 units/s shaped by tanh(|Δ| / 50), the three-frame average, the 0.01-unit minimum step and the default per-frame pull when settled. The offsets move by the distance's fraction from the previous frame, stop when the camera is deactivated and stay put while the distance is settled. The spring works in seconds (K 225, D 20, steps of at least 1/4096 s, the same clamps, the speed cleared when clamped upward) and counts only while the distance is settled. The climbing guide point takes x = -H and blends at 1 per second. The wall check keeps at least 1 unit. The look is scaled by 0.67 while the shoulder camera is current.
  • Two cameras in one. The port has no camera mode 10. The game's one console camera plays both cameras, keeping each one's distance, offsets, smoothing queue and rate apart, and the live state carries over at a hand-over as 0x162d15c copies it. Both therefore share one wall check, which behaves the same. The shoulder camera is entered while LT is held under the modern layout (CameraAimModeHold), only when the camera may switch, 47 has no link action and first person is allowed; it is left when LT is let go and the camera may switch. Nothing changes while the controls are off. Leaving the third-person mode (scope, first person, a pushed camera) and coming back always resumes the normal camera, as it was; Reprisal resumes whichever of modes 1 and 10 the stack held, which differs only when a pushed camera interrupts the shoulder view.
  • Checked in the game (M01, scripted pad, OPENBLOOD_TRACE_MODERN=1): LT slides the camera from 250 to 125 and back with the armed offsets (40, 17 shoulder; 40, 15 normal), the look scale is 0.67 in the shoulder camera, and with 47's back 30 units from a wall the wall check holds the camera beside his shoulder without entering the wall, at 16:9 and at 20:9 alike (nothing in the camera or aim code depends on the aspect ratio).
  • Look scale and recoil. The port applies the look factor (0.67, Standard's slowdown) to the look input of every device, before the weapon's recoil is added to the turn. Reprisal scales the whole turn in UpdateInput, recoil included, so the port's recoil kick in the shoulder camera and over a Standard target is larger by the inverse of the factor. Reprisal's first person writes the factor into 47's turn multiplier and nothing resets it when first person is left, so a slowdown can carry over into the third-person camera (inferred from the code); the port does not reproduce that.
  • Touch. The port's touch controls count as a device of their own for the aim code, as Reprisal's touch mode (3) does, not as a pad. Reprisal's touch VIEW button aims into the shoulder camera when AIM PERSPECTIVE is ENHANCED (its default); the port's touch VIEW still toggles first person, since the touch layer presses the PS2's ToggleCamera.
  • Classic. With the original controls aiming stays in first person through ToggleCamera, as Reprisal's Classic scheme does with a pad or keyboard. The modern layout is the port's pad layout; how the keyboard takes Reprisal's Modern scheme belongs to the controls (above).
  • Not implemented. RecentreCamera: its button is only in the encrypted .cfg files, so the port has none to read. CheckClimbThroughCamera: it lives in ZHM3MovementClimbThroughWindow::CalcWindowMatPos, which the port does not replace. Field of view: the port keeps its own launcher setting (83° horizontal at 16:9 by default), which Reprisal's 55° vertical default (85.6° at 16:9) would barely change.

Aim assist and lock-on

Reprisal keeps IOI's auto-aim class, ZHitman3AutoAim, and builds two kinds of aim assist on it: Standard, which slows the look speed while a target is near the aim line and bends shots towards the target, and Lock-on, which turns the camera to a chosen target and keeps it there. Both share one target search, which Feral rewrote: it now has weapon-dependent ranges, target priorities, dogs as targets, and several search windows. The PC has the same class but starts with it switched off and has no menu option for it.

PC behaviour

ZHitman3AutoAim is in src/hitman3/characters/zhitman3autoaim.cpp.

  • Switch. ZHitman3::Initialize (src/hitman3/characters/zhitman3.cpp) sets m_bAutoAimEnabled from the config value AutoAim (default true) on the PS2. The PC sets it to false and drops the AutoAim option from ZHM3Options (Game and Characters, GUI and Input). ZHitman3::IsAutoAimEnabled is m_bAutoAimEnabled || g_lEnableAutoAim. The hitman's frame update calls ZHitman3AutoAim::Update only while m_bAutoAimEnabled is set.
  • Target search (Update, GetScreenCoord, IsCoordInBounds, CheckSetAsTarget, CheckLOS). Every frame it clears the target and walks the bone objects drawn last frame (at most 128) and the static targets:
    1. Skip owner-drawn geoms, 47, non-actors, dead actors, non-humans (m_eActorSpecies != eHuman), actors that are not auto-aim targets (GetAutoAimTarget), and 47's human shield.
  • Take the actor's middle (m_vCen through its root matrix) into the camera's frame. Behind the camera (z < 0): skip. The "screen coordinate" is that camera-space point with z replaced by its distance; the 2D projection is computed and thrown away. So x and y are world units (100 = 1 m) across and up from the view axis, at the target's depth.
  • Window: |x| ≤ 40 and |y| ≤ 80.
  • In front of 47 along the camera's forward axis, and no more than 4000 units (40 m) from 47's root.
  • Value = √(x² + y²). Keep the target with the smallest value whose line of sight is clear: the aim line already hits it, or a line from the camera to the neck bone (20 units lower) or to the geom centre, extended by 50 units, hits no background, or hits the target itself.
  • Use. The target only changes the crosshair to red (ZHM3WeaponsControl in src/hitman3/characters/zhitman3weaponscontrol.cpp) and the fire position: GetFireAimPos → CalcAutoAimFirePos sends the shot to the target's neck bone (Animation::Neck, bone id 4), or its centre, unless the aim line already hits it. The camera and the look speed are never touched.

Reprisal: the switches

ZHitman3::Initialize (0x167d9c0, the function that also creates the auto-aim object at hitman +0x1148) reads two config bools:

Hitman field Config key Default Meaning
+0x1150 AutoAim true the PS2's m_bAutoAimEnabled, read as the PS2 reads it (the PC's forced false is gone)
+0x1151 Lockon true new: lock-on mode

IsAutoAimEnabled (0x1699090) becomes AutoAim || g_lEnableAutoAim || Lockon. The frame update runs the target search when AutoAim || Lockon (call at 0x1688cf0). The setters are 0x167e434 (AutoAim) and 0x167e440 (Lockon); the latter also passes the value to the touch device as control 0x2f (the touch lock-on button; see Touch Controls).

The AIM ASSIST option (InGame.AimAssist "AIM ASSIST", option 0 of the options object; getter 0x1764850, setter 0x1764da8) has three values:

Value Label AutoAim Lockon
0 DISABLED (InGame.Off) false false
1 STANDARD (InGame.ReticuleSlowing) true false
2 Lock-on (label probably the AllLevels_Interface_Options_Autoaim override, "AUTO AIM"; from strings only) false true

The getter returns 2 when Lockon is set (1 under the classic-layout workaround below), else the AutoAim value. With nothing saved it reads Lockon (default true), so Lock-on is the default.

Motion aim conflict. Setting 1 or 2 while motion aim is on (flag at 0x34edebc, setter 0x14fd358) does not apply the value: it opens the confirmation ConflictingControlsAimAssistAutoAim (or ...LockOn for 2) with the text InGame.ConflictingControlsAimAssistEnabled ("Enabling Aim Assist will disable Motion Aim"). The dialog handler (around 0x173b04c, not in the decomp tree) then turns motion aim off and sets (AutoAim, Lockon) to (true, false) or (false, true). Confirming EnableMotionAim instead turns motion aim on and both flags off. See Motion aim.

WorkaroundClassicAimAssist (default on; getter 0x11a9868). The Classic layouts have no lock-on. When the preference is on and the current device uses its Classic layout (GamepadLayout = 0 with a pad active, 0x1727008; or KeyboardLayout = 0 with keyboard and mouse active, 0x1727164):

  • the AIM ASSIST spin box's next and previous handlers (0x1564878, 0x1564aa4) cap the value at 1, so Lock-on cannot be chosen;
  • the getter shows a stored Lock-on as 1 (STANDARD);
  • the setter stores AutoAim = true and Lockon = false for any non-zero value, but sets the live hitman's flags to AutoAim = true and Lockon = true (it ORs the classic flag into both). Until the next level load (when Initialize rereads the stored keys and gets Standard), Classic play therefore runs in lock-on mode: no slowdown and no shot bending, while the lock itself never engages on a pad outside the shoulder camera (below). This looks like a Feral bug (inferred from the code; not observed in play);
  • changing GamepadLayout or KeyboardLayout (options 0x18 and 0x19) re-derives the hitman's flags from the AIM ASSIST getter: AutoAim = (value = 1), Lockon = (value = 2). The getter runs before the new layout is stored, so it sees the old layout.

The object grows from 0x144 bytes to 0x2b8. Update (0x16c371c) keeps the PS2 loop with these changes:

  1. Candidates. Alive actors (0x1487c90) whose species is below 2, so humans and dogs (PS2: humans only); the other filters are kept.
  2. Coordinate (0x16c3928). As the PS2, plus a horizontal offset (object +0x290, normally 0) added to x; target switching on touch uses it (below).
  3. Window (0x16c3a68). The PS2's fixed 40 × 80 is replaced by a choice. Bounds are inclusive; x is across, y is up and down, in world units at the target's depth:

    Condition (checked in order) x y
    Lockon off (Standard) ±AimAssistAreaX (100) ±AimAssistAreaY (140)
    Lockon on, lock request flag (hitman +0x210c) set ±450 ±330
    Lockon on, pad active, and firing or in the shoulder camera ±AutoAimGamepadAreaX (130) ±AutoAimGamepadAreaY (170)
    Lockon on, not firing and not in the shoulder camera ±40 −100 to +80
    Lockon on, otherwise (firing or shoulder camera, keyboard/mouse or touch) ±75 −120 to +96

    "Firing" is the weapons control's m_bFireWeapon bit with a weapon in hand (0x16e3534); "shoulder camera" is camera mode 10, which Reprisal adds after the PS2's eLast; "pad active" is input device mode 2 (1 = keyboard and mouse, 3 = touch). The camera page describes mode 10. The lock request flag is set only by a level-control statistics hook on CharacterKilled (0x17aed44, purpose inferred) and cleared every frame by the camera (0x1628f30).

  4. Distance (0x16c3ca8). The target must still be in front of 47. The PS2's 40 m limit is replaced by the body range of the weapon in 47's right hand (table below). With no weapon in hand, nothing is a target. Weapons outside the table (for example the Browning, item type 10, and the prop Mauser, 15) have range −1, so they get no aim assist.

  5. Priority. Each candidate gets a class from its character type (actor +0xa64, matching eCharacterType in src/hitman3/interfaces/charactertype.h; inferred from the values) and whether it holds a weapon:

    Character type Unarmed Armed
    Civilian (0) 0, and only on touch with no lock request; otherwise never a target 4
    Enemy (1), Policeman (5) 2 5
    Target (3), Optional target (6) 3 6
    VIP (2), Animal (4), other types, non-actors 1 1

    A candidate replaces the current one when there is no current one, or when both its class is at least the current class (+0x2b0) and its √(x² + y²) is no larger than the current value. The result depends on the order of the bone list: a higher-class target further from the centre does not replace a lower-class one already chosen (a quirk of the code).

  6. Line of sight (0x16c4624). The PS2's CheckLOS, unchanged in effect (neck bone − 20, line extended by 50 units).

  7. Lock-on step (0x16c3f88), new; below.

Weapon ranges

The constructor (0x16c30f0) fills seven range records of four integers (head, body, dog head, dog body) from App Registry keys AARange<Class>Head, ...Body and ...DogHead, with the defaults in the code (no defaults are registered). Through a Feral slip, the fourth value reads the DogHead key again (0x16c3324); with nothing stored, the code defaults apply.

Class Item types (EHM3ItemType) Head range Body range
Melee 37 to 61 (close-combat items, suitcase) −1 1000 (10 m)
NailGun 16 1000 1750
CQC 7 custom shotgun, 12 and 13 USP, 14 Mauser, 17 six-shooter, 18 snub-nosed, 26 Remington 1000 1750
ShortMedium 2 custom pistol, 5 custom SMG, 11 Desert Eagle, 19 Taurus, 20 Albino, 23 Enfield 1250 2000
Medium 32 to 36 (SMGs) 1750 2500
MediumLong 6 custom rifle, 24 FN2000, 25 M14, 27 SG552 2500 5000
Long 4 custom sniper, 21 and 22 air rifles, 28 to 31 sniper rifles 3000 10000 (100 m)

The dog values default to the same numbers. The lookup is 0x16c456c.

Reprisal: Standard (slowdown)

The slowdown factor (0x1628e18) is computed every frame:

factor = 1
if IsAutoAimEnabled and not Lockon and 47 holds a weapon and the search has a target:
    (x, y) = target's coordinate (step 2 above)
    t = clamp((|x| + |y|) / (AimAssistAreaX + AimAssistAreaY), 0, 1)
    factor = AimAssistSlowness + t * (1 - AimAssistSlowness)

With the defaults the look speed falls to 0.3 on the view axis and rises linearly to 1 at |x| + |y| = 240. Aiming is not required: any weapon in hand with a target in the Standard window (±100 × ±140) slows the look.

  • Third-person camera (ZHM3CameraConsole slot 10, 0x162ced8, not in the decomp tree): the yaw and pitch steps are input × 0.04 × the axis speeds × factor, multiplied again by ShoulderSlowPercent / 100 (0.67) in the shoulder camera. Pitch is then clamped to −1.047…+1.431 rad (−0.96…+0.611 with a human shield) and yaw wrapped into 0…2π.
  • First-person camera (ZHM3Camera1stPerson slot 6, 0x1627c0c): the factor is written to both look scales (hitman +0x9cc, +0x9d0), the same fields the scope and binocular zoom use.

Shots: in Standard mode the fire position is the PS2's (0x16e6a30, 0x16e5f8c): the target's neck bone (bone id 4) unless the aim line already hits it. The crosshair colour change is described on HUD.

Reprisal: Lock-on

Acquiring and keeping the lock (0x16c3f88)

The lock is a separate actor pointer (object +0x278) with an aim point (+0x280), a time stamp (+0x28c, game time in 1/1024 s) and three statics (shoulder camera last frame, fire held last frame, fire edge). Each frame, after the search:

gate    = (pad active or touch aiming) and Lockon and EnableLockon
          and 47 holds a weapon that is not the fibre wire
blocked = 47 is in one of several states (hitman +0x1b5f, +0x1b60, a timer at +0x1b64 > 0,
          two action checks 0x168deb4 / 0x16a9b8c, a movement-type check), not identified
          or (pad active and camera mode != 10)
fireEdge   = fire pressed this frame (controls enabled, hitman +0x9a6, and FireWeapon,
             +0x992 bit 0) and not last frame
enteredAim = camera mode became 10 this frame and the search has a target
trigger    = touch aiming or fireEdge or enteredAim

if not gate or blocked:  release the lock
elif trigger:
    if there is no lock:
        if the search's target is an actor: lock = target
        stamp = now
    elif the search's target == lock:
        stamp = now
    else (no target, or a different one):
        release the lock if it is dead, or if actor flag word +0xb60 bit 10 is set,
        or if more than 2.0 s have passed since stamp
    release the lock if it is flagged (+0xc22 bit 0) or a virtual check (slot +0xaf8)
    says so (both unidentified, probably dead or unconscious states)
else: keep the lock
if a lock remains: update its aim point

"Touch aiming" is the touch device's aim state (0x14ef140, inferred); the touch device must exist and be in use.

EnableLockon (default on; getter 0x11a14e8) is read only here: with it off, Lock-on mode keeps its windows and its unbent shots but never locks. On a pad the lock exists only in the shoulder camera: leaving it releases the lock. Between triggers the lock is not checked again, so a lock outlives its target's death until the next trigger (inferred from the code path).

Aim point (0x16c499c)

The camera aims at a point on the lock target, not its centre:

headPos = target's head bone (virtual HeadBoneIndex, slot +0x6c0)
d = distance from 47's head bone to the previous aim point
(H, _) = ranges of 47's weapon class (dog head range for dogs)
C = LockonCrossoverRange
if d < H:           aim = headPos
elif d >= H + C:    aim = pelvis bone (slot +0x6d0)
else:               t = (H + C - d) / C;  aim = pelvis * (1 - t) + head * t

LockonCrossoverRange has no registered default, and its getter (0x11a16e8) falls back to 0, so by default the aim point jumps from head to pelvis at the head range (12.5 m for pistols). For melee the head range is −1, so the pelvis is always used.

Turning the camera (0x1628f30)

hasLock    = IsAutoAimEnabled and a lock exists
lookInput  = pad: right stick (Stick2h, Stick2v) non-zero
             otherwise: hitman +0x9c4 or +0x9c8 non-zero (mouse look, inferred)
             touch: ScrollLocationXTouch non-zero (when the trackpad is in use)
firing     = m_bFireWeapon with a weapon in hand
if not lockedLastFrame and not firing and not (lookInputLastFrame and not lookInput):
    aim = hasLock and not lookInput
          and ((pad active and camera mode 10) or lock request flag)
else:
    aim = hasLock and not lookInput
if not aim and hasLock and the weapon's recoil offset is zero: release the lock
clear the lock request flag

Moving the right stick therefore breaks the lock, except while the weapon is recoiling. When aim holds:

  • Third person (0x162cafc): the camera's direction from the focal point is rotated towards the line from the aim point to the focal point by at most rate × the frame time (a great-circle step, 0x154b0f0), and yaw and pitch are recomputed from the new direction. The rate is the active console camera's +0x258: 1.4 rad/s for the normal camera (constructor 0x162bbb8) and 1.9 rad/s for the shoulder camera (stored by CreateCameras, 0x16246e4). On a pad the lock exists only in the shoulder camera, so pad play always turns at 1.9 rad/s; 1.4 applies to a touch lock in the normal camera.
  • First person (ZHM3Camera1stPerson slot 7, 0x1627d28): 47's body is turned to face the aim point horizontally, blending by 18 × the frame time per frame (0x16a0cf0), and the pitch moves towards the aim point's elevation at 1.4 rad/s.

Shots

In Lock-on mode the fire position is always the aim line's hit (0x16e6a30): shots are not bent to the target. The camera does the aiming.

Switching targets (touch only)

0x16c42fc, called from the touch input (FeralTouchWintel, swipe of more than 0.3 on the horizontal axis then release, and touch commands 3 and 4): with a lock in the shoulder camera, it shifts the search's x offset in steps of 10 units (sign by direction) up to 60 times, rerunning the search, until the search finds a different target that is not an unarmed civilian; it then releases the lock and reruns the search so the new target can be locked. Pads and keyboards have no target switching. Details on Touch Controls.

Other aim options

Option Key Where described
VIEW RETICLE (InGame.AimIndicator) UseAimIndicator (option 0x16) HUD
AIM PERSPECTIVE (InGame.PreferredView: ORIGINAL / ENHANCED) PreferFirstPerson (option 0xf) Third-person camera
AIM STYLE (InGame.AimInput: JOYSTICK-STYLE / TRACKPAD-STYLE) VCPAimInputStyle Touch Controls

Lock-on overlay

EnableLockonOverlay (default off) is registered, and its getter exists (0x11a15e8, not in the decomp tree), but nothing calls it. FeralLockonAssistLayout (vtable 0x302d238, singleton getter 0x12b3f98) is a Dear ImGui window titled "AutoAim Stats" (draw function 0x12b4048) listing Agent47, Target, Distance, Timer, Headshot Range, Bodyshot Range, Weapon Name and Weapon Type, or "No Target". Its setters (0x12b41d0 to 0x12b423c) are never called, so the window has nothing to show in this build.

Evidence

Address What
0x16c30f0, 0x16c3324 auto-aim constructor; AARange* keys and defaults
0x16c371c Update
0x16c3928 GetScreenCoord with x offset
0x16c3a68 IsCoordInBounds: AimAssistArea*, AutoAimGamepadArea*, 40/75/450, −100/−120/−330, 80/96/330
0x16c3ca8, 0x16c4478 CheckSetAsTarget, priority classes
0x16c456c weapon-class range lookup
0x16c4624 CheckLOS
0x16c3f88 lock-on step (EnableLockon, 2.0 s, 1024)
0x16c499c aim point (LockonCrossoverRange)
0x16c42fc, 0x16c441c, 0x16c4564, 0x16c4968 target switch, lock query, lock release, aim-point query
0x1628e18 slowdown (AimAssistSlowness, AimAssistAreaX/Y)
0x1628f30, 0x162cafc, 0x1627d28 lock camera turn (third and first person)
0x162ced8 third-person look step with slowdown and ShoulderSlowPercent
0x16e6a30, 0x16e5f8c, 0x16e542c fire position
0x167d9c0 ("AutoAim", "Lockon"), 0x167e434, 0x167e440, 0x1699090, 0x16a7578 switches
0x1764850, 0x1764da8, 0x1564878, 0x1564aa4, 0x1727008, 0x1727164 AIM ASSIST option, classic workaround
0x11a15e8, 0x12b3f98, 0x12b4048 lock-on overlay

Port

port/hitman3/camera/_sdl/poseoffsetoverridesdl.cpp reimplements both modes for openblood.reprisal_aim (aim_assist Off / Auto aim / Lock-on, default Lock-on), and port/hitman3/characters/_sdl/weaponsoverridesdl.cpp (ZHitman3::IsAutoAimEnabled) bends the shots. Reprisal's aim assist takes over from the game's own auto-aim whenever the Reprisal camera is on, or Auto aim is chosen; the aim_slowdown mod, when on, keeps the look speed and the shot bending. Compared with Reprisal:

  • Matches. The target search: people and dogs, alive and drawn last frame, in the five windows, in front of 47 and within the body range of the weapon in his right hand (none without one), ranked by character type and weapon with Reprisal's replacement rule, and seen (CheckLOS). Standard's slowdown (0.3 + 0.7·min((|x|+|y|)/240, 1)) needs only a weapon in hand, not aiming, applies in third and first person and never with Lock-on; it multiplies the shoulder camera's 0.67. Standard bends shots to the target's neck as the PS2 does; Lock-on and Off leave them on the aim line. The lock step: on a pad, in the shoulder camera, with a weapon other than the fibre wire; entering the shoulder camera with a target or each press of fire takes the target, renews the lock while it stays the target, and otherwise drops a lock that is dead or more than 2 s stale; the M13 table blocks it. The aim point: the head within the weapon's head range of 47's head, the pelvis beyond (LockonCrossoverRange 0). The turn: along a great circle from last frame's direction at 1.9 rad/s in the shoulder camera (1.4 in the normal one), broken by the right stick unless the weapon is still recoiling. The search and the lock step run every frame in the third-person and first-person cameras, as Reprisal's frame update runs them (not in the scope, where the port has no hook). "Pad active" is a pad with the touch controls off. Checked in the game: entering the shoulder camera with a guard near the aim takes the lock, the camera turns onto his head, and a push of the right stick drops it.
  • Lock-on and the crosshair. The port answers IsAutoAimEnabled false in Lock-on so that shots stay on the aim line, so the crosshair does not turn red over a target there as Reprisal's does.
  • Unidentified states. The lock step's other blocking states (hitman +0x1b5f, +0x1b60, the +0x1b64 timer, 0x168deb4, 0x16a9b8c) and its drop flags (+0xb60 bit 10, +0xc22, slot +0xaf8) are not identified, so the port drops a lock only for death and staleness. (0x168deb4 is true while 47's attack mode is throwing, 0x10000004, unless the thrown item is of type 300; 0x16a9b8c tests a state of 47's active movement equal to 20. Neither is mapped to the port's names yet.)
  • Touch and requests. No touch control aims in the port, so there is no touch lock, no lock in the normal or first-person camera, no target switching, and an unarmed civilian is never a target. The kill hook's lock request (+0x210c) and its 450 × 330 window are not reproduced; they change no lock without a trigger.
  • Classic layouts. The port's setting is not capped: Lock-on with the original controls behaves as Reprisal's live Lock-on does there, with no slowdown, no shot bending and no lock. The WorkaroundClassicAimAssist live-flag quirk needs the option changed during a level, and the port's setting is only changed in the launcher, so it cannot arise.
  • Gyro. The port turns aim assist off while gyro aim is on, matching Reprisal's conflict rule (Reprisal asks first).

Motion aim

PC. The PC game has no motion input of any kind.

Reprisal. Motion aim exists in this Android build only as two stored options and a conflict rule. Nothing in the game reads them to move the camera.

The options

Feral extended the PC's default-options table (ZDefaultOptions, src/engine/zwindows/xmlinterface/system/defaultoptions.cpp) to 22 named entries (indices 0–21; the PC has 12). The name table is built by 0x15764cc (and again in the constructor 0x15765e4); the getter is 0x15770ac, the setter 0x1577364, and the per-menu reset is the ControlsMenu branch of the defaults reset 0x14fcd8c.

Index Name Storage Reset value Range
17 VirtualControllerVibration byte 0x329fba4 1 (on) on/off
18 VibrationStrength int 0x329fba8 5 0–10 (inferred from the /10 scaling)
19 VCPAimInputStyle int 0x34edeb8 0 see Touch Controls
20 MotionAimEnabled byte 0x34edebc 0 (off) on/off
21 MotionAimSensitivity int 0x329fbb0 5 —

MotionAimEnabled is read only by the option getter (0x15770ac), the aim-assist setter (0x1764da8) and the menu's aim-assist spinbox (in ZFeralHM3HSpinbox, around 0x172c5f0). MotionAimSensitivity is read only by the option getter. A search of the whole disassembly for the two globals, their getters (0x14fd41c, 0x14fd428), their setters (0x14fd358, 0x14fd364) and the key strings found no other reader. Feral's generic motion classes (CFeralMotionSensorManager 0x211fab0, CFeralMotionSensorDevice 0x2120e84, the singleton getter 0x211fbc8) are created by the framework start-up (0x11ce254) but are never connected to the camera or the look input. The labels exist only as Switch strings (InGame.SWI.MotionAiming "MOTION AIM", InGame.SWI.MotionAimingSensitivity "MOTION AIM SENSITIVITY"); there is no AND or iOS variant. The Android settings screens in res/xml/ and the controller database assets/inputdevices.json mention no gyro or motion input.

Conclusion (inferred from the absence of any reader): motion aim is a Switch feature compiled into the shared options code; on Android it has no effect on aiming, and the menu probably hides it (the menu XML is in the encrypted pack).

The conflict with aim assist

Motion aim and aim assist cannot both be on. The rule is enforced in both directions with a confirmation dialog (ZFeralConflictingOptions):

Change Condition Dialog Text
Motion aim switched on (option 20 set to 1, 0x1577364) the AutoAim option (the AIM ASSIST spinbox) is above 0 ConflictingControlsMotionAim "Enabling Motion Aim will disable Aim Assist. Do you want to continue?"
Aim assist set to 1 (0x1764da8, option 0) MotionAimEnabled ConflictingControlsAimAssistAutoAim "Enabling Aim Assist will disable Motion Aim. Do you want to continue?"
Aim assist set to 2 (lock-on) MotionAimEnabled, and the classic-layout workaround does not force auto aim ConflictingControlsAimAssistLockOn the same

While a dialog is open the new value is not stored. The dialog's answer comes back to ZFeralConflictingOptions::v5 (0x173b04c) as a command string, and the handler does this:

Command Motion aim Registry AutoAim Registry Lockon Hitman (0x167e434 auto aim, 0x167e440 lock-on)
EnableMotionAim, CancelAimAssistAutoAim, CancelAimAssistLockOn on 0 0 off, off
EnableAimAssistAutoAim off 1 0 on, off
EnableAimAssistLockOn off 0 1 off, on
CancelMotionAim off unchanged unchanged unchanged

It then refreshes the AimAssistSpinBox (0x162c750) and the MotionAimToggle element. The spinbox named AimAssistOption is greyed out while MotionAimEnabled is set (0x172c5f0 onwards). The aim-assist values themselves are described under Aim assist and lock-on.

Port. openblood.reprisal_aim has a gyro setting: ReadGyro in port/engine/system/_sdl/sysinputsdl.cpp adds the controller's gyro rates (× 0.55) to the right stick while aiming or holding the shoulder camera, and AimAssistMode in port/hitman3/camera/_sdl/poseoffsetoverridesdl.cpp turns aim assist off while gyro is on. The conflict rule matches Reprisal (the port has no dialog: gyro simply wins). The gyro algorithm itself is the port's own, an addition that is off by default; Reprisal for Android has none to copy. Its sensitivity option (1–10, default 5) is not added: nothing in this build reads it, so what it scales is not known.

Vibration

PC. The haptics engine is the PS2's ZHapticsBase (src/engine/system/sysinputhaptics.cpp): up to 5 running effects, each an ADSR envelope per motor (ADSRRumbler), the strongest envelope value per motor sent to the pad through SetDeviceRumblePitch, with the left motor raised to at least 0.15 when it is non-zero. HapticsEnabled reads the config value VibrationMode, default 0. The PC release removed every gameplay StartHaptic call (hits, explosions, landings, crowd pushes, climb guides, shots), so the PC never vibrates; see PC Differences: Game and Characters.

Reprisal. Feral put the rumble back, added two effects and routes the result through its own controller layer with three scale factors.

Which events vibrate

Every PS2 StartHaptic call is present again in Reprisal, with the PS2 effect and the PS2 thresholds, each with time offset 0, time scale 1.0 and bRunAlways false:

Event Effect Reprisal function
Weapon fired: revolver / pump-gun or shotgun / anything else 2 / 3 / 1 0x16e3134 (WeaponRoundFire)
Hit by an explosion: damage below 50 / 50 or more 6 / 7 0x1688244 (ZHitman3::OnProjectileHit)
Hit by a projectile: weapon type 5–6 (pump-gun, shotgun) / other 5 / 4 0x1688244
Punched (close-combat hit) 8 0x1688768 (ZHitman3::TakeDamage)
Landing: fall above 25, from 100, from 300 units 10 / 11 / 12 ZHM3MovementFall (slot near 0x16cc9e4, constants 100.0 and 300.0)
Pushing through a crowd boid with factor above 0.3 9 0x16ca674 (PrimaryMove::ActorCollision)
Entering or leaving a climb guide (wall, hug wall, box, obstacle, window, scale wall, vertical line, drainpipe, ladder, balcony jump) 10 the v15/v17 slots of each climb movement, e.g. 0x16d4ba4 (ClimbBox::v17), 0x16d6164 (ClimbThroughWindow::v17)
Elevator start, stops and bumps 10, 9, 10 0x15c900c (CElevatorHouse::v31)
New: M13 heartbeat (while 47 is not yet revived) 13 on the beat, 14 0.3 s later 0x17d53b8, 0x17d4a00 (ZHM3LevelControlM13)
Options: vibration switched on 12 0x1577364 (option 10)
Options: vibration strength changed 10 0x1577364 (option 18)

The PS2 options preview used bRunAlways true; Reprisal passes false, so the preview is not felt while the game clock is stopped (inferred from Update).

The effect table

ZHapticsBase::Init (0x150ae38, absent from the decompiled tree; read from the disassembly) fills 14 rumblers instead of 12. Effects 1 to 12 are identical to the PS2 table in sysinputhaptics.cpp. The two new ones drive both motors with the same envelope (times in seconds, amplitudes 0–1, ground level 0):

Effect Attack Decay Sustain Release Attack amplitude Sustain amplitude Length
13 (heartbeat) 0.01 0.01 0.01 0.01 0.4 0.3 0.04 s
14 (heartbeat echo) 0 0.01 0.01 0.01 0.25 0.15 0.03 s

StartEffect (0x150b4bc) accepts effect numbers below 15; EvaluateEffectInfo (0x150b6a4) accepts 1–14. Times are kept in the PC's fixed-point form (1/1024 s).

The M13 heartbeat

In M13 the unrevived 47's heartbeat is now felt. In the level control's frame update (ZHM3LevelControlM13::v31, 0x17d4a00), after the PS2's health decay (hp × 0.995, floor 1) and boost decay (× 0.9):

  1. interval = 1.2 − 0.86667 × hp / maxHP seconds (PS2: max(1 − hp / maxHP, 0.3), src/hitman3/levelcontrol/levelcontrolm13.cpp), with hp the health read before this frame's decay.
  2. If more than 0.3 s have passed since the last beat and the echo flag is set: clear it and start effect 14.
  3. If more than interval has passed since the last beat: TriggerHeartBeat (0x17d53b8, which now takes only the time) records the time, plays the heartbeat sound as on the PS2 (and sets the sound's byte +0x174 to 100 unless two of its flags are set; meaning not determined), starts effect 13 and sets the echo flag (+0xc28). It no longer sets the heartbeat boost (PS2: boost = maxHP − hp when hp / maxHP < 0.8), so the boost stays 0 and the blur and slow motion (1 − (hp + boost) / maxHP) no longer ease off on each beat.

So each beat is a double pulse 0.3 s apart. The interval formula change belongs to the level's pacing as well as to vibration. The effects' envelopes run on the haptics clock (m_fActualTime, game time), which the level's slow motion (time multiplier 0.2 to 0.3) stretches: effect 13's 0.04 s lasts about 0.15 to 0.2 s of real time.

The same function also changes the revival rule. The PS2 adds 5 hitpoints whenever 47's move vector changes by more than 0.5 between two frames; Reprisal does so only when the input mode is not touch (0x1508e50), and in touch mode adds maxHP × 0.10526 (0x3dd79436) on every frame the level control's own action handle (+0xb68, the RequiemTap action of its constructor 0x17d3b90) reads non-zero. Which touch gesture RequiemTap is bound to is in the encrypted feraltouch.cfg.

Enabling and scaling

  • HapticsEnabled (0x150b134) reads the preference VibrationMode with default 1: vibration is on unless the player turns it off (PS2 and PC default 0).
  • ZHapticsBase::Update (0x150b1a4), EvaluateEffectInfo, CalcEffectResult and Cleanup keep the PS2 logic.
  • SetDeviceRumblePitch (0x150b260) is rewritten:
if left  != hw[0]: device.RumbleSetPitch(0, left);  hw[0] = left     // no 0.15 floor any more
if right != hw[1]: device.RumbleSetPitch(1, right); hw[1] = right
scale = (VibrationStrength / 10) × (AndroidHapticsModifier / 100)
if input mode == gamepad and controller type in 10..13:            // PS2, PS3, PS4, PS5 pads
    scale ×= AndroidDualshockHapticsModifier / 100
low  = (int16)(scale × hw[0]);  high = (int16)(scale × hw[1])
if device has a Feral controller id: controller.Rumble(low, high)   // 0x1c0db4c → vtable +0x58
Setting Default Effect
VibrationMode (GAMEPLAY VIBRATION) on gates all game rumble
VibrationStrength (option 18) 5 scale / 10
AndroidHapticsModifier 200 scale / 100
AndroidDualshockHapticsModifier 150 further scale / 100 for PlayStation pads

The controller types come from the name table at 0x1fb996c: PS2Gamepad 10, PS3Gamepad 11, PS4Gamepad 12, PS5Gamepad 13 (types are matched from inputdevices.json). The type is read by 0x14ea8e8 (default 0x21 when no controller is found). The game's own RumbleSetPitch on ZGameControlWintel (slot 16, 0x14ef854) is empty, so the Feral call is the only path. On Android the controller is CAndroidFeralController, whose rumble (0x21e83fc) averages the two motors and drives the vibrator with amplitude min(1, sqrt(avg / 65535) × HapticDeviceStrength) × 255 (0x21ead9c); HapticDeviceStrength comes from the per-model preference HapticDeviceStrength_<model> (CAndroidFeralGame::v115, 0x123e9c8).

Unresolved: the motor values the game hands over are at most 2.0 × 1.0 = 2 (or 3 on a PlayStation pad) out of 65535, which would make rumble almost imperceptible. Either the strength option's range is far larger than 0–10 or a rescaling step was missed; this was not measured on a device.

The menu toggles

Label XML element Class Selectable when Option
GAMEPLAY VIBRATION VibrationToggle ZFeralVibrationToggleOption (v12 0x1743748) the device can vibrate (0x14ef6b0), or the current input is a gamepad VibrationMode (inferred from the label)
VIRTUAL CONTROLLER VIBRATION VCPVibrationToggle ZFeralVCPVibrationToggleOption (v12 0x1743988) the device can vibrate and the current input is touch VirtualControllerVibration (option 17)

Both are ZHM3ToggleOptions created by the element factory (0x175f4ec, strings VibrationToggle, VCPVibrationToggle); their v24 (0x17437c4, 0x17439f0) set the On/Off text and the ToggleOn#/ToggleOff#/ToggleOnGray# children. The touch controls' own haptics (engageHaptic, boundaryHaptic, pressHaptic in VirtualControlPad/VCPConfig.xml) are scaled by VibrationStrength / 10 when option 17 is on and by 0 when it is off (0x14ed568); see Touch Controls.

ZDisablerToggleOption (v24 0x1742f74) is a generic toggle that, after updating itself, looks up two other elements named in its XML and enables the first when it is on and the second when it is off. Which options use it is set in the encrypted menu XML (not determined).

Port. Without the setting below the port keeps the PS2 rumble (ZGameControlDeviceSDL::RumbleSetPitch, port/engine/system/_sdl/sysinputsdl.cpp). openblood.reprisal_aim vibration turns on Reprisal's:

  • Effects 13 and 14 with the table above, played by the port beside the game's table (which ends at 12) and mixed by the stronger value, as CalcEffectResult does; not while the game clock stands still. They run on the haptics clock (m_fActualTime, a frame behind as EvaluateEffectInfo reads it), so M13's slow motion stretches them as it does Reprisal's.
  • The M13 heartbeat: Reprisal's interval from the health before the frame's drain, the double pulse (the echo more than 0.3 s after the beat), and no heartbeat boost, so the picture no longer clears on each beat (port/hitman3/levelcontrol/_sdl/levelcontrolm13overridesdl.cpp). Seen in a scripted M13 run (modern rumble: lines with OPENBLOOD_TRACE_MODERN=1). Not reproduced: Reprisal's touch revival (RequiemTap, whose gesture is in the encrypted feraltouch.cfg; the port's touch controls revive 47 with the move stick, as the PS2 rule does), the heartbeat sound's byte +0x174 and the five-effect limit StartEffect puts on 13 and 14, which the port plays outside the game's table.
  • The default: with no profile's choice yet, the game's VIBRATION option is turned on, so new profiles have it on; a profile's saved choice still wins.
  • The scale: vibration_strength (0–10, default 5) / 10 × 2 (AndroidHapticsModifier), × 1.5 (AndroidDualshockHapticsModifier) on PS3, PS4 and PS5 pads, clamped to full strength; the second motor takes the value as it is instead of the PS2's on or off.

On the strength: the disassembly of 0x150b260 confirms the reading above. The scaled 0–1 values are converted to integers with no further factor (fcvtzs without fixed-point bits) and passed unchanged as the controller's 16-bit motor values (0x1c0db4c), so Reprisal hands over at most 2 (3) out of 65535. This looks like a missing × 65535; the port applies the scale to the motors' full range. The left motor's 0.15 floor, which Reprisal dropped, stays: it is applied in the game's SetDeviceRumblePitch before the port sees the value. HapticDeviceStrength and the Android vibrator's curve are not reproduced (the port drives the pad's motors).

Throw mode

PC. ZHM3InputControl::UpdateBaseActions (src/hitman3/characters/zhitman3inputcontrol.cpp) copies ThrowItem into m_bThrowItem. On the keyboard, DropItem=fasttap(kb,g) and ThrowItem=holddown(kb,g) share G: a tap drops, a hold winds up. With UseGameController the PS2 logic applies: ThrowItem only counts after it has been held 0.5 s, and drop actions are ignored for 0.5 s after a cut sequence. ZHitman3::ControlActions starts ZHitmanActionThrowItem while ActionThrowItem() (m_bActive && m_bThrowItem) holds. ZHitmanActionThrowItem::Update (zhitman3actions.cpp) winds up while ActionThrowItem() is true: force = min(t / (frames × 0.04), 8191/8192); when it becomes false it throws at once with strength force × (4.5 large item, else 6.5) × (30 × Δt + 0.125). A throw cannot be called off.

Reprisal. Throwing becomes a mode with its own state, driven differently per input device and layout. Two actions are added: FeralThrowModeToggle (handle 0x3743700, label "Throw Mode" on keyboard) beside ThrowItem ("Aim/Throw Mode" in the Modern layout, "Throw" in Classic).

Input state

The input control (ZHM3InputControl, at Hitman + 0x988) gains:

Offset Field Meaning
+0x1b m_bThrowItem throw mode on (what ActionThrowItem() reads)
+0x2a gun latch Modern layout: throw the held firearm
+0x2c throw state 0 = release, 1 = keep winding, 2 = call off (and drop)

The PS2/PC 0.5-s hold delay and the 0.5-s cut-sequence suppression are gone.

Per frame (ZHM3InputControl actions, 0x16c51b8)

dropItem = DropItem.Digital() or (active and state == 2)
switch input mode:
  gamepad, Classic layout (GamepadLayout 0):
      if ThrowItem.Digital(): mode = not mode; if not mode: state = 0
      if mode and 47 has no right-hand item: mode = false
  gamepad, Modern layout (GamepadLayout 1):
      if not ThrowItem.Digital(): mode = false; latch = false
      else:
          if not mode and not already throwing: mode = true
          if mode and (fire or dropItem): mode = false; latch = false
      if right-hand item is a firearm and ThrowItem held and FeralThrowModeToggle pressed:
          latch = not latch; mode = latch                       // GamepadThrowGunCombo
  touch:
      if ThrowItem.Digital(): mode = not mode
      if mode and 47 is aiming (camera mode 3 or 9, or the aim flag): mode = false
      if the right-hand item is a coin (HM3 type 300) and not throwing and no other action queued:
          mode = true                                            // a coin is always ready to throw
      if mode and (fire or dropItem): mode = not mode
  keyboard and mouse:
      if FeralThrowModeToggle.Digital(): mode = not mode
      if mode and (fire or dropItem): mode = false
if active and state == 2: state = 1
if 47 is throwing (current action is ThrowItem, 0x10000004) and active:
    if fire or fire2: state = 0
    elif dropItem:    state = 2
    elif mode:        state = 1

"Fire" is FireWeapon, "fire2" FireWeapon2 or FireWeapon2b. The gamepad layout is the preference GamepadLayout (0x1726f3c); the input mode is the input manager's field +0x14 (0–1 keyboard and mouse, 2 gamepad, 3 touch; inferred from how each value is used).

What the player does

Input Start Aim Throw Call off
Classic pad press ThrowItem camera press ThrowItem again press DropItem, then ThrowItem (as the code reads)
Modern pad hold ThrowItem (Aim/Throw) camera press FireWeapon let go of ThrowItem, or press DropItem
Keyboard and mouse press FeralThrowModeToggle mouse click FireWeapon press DropItem, or FeralThrowModeToggle again
Touch tap the throw button (coins: always ready) drag tap the throw button —

The tutorial texts confirm these (Tutorial_08_Distraction_GamepadClassic, …Modern, …M&K, …Touch). With a firearm in hand in the Modern layout, ThrowItem aims the gun; the firearm is thrown only after HOLD ThrowItem + PRESS FeralThrowModeToggle (InGame.GamepadThrowGunCombo, "[UPDATED] HOLD {ThrowItem} + PRESS {FeralThrowModeToggle}"), which sets the latch. CanThrowItem (0x168ebfc) also refuses a throw from the aim camera in the Classic gamepad and keyboard layouts, while a drop is pressed, and for a firearm in the Modern layout without the latch (partly inferred: the conditions are read from code, their names from usage).

The throw action

ZHitmanActionThrowItem::Execute (0x16ae2e4) and Terminate (0x16ae3f4) do what the PS2 does (force third person through 0x16a4454, also leave camera mode 3 through 0x1625ddc, crosshair type 2 white, remember the hand), except that PushDesiredCameraDist(150) is skipped in touch mode. Update (0x16ae454, absent from the decompiled tree) reads the new state (Hitman +0x9a3 mode, +0x9a6 active, +0x9b4 state):

  1. Not yet throwing, and either the first frame or active and mode: wind up exactly as the PS2 (force = min(t / (frames/25), 8191/8192)), or end the action if 47 is on a movement guide.
  2. Not yet throwing and not winding: if active and state 0, start the throw (PS2 code). Otherwise call it off: play the tighten animation backwards, blend 1 − p with p = min((now − tCancel) / (frames/25), 1), where tCancel is taken on the first cancel frame; when p reaches 1 the action ends and 47 keeps the item.
  3. Throwing: as the PS2, except that in touch mode the force is set to 8191/8192, so touch throws are always full strength. The step-2 test also runs during the throw: if active is cleared or the state becomes 1 or 2 (for example a new Classic ThrowItem press), the action switches to the call-off path (as the code reads; not observed).

No throw arc or trajectory display was found (no string or code for one).

Port. With the modern layout and the pad driving 47, the port runs the Modern gamepad rules above: SModernPadSDL::StepThrow (port/engine/system/_sdl/sysinputsdl.h) keeps throw mode, the gun latch and the state, with LT as ThrowItem, RT as FireWeapon, D-down as DropItem and L3 as FeralThrowModeToggle. The game still reads ThrowItem as the PS2's holddown(leftstick), so the layout holds L3 throughout play and the console input reader (port/hitman3/characters/_sdl/inputcontroloverridesdl.cpp) sets the fields UpdateBaseActions reads so that it reports throw mode at once (no 0.5 s delay) and no longer ignores drops after a cut sequence. A firearm is thrown only with the latch, as CanThrowItem has it. ZHitmanActionThrowItem::Update (throwoverridesdl.cpp) follows 0x16ae454: wind-up while throw mode is on, the throw when the state is 0, otherwise the call-off, which plays the wind-up backwards over its length (its start kept in m_fTimeThrowEnd, as Reprisal does) before the action ends with 47 still holding the item. RT alone fires and never winds up a throw. A throw called off by D-down drops the item when it has unwound. Differences: the layout has no FireWeapon2; the port's state is worked out before ControlActions rather than after it, so it anticipates the first frame of a throw (the state is set to 1 while throw mode is on and no throw is under way). The Classic press-press mode and the keyboard and touch rules are not reproduced: the port has no Classic gamepad scheme of its own, the keyboard keeps the PC's ThrowItem and touch keeps its own throw button (Touch Controls). Checked in M05 with scripted input and a kitchen knife: LT held winds up at once, RT throws, LT let go unwinds and keeps the knife, D-down unwinds and then drops it (modern throw: lines with OPENBLOOD_TRACE_MODERN=1). The call-off starts from the full wind-up whatever was reached, as 0x16ae454 blends 1 − p from its first call-off frame.

Fast dismount and other movement input

Jump down from ladders, drainpipes and walls

PC. On a ladder, drainpipe or vertical line (ZHM3MovementClimbVerticalLine::Move) and on a climbing wall (ZHM3MovementClimbWall::Move), holding crouch (STATUSEXT_CrouchSneaking) while not climbing up (and, on a wall, not moving sideways) switches to the lean animation. In MoveLeanFall the lean advances while crouch stays held (or once past 0.8), runs backwards if it is let go, and at 0.5 turns into the fall: the player must keep crouch held through half the lean.

Reprisal. A new action, FastDescend, replaces crouch as the trigger, and the lean always completes:

  • The constructors of ZHM3MovementClimbWall (0x16d0010), ZHM3MovementClimbLadder (0x16d8c28) and ZHM3MovementClimbDrainPipe (0x16d9870) each create a FastDescend action handle.
  • Vertical line Move (0x16d7d58): if FastDescend is down, 47 is not moving up (status bits & 5 != 1) and the status is eAmbient (5), the status becomes eLean (8) at progress 0.
  • Wall Move (ZHM3MovementClimbWall::v19, 0x16d0ec4): the same test against eClimbingGuide (9) sets eLean (10). The sideways-movement exclusion is gone.
  • MoveLeanFall (vertical line 0x16d8498, wall inline in 0x16d0ec4): the lean progress only increases (+ Δt × 25 / (frames − 1)); at 0.5 it becomes the fall (on a wall only if CanPlayFromLeanToFallAnim, 0x16d1f04). Crouch is no longer read.

The context prompt (0x1718bf4) shows JUMP DOWN (InGame.FastDismount) with the {FastDescend} button (the {crouch} button on touch) and the word HOLD (InGame.Hold) while 47's movement type is HM3MC_CLIMBWALL (10), HM3MC_CLIMBLADDER (17) or HM3MC_CLIMBDRAINPIPE (18) (0x168de80, mask 0x60400). JUMP DOWN is this prompt label, not an option. The tutorial says "To jump down quickly, press and hold {CrouchSneak}", so on a gamepad FastDescend is presumably a hold on the crouch button; its binding is not in the library's strings (see Control schemes).

Port. With the modern layout and the pad driving 47, RS held on a ladder, drainpipe or climbing wall is FastDescend (RS does not toggle the crouch there). The climbs are not overridden: the console input reader (port/hitman3/characters/_sdl/inputcontroloverridesdl.cpp) reports CrouchSneak on a climb as FastDescend, and keeps it held while the climb is in its lean. Since the game's lean starts on crouch and only goes forward while crouch is held, this gives Reprisal's behaviour: FastDescend starts the lean, which always completes and turns into the fall at 0.5 (on a wall only if CanPlayFromLeanToFallAnim, as in both games). The wall's sideways exclusion needs nothing: in the game it only applies while 47 climbs up, which already stops the lean. The Reprisal touch layout does the same with its crouch button held past its 1.0 s hold (ex3, the touch FastDescend; TouchControlsReprisalFastDescend), and there, as in Reprisal, the crouch button's tap (the port's crouch toggle, which holds crouch) no longer leans off a climb. With the Reprisal HUD style, reprisal.lua shows the prompt as HOLD, the RS (R3) button and JUMP DOWN whenever no action is offered on the climb, and on touch HOLD JUMP DOWN (obm.input.fast_descend_prompt; the HUD's touch prompts show no button glyph). Without the modern layout or the Reprisal touch layout the PS2's hold-crouch lean is kept, and the keyboard keeps it too: the port has no keyboard FastDescend (Reprisal's keyboard binding is in the encrypted feralkeyboardmodern.cfg). Checked in M04 with scripted input: RS held on a drainpipe starts the lean, which completes into the fall after RS is let go. (At the drainpipe So04D_DrainPipe_A_01, after the test placed 47 there, the fall went through the yard into the basement with the original controls too; that is not the dismount's doing.)

Other movement input

  • Sprint. ZHM3InputControl keeps the PC's two movement readers: the keyboard reader (0x16c580c) reads Run (label "Sprint"), the gamepad reader (0x16c5724) does not, as on the PC; the gamepad reader also ignores CrouchSneak while bit 3 of a game-data flag word (+0x14a0 → +0xec) is set (meaning not determined). How Run reaches the game from a gamepad is part of the layouts (Control schemes).
  • Crouch speed. CrouchSpeedPercent is covered in Gameplay Rules.
  • Camera actions. The camera reader (0x16c50d4) adds CameraAimModeHold, RecentreCamera, CameraZoomInHold and CameraZoomOutHold; see Third-person camera.

Unresolved

  • Button assignments. The Modern and Classic bindings are in feralgamepadmodern.cfg, feralgamepadclassic.cfg, feralkeyboardmodern.cfg, feralkeyboardclassic.cfg and feraltouch.cfg inside the encrypted packs. Which button or key each action uses, whether DragBody, PlaceRetrieve and PickupDisguise are holds, and which schemes bind RecentreCamera and FastDescend could not be read.
  • Menus. The menu XML is encrypted: the FIELD OF VIEW slider's range, whether AIM PERSPECTIVE is shown only for touch, the Lock-on choice's label, where "(MODIFIED)" is set, the option behind GAMEPLAY VIBRATION and the users of ZDisablerToggleOption are not known.
  • Dead zone. Feral's controller layer may apply its own dead zone; it was not examined.
  • Rumble strength. As read, the motor values handed to Feral's controller call are at most 2 (3 on a PlayStation pad) out of 65535, which would be almost imperceptible. A rescaling step may have been missed; this was not measured on a device.
  • Camera. The offset rate stored at +0x210 is never read; the offsets freezing when 47 draws or holsters with the distance settled is inferred, not observed; as read, RecentreCamera stops after one step in the normal camera. The PC executable's climb-guide blend rate was not checked (the PS2 source's is used as the PC value).
  • Lock-on. 47's "blocked" states (hitman +0x1b5f, +0x1b60, +0x1b64 and two action checks), the actor flags +0xb60 bit 10 and +0xc22, the virtual slot +0xaf8, and the system-interface time field at +0x5c are not identified. The Classic live-flag quirk is inferred from the code, not seen in play.
  • Movement state flags. The meaning of several flags used by the Modern run cap and by the input reader (game data +0x14a0 → +0xec, hitman +0x9a6, +0x990, +0x2125, +0x2127) is not determined.
  • Unused classes. ZHM3CameraStick, ZHM3CameraDist, ZHM3CameraStrangle, ZHM3CameraVictim and FeralLockonAssistLayout are never constructed or fed; that the camera classes are IOI's unused PC-era code is inferred.