Level gameplay and stealth systems¶
This page documents how Hitman: Blood Money's interactive stealth and sandbox systems work inside a loaded level: disguises and security zones, doors and keycards, CCTV cameras and VCRs, body containers and hiding closets, climbables and movement guides, elevators, sabotage/accident devices, and how they connect to NPC perception, objectives, and the pause map.
Every class and property name comes from the decompiled C++ in src/.
- For actors, 47's state machine, animation and crowds, see Characters, AI and the player.
- For the level table, level controllers and scene scripts, see Missions, scenes and scripts.
- For how events, messages and contextual actions are dispatched, see Events, messages and actions.
- For how custom levels and the Blender add-on author these systems, see New levels and Blender level editor.
Disguises, security zones and trespassing¶
Trespassing is evaluated from two inputs: the zone 47 currently stands in and the outfit (ZHM3HmAs) he wears.
Security zones¶
- Zone flags (
ESecurityZoneinsrc/hitman3/background/securityzonetype.h): bitmask valueseZone1(1),eZone2(2),eZone2A(4),eZone2B(8),eZone3(16),eZone3A(32),eZone3B(64), andeZoneMegaForbidden(128). Serialized.PRPproperties use the companion enumESecurityZone_PATCH(0..8) insrc/hitman3/background/securityzone.h. - Box zones (
ZSecurityZone) (src/hitman3/background/securityzone.h,CBaseEvent<ZGEOM>): spatial zone volumes carryingm_eZone,m_iSecurityLevel, and enter/leave messagesm_msgStart/m_msgStop. - Room-list zones (
ZZoneControl) (src/hitman3/background/zonecontrol.h,CBaseEvent<ZGEOM>): maps lists ofZROOMreferences (REFTAB m_Rooms) to a security zone (m_eZone, queried viaIsRoomInList(ZROOM *)). Campaign missions attachZoneControlobjects (e.g.ROOT\ZoneControlin M01) to assign rooms to public, restricted, or guarded zones. - Access check. On a zone change or validation request, 47 checks the outfit’s allowed-zone mask, then calls the level controller if the mask passes. The base
IsHitmanAllowedHerereturns true.ZHitman3::IsInUnallowedZonechecks the resulting clearance and required headwear and attached item. Its result setsVISIBLE_InUnallowedZone.
Outfits, cloth bundles and blowing cover¶
- Outfit specification (
ZHM3HmAs) (src/hitman3/background/hm3hmas.h,ZGROUP): defines a wearable disguise:m_eDressQuality(eQualityBadthrougheQualityHitman),m_AllowedZones(ZBitfield<ESecurityZone>),m_rtWeaponsAllowedandm_rtItemContainerAllowed(weapons and containers that may be carried openly in this outfit),m_iDisguiseGroup,m_bMayUseLadders,m_rClothBundleGroup,m_FootwearMaterial.
- World clothing pickups (
ZHM3ClothBundle) (src/hitman3/background/clothbundle.h,ZSTDOBJ): folded disguise bundles placed in rooms, pointing tom_rHitmanAs, trackingm_bBloody, and carrying up to three accessory geoms (m_aAccessoryGeoms[3]). - Disguise degradation (
ZClothTracker) (src/hitman3/background/clothtracker.h): ticks every0.1 sto lower each actor's suspicion metricfQuality(1.0clean →0.5suspected →0.0blown) based on dress quality, notoriety, distance,ZHM3ActorProperties::m_prtKnownHitmanAses/m_fRecognizeSpeedKnown, andeZoneMegaForbidden(degrade speed100), emittingePerceptionInfo_DISGUISESUSPECTEDandePerceptionType_CoverBlown. - Frisk checkpoints (
ZFriskBox) (src/hitman3/background/FriskBox.h,ZSTDOBJ): links checkpoint guards (m_rGuards), outfit rules (m_rPerfectHMAs,m_rForbiddenHMAs,m_rModifiableHMAs),m_rIgnoredWeapons, and suitcase confiscation (sConfiscatedSuitcase).
Doors, locks and keycards¶
Interactive openings derive from ZOpeningBase. The two door classes use its subclass CDoorBase; the window inherits ZOpeningBase directly. Their definitions are in src/hitman3/background/doors.h:
| Class | .PRP controller |
Role |
|---|---|---|
CDoor |
SingleDoor |
Single-panel swinging or sliding door (attached to a ZSTDOBJ). |
CMultiDoor |
MultiDoor |
Multi-panel or double door (attached to a ZGROUP whose child ZSTDOBJs are the door leaves). |
ZWindowNormal |
— | Breakable/openable window opening. |
Key serialized properties on doors:
InitialState(EInitialDoorState):IDS_CLOSED,IDS_OPEN, orIDS_LOCKED.m_eOpenDirection(EOpenDirection): away from operator, toward operator, or both ways.m_eLockPickable(ELockPickable):IMPOSSIBLE,HARD, orEASY.AutoClose: whether the door closes automatically after opening.m_eShotResponse(EShotResponse:NOTHING,OPEN,UNLOCK),m_ePenetrableBy,m_bKeyHole(enables keyhole peeking viaSPeekKeyHoleRequest),m_fSoundInsulation.- Access & linking:
m_szKeyCard,m_iPathfinderDoorKeyMask(matched against Pathfinder4ZLinkdoor links),m_rKeyCardReader/m_rKeyCardReader2,m_rLinkedDoor.
Keycard readers (CKeycardReader) (src/hitman3/background/keycardreader.h) target either an eDoor or eElevator (m_rControlledObject), check m_szKeyCardTemplates / m_szKeyCard, and register the contextual AT_USEKEYCARD action.
Security cameras, CCTV and tapes¶
ZSecurityCamera(src/hitman3/background/securitycamera.h): sweeps between statesCS_OFFLINE,CS_TURNING, andCS_WAITusingm_fTurnRange,m_fTurnTime,m_fWaitTime,m_fRange,m_fFOV, andm_fTiltAngle.- References its visual parts and wiring:
m_rHeadObject,m_rLEDObject,m_rFuseBox,m_rTargetDisplay,m_iRadioChannel. - Tracks up to 30 spotted bodies (
m_BodyArray[30]), renders picture-in-picture feeds (SetupPictureInPicture), responds to gunfire (msg_ProjectileHit), and marks 47 on tape (m_stats.lCaughtOnTape) viaOnObjectVisible.
- References its visual parts and wiring:
ZVCRregisters itself as the recipient of the Steal Tape action. Its handler sets the level controller’s tape-stolen flag, clears the rating statistic, hides the action and starts 47’s animation.
Body containers and hiding closets¶
CBodyContainer(src/hitman3/background/bodycontainer.h,CBaseEvent<ZGROUP>): containers with typeeBCType(BC_CRATE,BC_DUMPSTER,BC_GARBAGETRUCK), stateeBCState,m_rContainedBody, andm_bRemoveBodies(for compactors/trucks). ExposesAT_BODYCONTAINERso 47 can dump or conceal bodies.- Hiding closets: implemented on door geoms paired with 47's closet action state (
ZHM3ActionControl::eHideInCloset/eExitCloset, status flagsSTATUSEXT_InCloset = 0x40000andVISIBLE_InCloset = 0x1000), notifyingZHM3LevelControl::OnHitmanHideInCloset(ZGEOM *pDoor).
Climbables and traversal guides¶
Vertical and parkour traversal uses movement guide geoms rather than arbitrary geometry collisions:
ZHM3HitmanMovementGuideandZHM3MovementGuideList(src/hitman3/background/hitmanguide.h,ZSTDOBJ):- Guide types (
EHM3GuideType):eClimbWall,eLedge,eClimbBox,ePassObstacle,eWindow,eScaleWall,eLadder,eDrainPipe,eJumpBalcony. - Directional entry/exit mask (
m_iMountDismountMask): flags foreMountTop,eMountBottom,eMountRight,eMountLeft, matchingeDismount*flags, and halfway mount/dismount variants.
- Guide types (
- Each guide type drives a dedicated
ZMovementBasesubclass (src/hitman3/characters/zhitman3movement.h):ZHM3MovementClimbLadder,ZHM3MovementClimbDrainPipe,ZHM3MovementHugWall(ledges and pipe transitions),ZHM3MovementClimbThroughWindow,ZHM3MovementJumpBalcony,ZHM3MovementScaleWall,ZHM3MovementPassObstacle,ZHM3MovementClimbWall, andZHM3MovementClimbBox.
Elevators¶
Elevators are full multi-floor dynamic assemblies (src/hitman3/background/elevator.h), registered in ZHM3GameData::m_rElevators:
CElevatorHouse(PRIORITY_Elevator),CElevatorPanel,CElevatorButton, andCRequestElevatorManager.- Supports
E_NORMALpassenger cars andE_FOODELEVATORdumbwaiters, up to 64 occupancy cells (sElevCell), roof hatch climbing (AT_CLIMBHATCH/eClimbHatch), elevator strangulation (AT_STRANGELINELEVATOR/EDamageType::STRANGLE_IN_ELEVATOR), and NPC elevator navigation (PWA_ENTERELEVATOR/PWA_EXITELEVATOR).
Items, sabotage devices and signature accidents¶
- Item hierarchy (
src/engine/geomsextend/zitem.h,src/hitman3/characters/hm3items.h):ZHM3Item,ZHM3ItemWeapon,ZHM3ItemWeaponCustom,ZHM3ItemTemplate,ZHM3ItemTemplateWeapon,ZHM3ItemBomb,ZHM3ItemContainer, andZHM3ItemAmmo, covering 320EHM3ItemTypeentries (src/hitman3/characters/hm3itemtype.h) grouped intoGUN,SMG,NONCONCEALABLE,KNIFE,BOMB,SYRINGE, andFIBER_WIRE. - Interactive level devices:
ZPlaceBomb(src/hitman3/background/placebomb.h): rigged placement spots (PLACEITEMTYPE_BOMB/SUITCASE) referencingm_AffectedGeomsandm_rRigGeom(used for chandeliers, winches, and structural drops).ZLightSwitch(src/hitman3/background/lightswitch.h): toggles room lights and notifiesalllevels\levelcontrolso nearby NPCs investigate darkness.ZUsePoint(src/hitman3/background/usepoint.h): scripted NPC activity stations (m_fProbability,m_bLocked,m_rRelocBox) that give guards and civilians ambient tasks (drinking, inspecting, smoking, etc.).
- Built-in sabotage and accident actions (
src/hitman3/characters/zhitman3actions.h):HITMANACTION_Syringe(poison, sedative, heart-attack),HITMANACTION_PoisonBottle,HITMANACTION_OpenGas,HITMANACTION_DropWeight,HITMANACTION_PourFluidOverDevice,HITMANACTION_BreakUtilBox,HITMANACTION_PushActor,HITMANACTION_Strangulate,HITMANACTION_PickLock, andHITMANACTION_HumanShield.
NPC roles, navigation, objectives and pause map¶
- Actors (
ZActorinsrc/engine/geomsextend/zactor.h,ZHM3Actorinsrc/hitman3/characters/hm3actor.h,ZHM3ActorPropertiesinsrc/hitman3/characters/hm3actorproperties.h):- Character types (
eCharacterType): civilian, guard/enemy, VIP, target (3), animal, policeman, optional target. - Species (
EActorSpecies):eHuman,eDog,eRat,eCorpse,eWheelChair. - Navigation uses the Pathfinder4 (
PF4RunTime::ZData) navmesh stored inside.GMS: each graph is a 2D BSP split tree over(x, z)so overlapping floors require separate graphs joined by graph exits orZLinklinks (doors, ladders, elevators).
- Character types (
- Objectives and hard limits (
ZHM3BriefingControlinsrc/hitman3/levelcontrol/briefingcontrol.h,ZHM3LevelControlinsrc/hitman3/levelcontrol/levelcontrolbase.cpp):- The briefing controller’s objective completion and visibility flags are single bytes (
m_lObjectiveCompletedFlags/m_lObjectiveHiddenFlags), capping a mission at 8 objectives (.LOCtypesTtarget,Eexit,Ooptional,Rrequired,Pprotect). The level controller has separate 32-bit fields with the same names. - Target weapon tracking (
m_arTargets[6]) holds up to 6 targets.
- The briefing controller’s objective completion and visibility flags are single bytes (
- Pause map (
CIngameMapinsrc/hitman3/gui/ingamemap.h): renders hidden mapZROOMs carryingCMapGroupcontrollers (m_szNameLOC key +m_rWorldGroup),CMapObjecticons (30EIconTypekinds), andCMapTextlabels.