R.E.P.O.
Install with App

Details

Latest version
1.1.0
Last Updated
First Uploaded
Downloads
1.7K
Likes
1
Size
144KB
Dependants
Edited · Oct 30, 2026

Infinite Dead Head (Fixed)

A separate rebuild of InfiniteDeadHead for REPO. It does not overwrite or modify the original AXIAN mod or any installed profile.

Reverse-engineering findings

The original assembly contains a Harmony postfix on PlayerDeathHead.Update():

SpectateCamera.instance.headEnergy = 1f;

The current game stores spectate-head energy in SpectateCamera.headEnergy. Energy is drained by the private SpectateCamera.HeadEnergyLogic() method, which also calculates headEnergyEnough.

The original patch dereferences the global SpectateCamera.instance from another component's Update without a null check. When that singleton is unavailable, the postfix can throw a NullReferenceException from the patched PlayerDeathHead.Update. The stack trace alone does not prove every occurrence came from this mod, but the unsafe dereference is a concrete defect in its code.

Fix

This build applies a postfix directly to SpectateCamera.HeadEnergyLogic(). After vanilla logic executes, it restores headEnergy = 1f and headEnergyEnough = true. This prevents normal energy drain from exhausting the spectate head and keeps the interaction available.

Private game fields are accessed through cached reflection metadata, so the plugin compiles without relying on internal game members being public. It does not modify PlayerDeathHead.Update, ItemBattery, or the game's networked item-battery system.

Build

The project targets .NET Standard 2.1 to match the current REPO Assembly-CSharp dependency and references local REPO / BepInEx assemblies.

dotnet build .\src\InfiniteDeadHead.Fixed.csproj -c Release -o .\build

The resulting plugin is build\InfiniteDeadHead.Fixed.dll.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.