Repository navigation
Hold an empty weapon on its empty idle - #2247
Closed
sunzenshen wants to merge 1 commit into
Closed
sunzenshen wants to merge 1 commit into
sunzenshen wants to merge 1 commit 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.
Contributor
Author
|
Demo: case8c-tachi-empty-slide.mp4 |
Contributor
Author
|
#2248 might be the better solution, but this PR is closer to parity with the original animation behavior. |
sunzenshen
marked this pull request as ready for review
October 16, 2026 09:27
sunzenshen
marked this pull request as draft
October 16, 2026 10:15
Contributor
Author
|
https://github.com/NeotokyoRebuild/neo/pull/2248/commits already has this PR's commit, and offline discussion agreed that #2248 looks better. |
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
For the tachi, match the parity animation where the slide moves back and stays open when empty.
Contrasts with #2248 which is not parity, but maintains the slide open position between weapon switch attempts.
The Tachi and Milso viewmodels ship an
idle01emptysequence (ACT_VM_IDLE_EMPTY) with the slide held back, but neo never plays it. After the last round, an empty pistol holds the fire sequence's last frame for 2.0 s and then idles with the slide forward. In the original NEOTOKYO, the slide goes back as the last shot ends and stays back until the reload. That covers drawing the empty pistol again: the normal draw plays, then the slide goes back.This PR uses the SDK's own pattern for an empty weapon's idle, from
CWeaponCrossbow::SendWeaponAnim. While the clip is empty,CNEOBaseCombatWeapon::SendWeaponAnimsendsACT_VM_IDLE_EMPTYin place ofACT_VM_IDLE, when the model has that sequence. The shot that empties the clip moves on to that idle when its fire sequence ends, instead of 2.0 s later. That is +24 lines inweapon_neobasecombatweapon.cpp/.h: one override, one private helper, and one check after the clip is decremented. A weapon withoutidle01emptybehaves exactly as before. Draw, holster, dry fire and reload are unchanged, since the original game plays the normal draw and reload too.Other models ship
idle01emptyas well: the MPN, SRM, MX, ZR68C/L/S and AA13 families, and the shotgun model. On the MX it looks the same as the loaded idle from the first-person view (checked). The original game's ZR68S also shows no difference when empty.Independent of the other animation PRs from the review page. #2245 and the "Keep the ZR68L raised while sprinting" PR edit the same file in other functions; trial merges of this branch with each are clean.
How this was compared
Per-frame viewmodel logs on
nt_rise_ctg(a harness-only client log of the local viewmodel's sequence, cycle and clip each frame). Video was recorded on a black background with only the lit viewmodel drawn, so the slide can be read. The original game was filmed in the same way, as Jinrai Assault with the Tachi.The scripted pass, the same in all three, with
cl_autoreload_when_empty 0in neo:Release builds of master (f426c22) and this PR.
How to test
Results
idle01emptyfrom 0.40 s after the shot (the fire sequence's length), held until the reloadfireempty, then slide forwardfireempty, thenidle01emptyidle01emptyidle01idle01empty, which looks the sameWith the default
cl_autoreload_when_empty 1, the empty idle shows until the automatic reload 3 s later, or until a dry pull starts the reload.Unchanged:
net_fakelag 75, the Tachi pass showed no switching between the loaded and empty idles, with autoreload off or on.