From f0ae5c05faf510d28bbe527bb2acc2b03e0b015d Mon Sep 17 00:00:00 2001 From: Alan Shen Date: Mon, 9 Nov 2026 05:36:24 -0700 Subject: [PATCH] Add partial reloads to the M41 family 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. --- game/neo/scripts/game_sounds_weapons.txt | 38 ++++++++++++++++++++++++ game/neo/scripts/weapon_m41.txt | 7 +++++ game/neo/scripts/weapon_m41l.txt | 7 +++++ game/neo/scripts/weapon_m41s.txt | 7 +++++ 4 files changed, 59 insertions(+) diff --git a/game/neo/scripts/game_sounds_weapons.txt b/game/neo/scripts/game_sounds_weapons.txt index 3aba586ba1..9f756c1ee7 100644 --- a/game/neo/scripts/game_sounds_weapons.txt +++ b/game/neo/scripts/game_sounds_weapons.txt @@ -725,6 +725,44 @@ "wave" "weapons/m41/m41_reload.wav" } +// M41 reload in per-step pieces (sv_neo_reload_experimental). + +"weapon_m41.reload_unload" +{ + "channel" "CHAN_ITEM" + "soundlevel" "SNDLVL_NORM" + "volume" "1.0" + "pitch" "PITCH_NORM" + "wave" ")weapons/m41/m41_reload_unload.wav" +} + +"weapon_m41.reload_load" +{ + "channel" "CHAN_ITEM" + "soundlevel" "SNDLVL_NORM" + "volume" "1.0" + "pitch" "PITCH_NORM" + "wave" ")weapons/m41/m41_reload_load.wav" +} + +"weapon_m41.reload_load_part2" +{ + "channel" "CHAN_ITEM" + "soundlevel" "SNDLVL_NORM" + "volume" "1.0" + "pitch" "PITCH_NORM" + "wave" ")weapons/m41/m41_reload_load_part2.wav" +} + +"weapon_m41.reload_cycle" +{ + "channel" "CHAN_ITEM" + "soundlevel" "SNDLVL_NORM" + "volume" "1.0" + "pitch" "PITCH_NORM" + "wave" ")weapons/m41/m41_reload_cycle.wav" +} + //------------------- "weapon_m41.npc_reload" diff --git a/game/neo/scripts/weapon_m41.txt b/game/neo/scripts/weapon_m41.txt index b3d02a4cfb..14749a11e2 100644 --- a/game/neo/scripts/weapon_m41.txt +++ b/game/neo/scripts/weapon_m41.txt @@ -1,3 +1,5 @@ +#base "weapon_mosok41_reload_phases.txt" + // M41 WeaponData @@ -16,6 +18,11 @@ WeaponData "Penetration" "32.0" "CycleTime" "0.166666" // time between shots "ReloadReadyBeforeEnd" "0.393" // the reload is done at the last reload click, this long before its animation ends + + // Reload phases (sv_neo_reload_experimental): the rows come from neoAssets, timed from its Blender markers + "ReloadPhases" {} + // Chamber capacity is gameplay data; the phase timing comes from neoAssets. + "ChamberedRound" "1" "TPMuzzleFlashScale" "0.5" diff --git a/game/neo/scripts/weapon_m41l.txt b/game/neo/scripts/weapon_m41l.txt index b98a05166c..e35f62023b 100644 --- a/game/neo/scripts/weapon_m41l.txt +++ b/game/neo/scripts/weapon_m41l.txt @@ -1,3 +1,5 @@ +#base "weapon_mosok41l_reload_phases.txt" + // M41 WeaponData @@ -16,6 +18,11 @@ WeaponData "Penetration" "32.0" "CycleTime" "0.5" // time between shots "ReloadReadyBeforeEnd" "0.333" // the reload is done at the last reload click, this long before its animation ends + + // Reload phases (sv_neo_reload_experimental): the rows come from neoAssets, timed from its Blender markers + "ReloadPhases" {} + // Chamber capacity is gameplay data; the phase timing comes from neoAssets. + "ChamberedRound" "1" "TPMuzzleFlashScale" "0.25" diff --git a/game/neo/scripts/weapon_m41s.txt b/game/neo/scripts/weapon_m41s.txt index a4cb54cf5e..fda1853da6 100644 --- a/game/neo/scripts/weapon_m41s.txt +++ b/game/neo/scripts/weapon_m41s.txt @@ -1,3 +1,5 @@ +#base "weapon_mosok41s_reload_phases.txt" + // M41 WeaponData @@ -16,6 +18,11 @@ WeaponData "Penetration" "20.0" "CycleTime" "0.166666" // time between shots "ReloadReadyBeforeEnd" "0.393" // the reload is done at the last reload click, this long before its animation ends + + // Reload phases (sv_neo_reload_experimental): the rows come from neoAssets, timed from its Blender markers + "ReloadPhases" {} + // Chamber capacity is gameplay data; the phase timing comes from neoAssets. + "ChamberedRound" "1" "TPMuzzleFlashScale" "0.5"