Repository navigation
Partial reloads 07: Resume a reload after the magazine is attached - #2292
Closed
sunzenshen wants to merge 1 commit into
Closed
sunzenshen wants to merge 1 commit into
sunzenshen wants to merge 1 commit into
Conversation
A switch after 2_load now resumes when the phase table names a resume for that step (drawtocycle_reload on the ZR68C, the bolt pull). The fresh magazine is already in at that point, so the resume keeps the clip; only a resume after 1_unload empties it. The resume after the load is about a second shorter than the reload gesture, so others saw the magazine change go on after the gun was ready. A resumed reload now plays only the end of the gesture, for as long as its first-person sequence, blended in. A reload event without data still plays the whole gesture, so flag-off play is unchanged.
This was referenced Nov 9, 2026
Partial reloads 07: Add the ZR68C resume clip after the load animation
NeotokyoRebuild/neoAssets#178
Closed
sunzenshen
force-pushed
the
stack/reload-zr68c/30-mvp
branch
from
November 10, 2026 02:10
86d98ed to
17e65e5
Compare
sunzenshen
force-pushed
the
stack/reload-zr68c/40-attach
branch
from
November 10, 2026 02:10
5db897e to
7f065b7
Compare
sunzenshen
marked this pull request as ready for review
November 10, 2026 04:47
sunzenshen
marked this pull request as draft
November 12, 2026 06:55
This was referenced Nov 13, 2026
Closed
Closed
Contributor
Author
|
Closing to clear the board in favor of |
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
Depends on NeotokyoRebuild/neoAssets#178 (layer 07: the
drawtocycle_reloadclip and its phases rows).Partial reloads 07: resume a reload after the magazine is attached. This PR builds on #2293 (06: the resume after
the unload) and pairs with neoAssets layer 07. Next: #2294 (08, the bolt cycle: a chambered round,
reload_skipcycle, bots).With #2293, a ZR68C reload interrupted after the fresh magazine is seated (
2_load) cancels: the next draw is aplain
drawwith a full magazine and no bolt pull. With this PR the draw resumes the reload instead: it playsdrawtocycle_reload(the draw, a reach to the bolt, the bolt pull, 1.733 s), keeps the 30 rounds, and allows fireat its end.
sv_neo_reload_experimentaldefaults to 1 while the partial-reload stack is reviewed (Partial reloads 06: Resume a ZR68C reload after the magazine is unloaded #2293); thelast PR of the stack sets it back to 0. With the flag at 0 nothing here runs.
resumekey resumes, and only the ZR68C has one.How it works
and the neoAssets layer 07 phases file now names
drawtocycle_reloadon the2_loadrows ofreloadanddrawunloaded_reload. The one code change:ResumeReloadempties the clip only for a resume after1_unload;after
2_loadthe fresh magazine is already in.reloadgains its3_cyclerow in the phases file, so an uninterrupted reload ends at3_cycleand a later switch finds nothing to resume.carries its first-person length; the gesture then plays only its end for that long and blends in over 0.2 s
(
hl2mp_playeranimstate, theRELOAD_EVENT_RESUMEDmarker of Partial reloads 06: Resume a ZR68C reload after the magazine is unloaded #2293 becomes this data). A resume as long as thegesture (
drawunloaded_reload) still plays it whole. A reload event without data runs master's code.RELOAD_GESTURE_KEEP_START(a reload from the start that ends early) is used first by layer 08.How to review
ResumeReloadinweapon_neobasecombatweapon.cpp: the clip line and the gesture call.hl2mp_playeranimstate.{h,cpp}:PackReloadGestureData,StartReloadGesture,UpdateReloadGesture. Eachreturns first for an event without data.
How to test
(about 1.4-2.2 s in). Switch back: the draw should reach for the bolt, pull it, and end with 30 rounds.
sv_neo_reload_experimental 0(set before the map loads): a switch cancels the reload as on master.Results
Linux Debug client and dedicated server, 0 compiler warnings, neoAssets layer 07 assets. Client runs used a listen
server with one bot replaying the owner's inputs (
bot_mimic), seen as a remote player.drawtocycle_reloadat +2.175 s, clip stays 30 (HUD: 30 rounds, 2 magazines, no dip), idle at +3.915 s (1.740 s); bolt pull visible in the frames;reload_cycleplays once per source, no other reload sound on the resumedraw, clip 0, then a fresh reload 0 to 30: master behaviordrawunloaded_reload, clip 0 to 30 at draw +1.41 s, end draw +2.775 s; load, tap and cycle pieces once each; gesture whole (2.67 s)draw, clip 10 keptmatch_end=True, 0 assertsThe only client assert is the engine baseline shadow-leaf assert, outside the reloads.
Known limits
Toolchain
Linked Issues