Skip to content

Dedicated server: reload fuel consumption only runs on local controller (free reloads possible) #2

Description

@mellox

Summary

On dedicated servers, reload fuel consumption is authority-gated but currently only runs fully on the local controller, which can allow free reloads in rare MP scenarios. Singleplayer and co-op listen servers work correctly.

Location

DoReload()Source/LaserRifleMod/Private/LaserRifleWeapon.cpp (the HasAuthority() branch that consumes one fuel item from inventory).

Proposed fix

Route fuel consumption through a Server RPC so the server authoritatively removes the fuel item and replicates the result, instead of relying on the local controller having authority. Ensure the client charge/portion HUD reconciles with the server outcome.

Acceptance

  • On a dedicated server, reloading consumes exactly one fuel item server-side; no free reloads.
  • HUD (charge / portions / spare) stays consistent with server state.
  • [LR] fuel diagnostics show the authoritative consume path.

Currently documented as a known limitation in the ficsit description.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions