Skip to content

Clumsy mod problem #306

Description

@DrHush47

[Bug] Clumsy mod breaks Space key (Blend In) + ragdoll never activates without SMF

Summary

The Clumsy mod has two critical bugs that make it effectively non-functional in the current version of HITMAN World of Assassination:

  1. Space key is silently consumed every frame, breaking the "Blend In / Exit Blend In" action.
  2. Ragdoll never activates unless the SMF (Simple Mod Framework) brick is installed, making the mod useless for anyone using ZHMModSDK alone.

Bug 1: Space key conflict with Blend In

Description

Clumsy.cpp, in OnFrameUpdate(), polls the input action eIAKBMCover on every single frame:

// Clumsy.cpp, OnFrameUpdate()
ZInputAction s_RagdollAction("eIAKBMCover");
if (Functions::ZInputAction_Digital->Call(&s_RagdollAction, -1)) { ... }

eIAKBMCover is mapped to Space by default in the game's input system (Cover / Vault / Blend In cancel).

Calling ZInputAction_Digital consumes the digital input state for that frame. As a result, the Glacier 2 engine never receives the Space key press in ZBlendInEntity::OnCancel(), and the player cannot exit a Blend In action (e.g. sitting on a bench, reading a newspaper) while the Clumsy mod is loaded — even when the ragdoll is inactive.

Steps to Reproduce

  1. Install Clumsy mod (ZHMModSDK, no SMF)
  2. Load any mission
  3. Find a Blend In interaction (bench, newspaper, bar stool, etc.)
  4. Press Space to start Blend In
  5. Press Space to try to exit Blend In
  6. Result: Nothing happens. The player is stuck in the Blend In animation indefinitely.

Expected Behavior

Space exits the Blend In action normally when the ragdoll is not being triggered.

Suggested Fix

Use a different, non-conflicting input action for the ragdoll trigger (e.g. eIAKBMInventory = I/Tab), or better yet, use raw Windows GetAsyncKeyState() for a dedicated key that has no binding in Glacier 2's action map.


Bug 2: Ragdoll never activates without SMF brick

Description

Clumsy.cpp, in OnFrameUpdate(), has a hard guard that blocks all ragdoll logic if GetEntities() returns false:

// Clumsy.cpp, OnFrameUpdate()
if (!GetEntities()) return;

GetEntities() searches the scene for the entity type [assembly:/_sdk/get_up.brick].pc_entitytype, which is a resource provided only by the Clumsy SMF mod package (get_up.brick). When the player uses the ZHMModSDK .dll version of Clumsy without the accompanying SMF brick deployed, GetEntities() always returns false, and the ragdoll code is never reached on any frame.

This means the mod is completely non-functional when used as a standalone ZHMModSDK plugin without SMF.

Steps to Reproduce

  1. Install only Clumsy.dll via ZHMModSDK (no SMF)
  2. Load any mission
  3. Press the configured key
  4. Result: Nothing happens. No ragdoll, no animation, no feedback.

Expected Behavior

ActivatePoweredRagdoll should be called directly on the local player character regardless of whether the SMF brick is present. The m_ShakeEntity and m_MusicLoop pins should be called conditionally (null-checked) since they depend on the brick.

Suggested Fix

Make GetEntities() non-blocking — call it for optional entity setup but do not return on failure. Guard only the entity-specific calls with null checks:

// Non-blocking: try to get optional SMF entities, but continue regardless
GetEntities();

if (m_Ragdolling) {
    Functions::ZHM5BaseCharacter_ActivatePoweredRagdoll->Call(...);

    // Optional SMF entities — null-checked
    if (m_ShakeEntity)
        m_ShakeEntity.SignalInputPin("Activate");
    if (m_MusicLoop)
        m_MusicLoop->Play(true);
}

Environment

Field Value
Game version HITMAN World of Assassination (Epic Games, latest)
ZHMModSDK version 4.0.2
SMF installed No
OS Windows 11

Additional Notes

  • Both bugs exist independently and can be fixed separately.
  • Bug 1 affects all users of the mod regardless of SMF.
  • Bug 2 affects users who use the ZHMModSDK .dll without SMF.
  • After applying both fixes, the mod works correctly as a standalone ZHMModSDK plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions