Skip to content

fix: allow clients to panic NPCs - #255

Merged
ifBars merged 1 commit into
stablefrom
diffuin/245-6068670d
Aug 11, 2026
Merged

fix: allow clients to panic NPCs#255
ifBars merged 1 commit into
stablefrom
diffuin/245-6068670d

Conversation

@diffuin

@diffuin diffuin Bot commented Aug 11, 2026

Copy link
Copy Markdown

Requested by @ifBars in #245.

Diffuin response

Confidence: Medium

NPC.Panic() now delegates directly to the native panic ServerRpc instead of silently returning for non-host clients. The public method shape is unchanged, and focused managed/native method-shape tests were added. PR creation is left to delivery automation.

Recommended next steps

  1. Kept NPC.Panic() public, parameterless, and void.
  2. Removed only the unused private SafeIsServer() guard and its obsolete documentation.
  3. No proprietary game files, generated wrappers, or serialized assets were added.
Evidence and validation

Evidence inspected

  • S1API/Entities/NPC.cs previously returned when SafeIsServer() was false before it reached SetPanicked_Server().
  • The supplied current Mono alternate and alternate-beta sources declare SetPanicked_Server() as parameterless with RequireOwnership=false and RunLocally=true.
  • S1API/Cartel/Cartel.cs directly invokes its native ServerRpc without an S1API server guard.

Validation performed

  • Read the issue conversation, repository guidance, required implementation/modding/writing skills, current wrapper, analogous RPC wrapper, and supplied Mono source declarations.
  • Ran whitespace checks for both tracked and new changes.
  • Verified the removed guard has no remaining references and Panic() directly calls SetPanicked_Server().

Runtime validation remaining

  • MonoMelon and Il2CppMelon restore, build, and xUnit checks could not run because dotnet is unavailable.
  • Human-owned multiplayer validation remains for host, remote client, and dedicated-server calls on Mono and IL2CPP, including server application, observer convergence, duplicate effects, and RPC logs.
Diffuin run details
  • Model: gpt-5.6-terra
  • Reasoning: high (source-backed technical request)
  • Elapsed: 161s
  • Codex thread: 019feebd-0b32-7aa0-99e2-d6ca894edd9c

AI notice: Generated with AI assistance and not guaranteed accurate. Verify findings and plans against the current source and runtime.

Closes #245


Diffuin job: 6068670d-e18a-4be3-b1f9-4d94681228cf
Commit: 5658509fd46586b198c39d6cbbc4e7447481422f

@ifBars
ifBars merged commit 7cca024 into stable Aug 11, 2026
6 checks passed
@ifBars
ifBars deleted the diffuin/245-6068670d branch August 11, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant