Skip to content

[BUG] NPC.Panic silently does nothing for non-host clients #245

Description

@ifBars

Summary

NPC.Panic() returns immediately when called by a non-host client, even though the native SetPanicked_Server method is a client-callable ServerRpc.

Game Version

Other: current regular and alternate game assemblies inspected on August 10, 2026.

S1API Version

3.1.12 / current stable source.

MelonLoader Version

Not runtime-specific; confirmed from current S1API and native method metadata.

Runtime Environment

Mono (Alternate) and IL2CPP (Regular).

Steps to Reproduce

  1. Join a multiplayer game as a non-host client.
  2. Resolve an NPC through S1API.
  3. Call npc.Panic().
  4. Observe that S1API returns before invoking the native ServerRpc.

Expected vs Actual Behavior

Expected: The native SetPanicked_Server RPC is invoked and the server applies the panic state.

Actual: S1API's SafeIsServer() guard makes the call a silent no-op for non-host clients.

MelonLoader Log

No exception or warning is produced; the method returns silently.

What Have You Tried?

Reviewed current S1API control flow and the current Mono/IL2CPP native surfaces. SetPanicked_Server remains a ServerRpc with RequireOwnership = false and RunLocally = true.

Additional Context

Remove or narrow the redundant S1API guard and test host, remote-client, and dedicated-server calls in both runtimes.

Pre-submission Checklist

  • I have read the installation guide
  • I am using the latest version of S1API
  • I have verified this issue is related to S1API

Metadata

Metadata

Assignees

No one assigned

    Labels

    MediumEdge case bugs, etcbugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions