Skip to content

Partial reloads 25: Add Supa-7 slug input rules - #2313

Closed
sunzenshen wants to merge 1 commit into
stack/reload-zr68c/180-supa7from
stack/reload-zr68c/183-supa7-slugs
Closed

sunzenshen wants to merge 1 commit into
stack/reload-zr68c/180-supa7from
stack/reload-zr68c/183-supa7-slugs

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Partial reloads 25: Supa-7 slug input rules. This PR builds on layer 24 (#2309, the Supa-7 tube and chamber). It has
no neoAssets pair: the Supa-7 plays its shipped clips and the pump of layer 23 (NeotokyoRebuild/neoAssets#197).

With sv_neo_reload_experimental 1, a Supa-7 reload loads shells or slugs, and the player picks which while it runs.
The rules sit in their own layer so #2309 stays the original proposal.

  • Type at the credit moment: a round's type (shell or slug) is set when it enters the tube (the hatch close), not
    when its insert starts. It is a slug if a slug load is active then.
  • Alt-fire: during a reload, alt-fire (tap or hold) makes the rest of the load slugs, from the round in the hand
    on. With no reload running, alt-fire starts a reload that loads slugs, also on an empty gun with auto-reload off.
  • Reload during a slug load: makes the rest of the load shells.
  • Any number of slugs: master's one-slug limit does not apply. A slug load ends when the slugs run out; a reload
    then tops off with shells.
  • Freeze time: alt-fire loads the whole gun with slugs (the chamber first, then the tube in fire order); a reload
    press loads it with shells. Each replaced round goes back to its reserve. A repeat press does nothing. The game lets
    alt-fire through in freeze time for this, as it does for the Tachi's fire-mode toggle.
  • Saved choice: the freeze-time press also sets cl_neo_supa7_prefer_slugs (archived user info, like
    cl_neo_tachi_prefer_auto). In later freeze times the server loads a new Supa-7 with slugs when it is 1.
  • HUD fire-mode letter: while rounds load it shows the type being loaded; otherwise the chambered round's type.
  • The flag: the rules sit in the TubePhasesOn* hooks of Partial reloads 24: Model the Supa-7 tube and chamber #2309 and check the flag. With the flag at 0 the
    Supa-7 behaves as on master.

How to review

  1. weapon_supa7.h: m_bSlugLoad (networked, predicted), the new hooks and ConvertLoad.
  2. weapon_supa7.cpp: RunInsert types the round at the credit moment; TubePhasesOnStartSlug,
    TubePhasesOnLoadInput and TubePhasesOnFreezeTime take the input; ConvertLoad does the freeze-time change.
    SlugLoaded() (the HUD's fire-mode letter) returns the type a reload is loading, else the chambered round's.
  3. player.cpp, c_baseplayer.cpp: the freeze-time alt-fire exception for the Supa-7 with the flag on, shaped like
    the Tachi's (type check plus the flag; no new weapon method).
  4. neo_player.cpp: the bots' value of the new user info cvar.

How to test

  1. Set sv_neo_reload_experimental 1 and load a map. Take the Supa-7.
  2. Fire three and reload. During the second insert, tap alt-fire: the first round in is a shell, the rest slugs.
    The HUD letter shows the slug letter while the slugs load.
  3. Fire three and hold alt-fire: three slugs go in.
  4. Fire three, tap alt-fire, then press reload during the second insert: one slug, then shells.
  5. Set cl_autoreload_when_empty 0, fire the gun empty, tap alt-fire: six slugs, then the rack. Fire three, tap
    alt-fire: one slug goes in and the load stops (no slugs left). Reload: shells top off the tube.
  6. In freeze time, press alt-fire: all seven rounds become slugs. Press reload: all shells. Press alt-fire again, then
    start the next round: the new gun has slugs.
  7. Repeat with sv_neo_reload_experimental 0 (set before the map loads): master behavior.

Results

Layer 25 build (this PR on #2309, before layer 23 went in below it), Linux Debug, ntre_engage_ctg, owner Supa-7 plus a bot_mimic bot of the same
class (Assault) with the same gun. The rounds below are listed in fire order (P shell, S slug) after the chambered
round.

case flag 1
reload from 4, alt-fire tap during the 2nd insert shell credited, then the round in the hand and the next credited as slugs: tube S S P P P P, letter slug while loading, shell after
hold alt-fire from 4 a reload that loads slugs: S S S P P P
alt-fire tap from 4, reload during the 2nd insert one slug, then the round in the hand and the next credited as shells: P P S P P P
empty gun, auto-reload off, alt-fire tap six slugs into the tube, the rack chambers a slug
1 slug left, alt-fire tap one slug, the load ends (slugs 0); reload tops off with shells
freeze time: alt-fire, alt-fire, reload, reload, alt-fire all slugs (reserves 28/7 -> 35/0), nothing, all shells (28/7), nothing, all slugs; the cvar follows
next freeze time, new gun slugs from the first frame of the draw; reload there sets shells and the cvar to 0

With the flag at 0, the same input sequences on this build and on #2309 give the same behavior as master: alt-fire
loads one slug and ends the reload with the pump, freeze-time presses change nothing, and the cvar stays 0.

The headless TDM match (12 Assault bots on the Supa-7, flag 1, 1 round) passes with match_end=True and 0 asserts.

The bot's traced states match the owner's in each clip (one take differs by one unsampled insert row).

With layer 23 below #2309 (this PR on the current stack), the Supa-7 pumps after the first round of a dry reload, and
the slug rules apply to that round too:

case flag 1
empty gun, auto-reload off, alt-fire tap, then reload during the 4th insert the first slug goes in and reloadpump chambers it; two more slugs, then shells to 7; the next shot is the slug (fire)
slug as the last shot, then reload fire1 without the pump, then the shell reload pumps after its first shell
dry shell reload 7 at +4.71 s, reloadendshort, no rack
switch away after the first insert of a dry reload, back, trigger or reload trigger: the shipped reloadend rack; reload: reloadstart, then reloadpump at once, then the inserts
headless TDM (Assault, flag 1, 1 round) PASS, match_end=True, 0 asserts

Toolchain

  • Linux GCC Distro Native (Linux Mint 22.3, GCC 13.3.0)

Linked Issues

With sv_neo_reload_experimental on, a Supa-7 reload loads shells or
slugs, and the player picks which while it runs:

- A round's type is set when it enters the tube, so an input during
  its insert decides it.
- Alt-fire during a reload makes the rest of the load slugs; with no
  reload running it starts one that loads slugs.
- Reload during a slug load makes the rest of it shells.
- Any number of slugs; a slug load ends when the slugs run out.
- In freeze time, alt-fire loads the whole gun with slugs and reload
  with shells. The choice is saved in cl_neo_supa7_prefer_slugs and
  applied to the gun in later freeze times.
- The HUD fire-mode letter shows the type a reload is loading,
  otherwise the chambered round's type.

The player's freeze-time alt-fire exception is a type check plus the
public sv_neo_reload_experimental rule check, as for the Tachi, and the
HUD keeps master's SlugLoaded() call, so CWeaponSupa7 gains no public
member. With the flag off the Supa-7 behaves as on master.
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Closing to clear the board in favor of the PR stack of sunzenshen#39

@sunzenshen sunzenshen closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Animations Animation stuff. Including the syncronizing of animations between client and server based on state.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants