本文へ移動
cccskills
無料GitHub で公開

find-CCSPlayerController_Respawn

Find and identify the CCSPlayerController_Respawn virtual function in CS2 binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll or libserver.so to locate the Respawn vfunc slot by RTTI-walking the CCSPlayerController vtable and confirming the candidate's decompiled body performs a full controller-state reset (networked flags, per-round fields, comeback/damage-info bookkeeping) rather than any other lifecycle vfunc. Trigger: CCSPlayerController_Respawn

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Find CCSPlayerController_Respawn

Locate CCSPlayerController_Respawn vfunc in CS2 server.dll or libserver.so using IDA Pro MCP tools.

Method

1. Load CCSPlayerController VTable

ALWAYS Use SKILL /get-vtable-address with class_name=CCSPlayerController to RTTI-walk the primary vtable.

mcp__ida-pro-mcp__find_regex pattern="19CCSPlayerController"
mcp__ida-pro-mcp__xrefs_to addrs="<name_string_addr>"      # hit - 8 = typeinfo
mcp__ida-pro-mcp__xrefs_to addrs="<typeinfo_addr>"          # hit - 8 = vtable candidate, keep offset_to_top==0

Search for the mangled typeinfo name string 19CCSPlayerController (not the many longer N19CCSPlayerController...NetworkVar_...EE template-instantiation strings that also contain the substring — those are unrelated CNetworkVarBase/CNetworkHandle instantiations, not the class's own RTTI name). The class's own typeinfo name is the standalone <len>ClassName string with no further N...E nesting after it.

Linux 14168 reference: name string 19CCSPlayerController at 0x81ef30, typeinfo at 0x2487778, primary vtable at 0x24885b0 (offset_to_top == 0).

2. Read VTable Slot 272

Since CCSPlayerController inherits Respawn from CBasePlayerController at a fixed, ABI-stable slot index (Itanium single-inheritance derived-class vtables preserve base-class slot ordering), the slot number is portable across builds even though the function's own address is not. Read the function pointer directly:

mcp__ida-pro-mcp__get_int addr="<vtable_va> + 0x10 + 272*8" ty="u64"

Linux 14168 reference: vtable_va = 0x24885b0, slot 272 address 0x24885b0 + 0x10 + 272*8 = 0x2488e40, function pointer 0x14e5870, size 0x2A3 (675 bytes).

3. Confirm the Candidate

Decompile the resolved function and confirm it matches Respawn()-shaped semantics:

mcp__ida-pro-mcp__decompile addr="<slot_272_func_addr>"

Identification rules:

  1. Single argument (this only) — Respawn() takes no parameters.
  2. The body is a broad member-state reset: dozens of direct byte/dword/qword writes to this-relative offsets spread across a wide range (hundreds of bytes apart), zeroing/defaulting networked per-life fields.
  3. Near the top, it clears a "pending state change" flag pattern via the class's generic networked-bool-setter helper (this+2993 bool cleared through a CNetworkTransmitComponent::StateChanged-style call, matching the pattern seen throughout this class's other setters) before falling into the bulk reset.
  4. It reads a global respawn/spawn-protection time constant (off_261F328-style float array) and clamps a per-controller timestamp field (this+1336) against it — a spawn-protection-timer initialization step distinctive to Respawn.
  5. As a sanity cross-check, confirm slot 271 and slot 273 (the immediate neighbors) decompile to visibly smaller, differently-shaped functions (e.g. simple accessors) — Respawn should stand out as one of the larger, broad-reset functions in its immediate slot neighborhood.

If the candidate does not match, STOP and report to user.

4. Generate Function Signature

ALWAYS Use SKILL /generate-signature-for-function with addr=<Respawn_func_addr> to generate a robust and unique func_sig.

5. Write IDA Analysis Output as YAML

ALWAYS Use SKILL /write-vfunc-as-yaml to write the analysis results.

Required parameters:

  • func_name: CCSPlayerController_Respawn
  • func_addr: <Respawn_func_addr>
  • func_sig: The validated signature from step 4

VTable parameters:

  • vtable_name: CCSPlayerController
  • vfunc_offset: 0x880 (272 * 8)
  • vfunc_index: 272

Function Characteristics

  • Purpose: Resets a CCSPlayerController's per-life networked state on respawn — clears pending-damage, comeback, and per-round bookkeeping fields and re-arms the spawn-protection timer.
  • Binary: server.dll / libserver.so
  • Parameters: (this) only
  • Return value: not consumed by callers in the decompiled body observed (effectively void)
  • VTable: CCSPlayerController, slot 272 (vfunc_offset = 0x880) on the Linux 14168 reference build, inherited-slot position (INHERIT_VFUNCS relation to CBasePlayerController_Respawn).

Discovery Strategy

  1. RTTI-walk CCSPlayerController's primary vtable via its own (non-template) typeinfo name string.
  2. Read slot 272 directly — the slot index is stable across builds because it derives from CBasePlayerController base-class layout, which the Itanium ABI guarantees stays contiguous in the derived class's vtable regardless of how many further overrides CCSPlayerController itself adds afterward.
  3. Confirm the resolved function's decompiled body matches the broad per-life state-reset + spawn-protection-timer pattern unique to Respawn.

This is robust because:

  • The vtable slot index is derived from ABI-guaranteed base-class layout, not from a fragile byte offset or string xref, so it survives most recompiles as long as CBasePlayerController's own vfunc ordering is unchanged.
  • The broad multi-field reset + spawn-protection-timer-clamp shape is distinctive enough to disambiguate Respawn from neighboring accessor-style vfuncs even without a known reference sig.

Output YAML Format

The output YAML filename depends on the platform:

  • server.dll -> CCSPlayerController_Respawn.windows.yaml
  • libserver.so -> CCSPlayerController_Respawn.linux.yaml

Fields: func_name, func_va, func_rva, func_size, func_sig, vtable_name, vfunc_offset, vfunc_index.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Clean up the local workspace after a dev branch has been merged into main. Verifies the current dev branch is fully merged into origin/main, then switches to main, pulls the latest, deletes the local dev branch, and deletes the remote dev branch if it still exists. STOPS and warns the user if the current branch is not yet merged. Triggers: cleanup workspace, cleanup branch, delete merged branch, finish dev branch, post-merge cleanup

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

Convert an existing find-XXXX SKILL.md into a preprocessor Python script, updating configs/<GAMEVER>.yaml and removing the old SKILL.md. Covers xref-string-based and LLM_DECOMPILE-based discovery patterns.

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

Create an Agent SKILL.md fallback for an existing find-XXXX finder that relies on a fragile discovery foundation — above all LLM_DECOMPILE (patterns C/D/E), which matches the decompiled shape of a predecessor function against a stored reference and breaks when a symbol is inlined or de-inlined in a way the reference does not cover. The generated fallback coexists with the preprocessor and runs only when it returns failure, recovering every target robustly by decompiling the predecessor and following the inline/de-inline boundary with semantic anchors. Use when a finder broke on a game update, or you want to durably backstop one before it does. The recipe generalizes to any finder foundation. Triggers: create agent skill fallback, add SKILL.md fallback, robust fallback for finder, backstop LLM_DECOMPILE finder, final guarantee skill

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

Create a new cpp_tests entry for validating a C++ interface vtable layout against binary reference YAMLs. Creates the .cpp test file in cpp_tests/ and appends a configs/<GAMEVER>.yaml entry under cpp_tests:. Use when a user asks to add vtable layout validation for a new hl2sdk_cs2 interface class.

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

create-pr

無料

Create a GitHub pull request from staged task changes or an already-committed current branch. Deliver source/config/ reference changes together with their computed source-owned `bin_artifacts` closure. PR validation routing is owned by the default-branch trusted workflow; snapshots, gamedata, and manifests are Release-derived only.

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

Create a new find-XXXX preprocessor Python script from scratch (no existing SKILL.md), add configs/<GAMEVER>.yaml skill and symbol entries. Covers xref-string-based and LLM_DECOMPILE-based discovery patterns. Use when a GitHub issue or user instruction specifies a new function to find.

日本語の概要は準備中です。原文の説明を表示しています。

mrc4tt/CS2_VibeSignatures32026年10月13日 更新

mrc4tt のスキルをすべて見る

このスキルの問題を報告する