Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

CS2 Selfiestick cinematic camera banner

CS2 Selfiestick

Put the camera inside the action.
A cinematic spectator camera DLL for Counter-Strike 2 demos and HLAE.



English · 简体中文 · Download · Manual · Release notes · Report an issue


Release Downloads Stars License
Windows x64 HLAE CS2 build ReShade safe

Table of contents

✨ Why Selfiestick

CS2 Selfiestick turns HLAE demo playback into a compact cinematic camera rig. Frame an agent from a player-mounted camera, ride alongside a thrown grenade, or hand the shot back automatically after the effect lands.

🎭 Player Selfie
Symmetric left/right selfie framing, a shoulder preset, target follow/lock, and six-axis trim.
💣 Prop Selfie
Follow smoke, molotov/incendiary, HE, flashbang, and decoy projectiles from launch through effect.
🎬 Demo-aware handoff
Hold the final prop shot for two demo seconds, return to the agent, and stay armed for the next throw.
🛡️ ReShade-safe panel
Genuine Dear ImGui controls on a CPU/GDI renderer—no D3D device, DXGI swap chain, OpenGL context, or Present hook.

The current release also validates exact entity handles, fails closed on unknown game builds, keeps per-shot FOV, and exports motion diagnostics without writing files from camera callbacks.

📦 Download

Important

Current stable release: v0.4.6 for CS2 build 26445667 and HLAE 2.192.10 / AfxHookSource2 0.41.9.

Get the bilingual Windows package from GitHub Releases. It includes both DLLs, manuals, the default configuration, and the hotkey reference.

Asset Use it for
Lyan_selfiestick-v0.4.6-EN.dll English interface
Lyan_selfiestick-v0.4.6-zh-CN.dll 中文界面
...windows-x64.zip Recommended complete bilingual package
...source.zip Reproducible source package and validation tools
SHA256SUMS.txt Release integrity verification

The DLLs use the static MSVC runtime, so users do not need to install the Visual C++ Redistributable just to load Selfiestick with HLAE.

🚀 Quick start

  1. Fully restart HLAE/CS2, launch HLAE 2.192.10, and open a demo in spectator mode.

  2. Download and extract the latest Windows package.

  3. Load one language DLL from the HLAE console:

    mirv_loadlibrary "D:\tools\selfiestick\en-US\Lyan's selfiestick.dll"
  4. Press Ins to open the panel.

  5. Press F8 or select Enable in the panel.

  6. For Prop Selfie setup, slow the demo to 0.1x, tune the shot, then raise the playback speed.

    demo_timescale 0.1

Tip

Replacing a DLL on disk does not update code already loaded into CS2. Fully restart HLAE/CS2 after every DLL update.

The camera hook is installed lazily when Selfiestick is enabled. An incompatible runtime remains loaded and reports the reason in the panel instead of silently applying an unsafe fallback.

🎥 Camera modes

Player Selfie

The player rig binds to the agent's weapon_hand_r skeleton attachment, with a short pawn-local cache and body-relative fallback if the attachment is temporarily unavailable. Camera facing comes from the pawn rather than an unrelated observer view.

  • Selfie Left / Right — mirrored front-facing compositions.
  • Over Shoulder — forward view with the agent in the left foreground.
  • Follow / Lock Current / Clear — control the spectator target.
  • R / B / U — local right, back, and up position trim.
  • Pitch / Yaw / Roll — local angle trim on top of the built-in framing.

Framing v6 backs up older settings to selfiestick.ini.pre-hand-anchor.bak before resetting obsolete player trim once. Prop trim is retained.

Prop Selfie

The prop rig follows projectiles owned or thrown by the current target:

smoke · molotov / incendiary · HE · flashbang · decoy

  • AUTO HANDOFF — follows through detonation, holds the final view for two demo seconds, then returns to the agent while waiting for future throws.
  • PIN CURRENT PROP — keeps the selected shot through detonation and holds its final view indefinitely.
  • SELECT + PIN — chooses a specific live candidate and pins it.
  • CLEAR LOCK / RETURN TO AGENT — releases the current view immediately without recapturing the same cleared candidates.
  • X / Y / Z + Pitch / Yaw / Roll — six-axis local prop framing.
  • Centered Lookback Preset — restores X=0, Y=-13.5, Z=2.25 and zero angle trim.

Pause stops the handoff timer, slow playback extends its wall-clock duration, and a newer valid throw can take over immediately. The camera uses one resolved scene sample for position and aim, so its prop-relative distance does not drift with playback speed, FPS, or refresh timing.

Note

Automatic map-geometry collision avoidance is not implemented. A projectile that exists entirely between two visible camera callbacks may still require slower playback to capture.

⌨️ Controls

Key Action
Ins Show or hide the Dear ImGui panel
F8 Enable or disable Selfiestick
F9 Lock the current spectator target
F10 Return target mode to Follow

The panel hotkey is configurable and saved to selfiestick.ini next to the loaded DLL.

🧩 Compatibility and safety

Component Supported target
Counter-Strike 2 Steam app 730, buildid 26445667
HLAE 2.192.10, AfxHookSource2 0.41.9
Platform Windows x64
Workflow HLAE demo playback and cinematic capture

CS2 and HLAE update frequently. If schema, entity layout, or SetUpView changes, Selfiestick may block hook installation by design and show the reason in Runtime diagnostics.

Caution

Selfiestick is for offline demo and cinematic workflows. It is not intended for matchmaking, live play, or anti-cheat protected servers. Joining VAC-protected servers with HLAE or injected tools can be unsafe.

🩺 Troubleshooting

mirv_loadlibrary failed

Fully restart HLAE/CS2 and verify the absolute DLL path. The v0.4.6 release DLLs do not depend on MSVCP140.dll, VCRUNTIME140.dll, UCRT api-ms-win-crt-* DLLs, D3DCOMPILER_*.dll, D3D11.dll, or DXGI.dll.

SetUpView hook blocked by compatibility gate

The DLL loaded successfully, but the current game/runtime fingerprint was rejected. Use CS2 build 26445667 with HLAE 2.192.10, or rebuild only after validating the newer binaries.

Old settings or unexpected trace logging

Delete an older selfiestick.ini, or confirm that it contains:

[Debug]
TraceEnabled=0

Existing INI values override new defaults.

Collect motion diagnostics

Expand Runtime and select EXPORT MOTION DIAGNOSTICS. The latest 1,024 in-memory camera samples are written to selfiestick_prop_motion.csv beside the DLL. For a debug trace, set TraceEnabled=1, restart HLAE/CS2, and reproduce the problem; output is written to selfiestick_trace.log.

The expected v0.4.6 trace marker is:

schema-probe-v42-prop-origin-cs2-26445667

v0.4.6 engineering notes

Show implementation and validation details
  • The pawn render-eye function uses verified vtable slot 173 and validates output against the selected pawn's scene origin.
  • Exact handle serial validation rejects reused entity slots; weapon restoration never falls back to an unvalidated saved pointer.
  • Prop discovery combines creation observation with a resumable 0..32767 slot sweep and a 0.5 ms soft callback budget.
  • Projectile position is read through the verified engine absolute-origin accessor so dirty scene transforms are resolved before sampling.
  • Temporarily missing data keeps the last validated view; a pending shot takes over only when its pose is usable.
  • The production panel renders complete off-screen CPU/GDI frames and never creates a graphics device or Present hook.
  • Compatibility resolution uses the exact supported PE fingerprint and fails closed on unknown builds.

The resolved-origin shake fix was confirmed in a live user test. The v0.4.6 lifecycle update passed background/native regression checks; it was not accompanied by a new live-demo, ReShade-coexistence, or FPS test. See the stable baseline, lifecycle update, and release validation.

🛠️ Build from source

Requirements: Visual Studio 2022, the MSVC C++ toolchain, Windows SDK, and PowerShell 7.

pwsh -NoProfile -File tools/Build-Native.ps1 -Target Dll -Language zh-CN
pwsh -NoProfile -File tools/Build-Native.ps1 -Target Dll -Language en-US
pwsh -NoProfile -File tools/Build-Native.ps1 -Target Validation
pwsh -NoProfile -File tools/Build-Native.ps1 -Target UiPreview -Language zh-CN

Outputs are written under native_dll/bin/native-<Target>-<Language>/. The UI preview executes production panel code in a hidden standalone process and checks default styling and rasterization without starting the game or installing hooks.

Binary compatibility and dependency checks
py -3 tools\check_cs2_binary_compatibility.py --client "<CS2>\game\csgo\bin\win64\client.dll" --schema "<CS2>\game\bin\win64\schemasystem.dll"

powershell -NoProfile -ExecutionPolicy Bypass -File tools\check_dll_dependencies.ps1 -DllPath "release\en-US\Lyan's selfiestick.dll"
powershell -NoProfile -ExecutionPolicy Bypass -File tools\check_dll_dependencies.ps1 -DllPath "release\zh-CN\Lyan_CS2自拍杆.dll"

The compatibility checker validates the PE fingerprint, signatures, attachment call targets, the SetUpView instruction boundary and context, and build-gated schema fields. The dependency check rejects runtime and graphics-hook imports that should not be present in release DLLs.

Release packaging
pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass -File tools\New-SelfiestickRelease.ps1 -Version v0.4.6 -Cs2Build 26445667 -HlaeVersion 2.192.10
pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass -File tools\Publish-GitHubRelease.ps1 -Version v0.4.6

The publisher creates a draft release, uploads the bilingual DLLs, Windows bundle, source bundle, and checksum file, then verifies remote sizes and SHA-256 hashes before publication. Authentication comes from Git Credential Manager and is never printed.

Do not run npm run build for this repository; the native DLL flow is independent of the Next.js guidance used by unrelated projects.

🗂️ Repository layout

assets/                                  README artwork
native_dll/selfiestick_hlae/             Main DLL source and Visual Studio project
native_dll/selfiestick_hlae_validation/  Native validation executable
native_dll/third_party/imgui/             Dear ImGui source and Win32 backend
release/en-US/                           English release DLL and manual
release/zh-CN/                           Chinese release DLL and manual
tools/                                   Build, compatibility, and release tooling
selfiestick_bind.cfg                     Hotkey reference

Issues and pull requests are welcome. For runtime changes, include the exact CS2 build, HLAE version, reproduction steps, and relevant Runtime diagnostics.

📄 License

Released under the MIT License.

Built for CS2 demo filmmakers and HLAE camera work.
Back to top ↑

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages