Skip to content

Partial reloads 20: Add partial reloads to the M41 family - #2306

Closed
sunzenshen wants to merge 1 commit into
stack/reload-zr68c/140-jittefrom
stack/reload-zr68c/150-m41
Closed

sunzenshen wants to merge 1 commit into
stack/reload-zr68c/140-jittefrom
stack/reload-zr68c/150-m41

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Depends on NeotokyoRebuild/neoAssets#192 (layer 20: the M41 family sources, clips, phases files and sound pieces).

Partial reloads 20: add partial reloads to the M41 family. This PR builds on layer 19 (#2305, the Jitte family) and
pairs with neoAssets layer 20. Next: #2307 (21, MX family).

The phase code of 03-05 is generic: a weapon gets partial reloads from its weapon script and a phases file. This PR
adds the weapon script lines and the sound entries; it has no code changes.

  • M41 (weapon_m41.txt): #base "weapon_mosok41_reload_phases.txt", "ReloadPhases" {},
    "ChamberedRound" "1", as the ZR68C has them.
  • M41-S (weapon_m41s.txt), M41-L (weapon_m41l.txt): the same lines with #base "weapon_mosok41s_reload_phases.txt" and #base "weapon_mosok41l_reload_phases.txt".
  • Sounds: four new entries all three play, weapon_m41.reload_unload, _load, _load_part2, _cycle. The
    reload has three steps (magazine out, magazine seat with the tap, handle).
  • The flag sv_neo_reload_experimental defaults to 1 while the partial-reload stack is reviewed (Partial reloads 06: Resume a ZR68C reload after the magazine is unloaded #2293); the
    last PR of the stack sets it back to 0. With the flag at 0 the three M41s behave as on master.

How to review

  1. weapon_m41.txt, weapon_m41s.txt, weapon_m41l.txt: the three lines each, as weapon_zr68c.txt has them
    (Partial reloads 06: Resume a ZR68C reload after the magazine is unloaded #2293, Partial reloads 08: Keep a chambered round through a partial reload #2294).
  2. game_sounds_weapons.txt: the four M41 entries, in the weapon_zr68.reload_* pattern.
  3. The neoAssets layer 20 phases files.
  4. Test in game: "How to test".

How to test

  1. Load a map (the flag is 1 by default during review). Take the M41 (Assault or Support): the HUD shows 15+1.
  2. Fire some rounds and reload: no handle pull, 15+1. Fire it empty and reload: 15 with a dim round icon, then
    14+1 at the handle.
  3. Reload and switch to the secondary after the old magazine is out (about 0.7-1.7 s in), then back, once dry and
    once with a round chambered. Then once dry after the new magazine is seated (about 2.0-3.3 s in).
  4. Repeat with the M41-S and the M41-L (10 rounds: 10+1, 10, 9+1).
  5. Repeat with sv_neo_reload_experimental 0 (set before the map loads): master behavior, no +1.

Results

Layer 20 build (this PR + neoAssets layer 20), Linux Debug, ntre_engage_ctg, owner M41 plus a bot_mimic bot of
the same class (Assault, secondary Tachi) with the same gun, clip and chamber state; the bot's traced sequences and
clips match the owner's in every run with a clip. Times from the reload start (resumes: from the draw).

case M41 M41-S, M41-L
tactical from 5 (4+1) reload_skipcycle: 1 at the unload (+0.65 s) -> 16 (15+1) at the load (+1.91 s), ends +3.24 s; unload, load and tap sounds; no handle pull the same times (M41-L: 11, 10+1)
dry from 0 reload: 0 -> 15 with the round icon dim (+1.91 s) -> 14+1 at the handle (+3.41 s) the same (M41-L: 10, then 9+1)
dry, switch after the unload, back drawunloaded_reload: 0 -> 15 (+1.98 s) -> 14+1 (+3.48 s); load, tap and cycle sounds the same
tactical, switch after the unload, back drawunloaded_reload_skipcycle: 1 -> 16 (+1.98 s) the same
dry, switch after the load, back drawtocycle_reload: 15 dim -> 14+1 (+1.61 s); cycle sound the same
flag 0: tactical, dry master: reload 5 -> 15 and 0 -> 15 at +3.32 s, whole sound the same (M41-L: 10 at +3.38 s, its own shipped reload)
HUD (frame crops) dry: round icon dim from the empty magazine through the seat (row lit at 15), lit at 14+1; tactical: icon lit throughout not cropped
headless TDM, 12 Assault bots, flag 1, 1 round PASS, match_end=True, 0 asserts; 9 bots alive at the end with the M41; bots kept their reloads past the magazine out (clip 0 and 1) M41-S: PASS, the same (bots alive at the end with the M41-S). The M41-L is in no class loadout, so the bots cannot be given it; it was covered by the client runs only

The M41-S and M41-L play the M41's clips; their Muzzle point sits at the M41's inside those clips (neoAssets layer
17). The first shot right after a resume was not checked for a moved muzzle flash: the takes fire about 2 s after the
reload ends.

Toolchain

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

Linked Issues

The three M41 scripts get the reload phases from neoAssets and a
chamber slot: weapon_m41.txt #base "weapon_mosok41_reload_phases.txt",
weapon_m41s.txt #base "weapon_mosok41s_reload_phases.txt" and
weapon_m41l.txt #base "weapon_mosok41l_reload_phases.txt", each with
"ReloadPhases" {} and "ChamberedRound" "1". game_sounds_weapons.txt
gets the four reload sound pieces all three play
(weapon_m41.reload_unload, reload_load, reload_load_part2,
reload_cycle). The generic phase code then resumes a reload
interrupted after the unload or the load, and a reload with a round
chambered skips the handle pull. No code changes.
@sunzenshen

Copy link
Copy Markdown
Contributor Author

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

@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