Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified neo/models/weapons/v_jinrai_zr68c.dx80.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_jinrai_zr68c.dx90.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_jinrai_zr68c.mdl
Binary file not shown.
Binary file modified neo/models/weapons/v_jinrai_zr68c.sw.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_jinrai_zr68c.vvd
Binary file not shown.
Binary file modified neo/models/weapons/v_nsf_zr68c.dx80.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_nsf_zr68c.dx90.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_nsf_zr68c.mdl
Binary file not shown.
Binary file modified neo/models/weapons/v_nsf_zr68c.sw.vtx
Binary file not shown.
Binary file modified neo/models/weapons/v_nsf_zr68c.vvd
Binary file not shown.
15 changes: 9 additions & 6 deletions neo/modelsrc/weapons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ teams' arm meshes are skinned to that rig, so a key moves both. Each team's mesh

- **Team toggle:** click **Team** in the Viewmodel panel, or click the eye of the two collections in the Outliner.
It changes only what the viewport shows; the export does not depend on it.
- **Author every slot and marker once**, in that scene: new slots (`drawunloaded`, ...) and edits of shipped slots. The Jinrai
- **Author every slot and marker once**, in that scene: new slots (`drawunloaded`, `drawtocycle`, ...) and edits of shipped slots. The Jinrai
project holds `composites.txt` and `glued.qci`, and the export writes the phases file from it.
- **The NSF model has no scene.** It compiles from its shipped SMDs in `nsf_GUN/anims/` (the original NSF clips,
never rewritten) and, for the glued clips, from `jinrai_GUN/anims/` through `../jinrai_GUN/glued.qci`. So both
Expand Down Expand Up @@ -228,13 +228,14 @@ compiled model. Do not edit its SMD; edit the slots it is made of and export aga

## Reload resume animations (ZR68C)

When the player switches weapons after the old magazine is out (`1_unload`) and before the reload ends, the reload
continues when the gun is drawn again (neo, while `sv_neo_reload_experimental` is 1). The ZR68C has one glued clip
besides `reload`:
When the player switches weapons after the old magazine is out (`1_unload`) or the fresh one is in (`2_load`), and
before the reload ends, the reload continues when the gun is drawn again (neo, while `sv_neo_reload_experimental` is 1).
The ZR68C has two glued clips besides `reload`:

| sequence | plays when | made of |
| :-- | :-- | :-- |
| `drawunloaded_reload` | drawn after `1_unload`, chamber empty | `drawunloaded`, then `reload` from f31 |
| `drawtocycle_reload` | drawn after `2_load`, chamber empty | `drawtocycle`, then `reload` from f61 (the bolt pull) |

The `"resume"` key on a row of the phases file names the clip to draw after that step.

Expand All @@ -248,8 +249,10 @@ The `README_ANIMATOR` text block in `viewmodels.blend` repeats these rules.
| `1_unload`, `2_load`, `3_cycle` | reload steps: old magazine out, new magazine in, round chambered. The number belongs to the step type; a gun without a step skips its number. |
| `reload:1_unload` | step marker on `reload`: the frame the step is done and its ammo counts, and the default join of a resume composite (`reload@1_unload`) |
| `reload:1_unload.join` | optional: moves that join (the ZR68C joins at f30, after the ammo point at f21) |
| `reload:2_load.join` | the join after `2_load` (f60): the bolt reach is done, the handle has not moved |
| `slot:step.sound`, `.sound2` | sound markers: when each of the step's sounds first hits |
| `drawunloaded` | authored slot: a one-handed draw with the magazine out, up to the join pose (Source style, as `drawempty`) |
| `drawtocycle` | authored slot: the shipped `draw` (f0-24), then a reach to the `reload` pose at f60 (f31) |
| `drawunloaded_reload` | generated: `drawunloaded` glued to the rest of `reload`. Pattern: the parts in play order, joined by `_`. |
| `weapon_zr68.reload_load`, `reload_load_part2`, `reload_cycle` | sound entries of a step, named `reload_<step>` (`_part2` for its second sound, the tap after loading), wav files named the same. A glued clip plays these pieces; `reload` plays its whole original sound. |

Expand All @@ -258,8 +261,8 @@ The export fails when a resume's table lists step N or earlier.

### Markers and times

- The `drawunloaded` slot holds only the new motion. It ends on the `reload` pose at its join marker. A small
difference is eased out at export.
- The `drawunloaded` and `drawtocycle` slots hold only the new motion. Each ends on the `reload` pose at its join
marker. A small difference is eased out at export.
- The export shifts the timing markers into every composite and rewrites every time in
`neo/scripts/weapon_<gun>_reload_phases.txt`, the `ReloadPhases` block that neo's weapon script includes with `#base`.
A row without a marker fails the export, and so does an ammo time at or after the sequence's last frame.
Expand Down
1,753 changes: 1,753 additions & 0 deletions neo/modelsrc/weapons/jinrai_zr68c/anims/drawtocycle.smd

Large diffs are not rendered by default.

2,866 changes: 2,866 additions & 0 deletions neo/modelsrc/weapons/jinrai_zr68c/anims/drawtocycle_reload.smd

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neo/modelsrc/weapons/jinrai_zr68c/composites.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
drawunloaded_reload drawunloaded reload@1_unload-
drawtocycle_reload drawtocycle reload@2_load-
1 change: 1 addition & 0 deletions neo/modelsrc/weapons/jinrai_zr68c/glued.qci
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
$sequence "drawunloaded_reload" "../jinrai_zr68c/anims/drawunloaded_reload.smd" fps 30 fadein 0.20 fadeout 0.20 node "0"
$sequence "drawtocycle_reload" "../jinrai_zr68c/anims/drawtocycle_reload.smd" fps 30 fadein 0.20 fadeout 0.20 node "0"
Binary file modified neo/modelsrc/weapons/viewmodels.blend
Binary file not shown.
Binary file modified neo/modelsrc/weapons/viewmodels_post_export.blend
Binary file not shown.
9 changes: 7 additions & 2 deletions neo/scripts/weapon_zr68c_reload_phases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
"reload"
{
"1_unload" { "ammo" "0.700" "resume" "drawunloaded_reload" }
"2_load" { "ammo" "1.333" }
"2_load" { "ammo" "1.333" "resume" "drawtocycle_reload" }
"3_cycle" { "ammo" "2.267" }
}
"drawunloaded_reload"
{
"2_load" { "ammo" "1.400" "sound" "1.367" "sound_name" "weapon_zr68.reload_load" "sound2" "1.800" "sound2_name" "weapon_zr68.reload_load_part2" }
"2_load" { "ammo" "1.400" "sound" "1.367" "sound_name" "weapon_zr68.reload_load" "sound2" "1.800" "sound2_name" "weapon_zr68.reload_load_part2" "resume" "drawtocycle_reload" }
"3_cycle" { "ammo" "2.333" "sound" "2.100" "sound_name" "weapon_zr68.reload_cycle" }
}
"drawtocycle_reload"
{
"3_cycle" { "ammo" "1.300" "sound" "1.067" "sound_name" "weapon_zr68.reload_cycle" }
}
}
}