Repository navigation
Research: segmented, resumable reloads (proof of concept) - #2251
Closed
sunzenshen wants to merge 57 commits into
Closed
sunzenshen wants to merge 57 commits into
sunzenshen wants to merge 57 commits into
Conversation
The Tachi and Milso viewmodels have an idle01empty sequence with the slide held back, which neo never played: an emptied pistol held its last fire frame for 2.0 s and then idled with the slide forward. The original NEOTOKYO holds the slide back from the end of the last shot until the reload. Send ACT_VM_IDLE_EMPTY for ACT_VM_IDLE while the clip is empty, as the SDK crossbow does, and go to it as the emptying shot's sequence ends. Models without the sequence are unchanged.
The Tachi and Milso viewmodels ship a drawempty sequence, the normal draw with the slide held back, but it carries no activity, so an empty pistol drew with the slide forward and only pulled it back as the empty idle faded in. Pick drawempty by name in Deploy when the clip is empty. Models without it, and loaded draws, are unchanged.
Four entries, weapon_zr68.reload_{drop,seat,slap,bolt}, for the
per-phase reload pieces sliced from zr68_reload.wav (neoAssets
research-reload-phases 86ebd7f+). CHAN_ITEM, so a later piece from
the same weapon replaces an unfinished one. No code plays them yet.
A weapon script may list, per reload sequence, the phases the sequence carries (drop, seat, slap, bolt), each with the time it counts and the sound piece that goes with it, and whether a partial reload keeps a chambered round. Data only: nothing reads it yet. The ZR68S gets its block, generated from ntre's segments.csv for the sequences in neoAssets research-reload-phases 86ebd7f.
A weapon whose script lists ReloadPhases reloads as a linear sequence of phases instead of one refill at the end. The drop leaves only a chambered round in the gun (the old magazine is gone), the seat loads one magazine from the reserve, the bolt chambers a round on a dry reload. A partial reload of a 30-round gun ends at 31. The phases credited so far survive a weapon switch; once the weapon is drawn again the reload resumes and credits only the phases left. Until the resume sequences are selected, the shipped reload plays and the earlier phases are skipped. The wait to fire stays the length of the animation that plays. Weapons without the block (Supa7, SMAC, the rest for now) take the previous path unchanged. The ZR68S drops ReloadReadyBeforeEnd: its seat credit replaces it.
The resume sequences' reaches now keep the hand at the shipped reach pace (neoAssets research-reload-phases b863e63), so each resume credits its phases 0.5 s later than before.
A reload whose phases name sound pieces plays each piece when its time in the playing sequence comes (each file starts 0.02 s before its first transient), instead of the one reload wav at the start. Phases credited before a switch do not play their pieces again, and a switch stops the pieces still sounding. Also adds GetMaxRoundsInGun, the magazine plus a chambered round, for the ammo HUD.
A weapon that keeps a round in the chamber on a partial reload shows one more bullet slot, so a partial reload of a 30-round magazine reads 31/31. During a dry reload the last slot stays empty until the bolt chambers a round.
The ZR68S script lists the phases of draw_resume_drop_{dry,partial}
(neoAssets research-reload-phases c61699a), the resume that starts
from the draw after the magazine dropped. A weapon may now list up to
12 reload sequences.
The drop piece now starts with the hand's first soft sounds (neoAssets research-reload-phases c20c13b), so its first transient is at 0.146 s.
A reload with phases plays the sequence for what is left: the partial reload when a round is chambered, and after a switch the resume that starts with the hand reaching back to the next phase (from the drop, the seat or the slap, dry or partial). After the magazine dropped, the resume starts in the draw itself, which brings the fresh magazine up out of view. A model without the sequence plays the shipped reload and credits only the phases left, as before.
When the bullet row overflows into a + mark, the mark is filled for a full gun; with the chambered round counted, full is the magazine plus one.
The ZR68C reloads in phases like the ZR68S (same bones, same sound pieces), with its sequences from neoAssets research-reload-phases 5edfe2e. Its ReloadReadyBeforeEnd goes: the seat credit replaces it.
The ZR68L reloads in phases with sequences and sound pieces from
neoAssets research-reload-phases d18409d; its own wav's pieces join
the sound script as weapon_zr68l.reload_{drop,seat,slap,bolt}. Its
ReloadReadyBeforeEnd goes: the seat credit replaces it.
Both MX guns reload in phases with the sequences and sound pieces of neoAssets research-reload-phases 0c24082 (the seat rattle sounds at the silent magazine seat, 0.27 s before its place in the wav); the pieces join the sound script as weapon_mx.reload_*. Their ReloadReadyBeforeEnd goes.
A phase may name sound2 / at2 beside sound / at, for a phase whose sound comes in two pieces timed apart: the M41's seat has a tap rattle that belongs at the silent seat and tap clicks that stay on the tap.
The M41 guns reload in phases with the slap as its own phase, with the sequences and sound pieces of neoAssets research-reload-phases 3e6d86e. The seat carries two pieces: the tap rattle at the silent magazine seat and the tap clicks on the tap. Their ReloadReadyBeforeEnd goes.
A phase's sound piece was only considered until the phase was credited, so pieces timed after their credit (the M41's slap click, its tap clicks) never played. Pieces now play on their own times; those of phases credited before the sequence started, and a partial reload's bolt, are marked done when the sequence starts.
Both Jitte guns reload in phases with the sequences and sound pieces of neoAssets research-reload-phases d58ceec. Their ReloadReadyBeforeEnd goes.
The SRM, SRM-S, MPN and unsilenced MPN reload in phases with the sequences and sound pieces of neoAssets research-reload-phases f6e2f9e. Their ReloadReadyBeforeEnd goes.
The AA13 and PZ reload in phases with the sequences and sound pieces of neoAssets research-reload-phases b5aaa7a; the PZ's drum latch is its slap phase. Their ReloadReadyBeforeEnd goes.
The SRS reloads in phases with the sequences and sound pieces of neoAssets research-reload-phases 346225e. Its per-shot bolting is unchanged; the reload's bolt phase is separate. Its ReloadReadyBeforeEnd goes.
Their draw-resume sequences grew by 3 frames (neoAssets research-reload-phases 3be9af7), moving the phases after the draw.
A dry reload plays reloadempty where the model has it: the Milso ships one (its slide goes forward at the end), the Tachi's is built. Its slide release is the dry reload's bolt phase, so a switch after the seat resumes with the release alone. Guns without reloadempty play the reload as before.
The Milso and Tachi reload in phases with the sequences and sound pieces of neoAssets research-reload-phases aaef0b6: a partial reload keeps the chambered round, a dry one plays reloadempty and its slide release. Their ReloadReadyBeforeEnd goes.
The Kyla has no chamber (ChamberedRound 0): every reload loads six, and a reload interrupted after the cylinder opened resumes from the draw with the cylinder open (neoAssets research-reload-phases bb53de2). Its ReloadReadyBeforeEnd goes.
The empty pistols' slide release plays a placeholder piece (neoAssets research-reload-phases 3eb7514) as the slide goes home.
The Supa7 keeps its tube as a stack of shells and slugs in load order, a chamber (empty, shell, slug or a fired hull) and a pending rack. A rack ejects what is in the chamber, a live round included, and feeds the tube's top item; a shot leaves a hull that the fire animation's pump ejects. The tube takes what the gun's capacity leaves beside a live chambered round, so a full gun still holds seven. A slug is loaded on top of the tube and racked up when the reload ends, which ejects a chambered shell. m_iClip1 and the slug flag follow the state for the HUD, bots and the base code.
The insert animation (0.733 s) is longer than the 0.5 s between shells, so every shell after the first cut it at 68 % and restarted it with the hand snapping 40 units back to the pouch (classic does the same). Play it at 1.47x so each insert ends as the next one starts. The loading pace is unchanged.
Pressing reload with the tube full plays a rack: the support hand reaches for the pump and racks it once (the rack sequence where the model has it), ejecting the chambered round and feeding the tube's top item at the pump's back stroke, with the pump sound timed to it. With nothing in the tube the press does nothing: a rack would only throw the last round away. A switch before the back stroke cancels the rack.
This was referenced Nov 9, 2026
Contributor
Author
|
Split off into a separate PR stack |
This was referenced Nov 13, 2026
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Draft research bundle. This branch combines the segmented-reload work so reviewers can assess it together and identify changes to split into separate PRs. It includes reload phases (drop, seat, slap, and bolt), ammo credit at each phase, partial and resumable reloads, per-phase sounds, chamber-aware HUD updates, third-person reload gestures, pistol slide-lock handling, and Supa7 shell loading. It also includes the optional chamber-shot experiment behind
sv_neo_reload_chamber_shot.The branch bundles work from #2244, #2245, #2246, #2248, #2249, and #2250. It needs the matching neoAssets research branch, including NeotokyoRebuild/neoAssets#169 and #170. As component PRs merge, this branch is rebased and reduced to the remaining work. Merge the component PRs or this bundle, not both.
Testing: Recorded dry, partial, and interrupted-reload sequences across the supported weapons. Bot censuses found no reload stalls, and the Debug match checks reported no asserts. Network-lag behavior has not been tested.
Open items: A resumed reload can finish 0.03–0.63 seconds early in some cases, depending on whether the draw time is counted. The pistol slide-release sound is a placeholder. Other research questions are listed in the PR discussion and can be split from this bundle.
Linked Issues