Skip to content

[Bug] tc_frozen_katana overrides top-left weapon HUD active weapon #197

@wxj881027

Description

@wxj881027

Description

When tc_frozen_katana is enabled, entering freeze-area state can make the top-left weapon HUD show the wrong active weapon.

This appears to be a side effect of the "katana in freeze" feature: the player model should display katana, but HUD should still reflect the real held weapon.

Version

  • Latest release tested: 10.8.7
  • Also reproducible on current master build (as of 2026-03-25)

Environment

  • OS: Windows 11 x64
  • Map mode: DDRace-like maps with freeze areas (including situations where in-freeze is true)

Steps To Reproduce

  1. Enable tc_frozen_katana 1.
  2. Hold a non-ninja weapon (gun/shotgun/grenade/laser).
  3. Enter a freeze-area/in-freeze state.
  4. Check the top-left weapon HUD (DDRace player-state weapon row).

Expected Behavior

  • Player model can show katana (visual effect), but
  • HUD highlight should still show the real active weapon.

Actual Behavior

  • HUD active weapon becomes desynced, instead of the real held weapon.

Suspected Cause

CPlayers::OnRender mutates shared render state weapon (m_RenderCur.m_Weapon = WEAPON_NINJA) for freeze-katana rendering.
Later, HUD reads m_RenderCur.m_Weapon to determine active weapon highlight, so HUD is polluted by a model-only visual override.

Suggested Fix

Keep freeze-katana override in a temporary per-render copy used only for tee model rendering.
Do not write the katana override back into shared m_RenderCur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions