feat(combat): install the drone's follow-update FX adapter, with the combat.drone gate and the no-target body skip

Open
#2,867 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
47/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
backend, testing

Research direction

Read src/runtime/combat/dronefix.cpp, the body at src/combat/drone/follow_player_update.cpp, and its binding at src/runtime/combat/bindings/follow_player_update.cpp; then inspect the replay and drain rule headers and the existing adapter tests. First establish how the PC drivers can call DeathFxDue() and WallFxDue() with the required timing. Done means the adapter is installed with the combat.drone and null-target gates, FX_DEFER follows FxDeferWrites, and the listed driver, gate, and eight-combination tests pass.

Written by the indexing model from the issue text.

Description

Evidence at 6cc9babd6 (the base) for dronefix.cpp and the body, and at commit 78c060a7 (which adds the rules headers and the adapter; they do not exist at 6cc9babd6):

  • At 6cc9babd6, src/runtime/combat/dronefix.cpp Hooked_FollowUpdate runs DeathFxDue() and WallFxDue() before the body, only when combat.drone is on (g_drone_on), and returns without running the body when *(cs + TARGET_BODY_SYSTEM) == 0. The install writes FX_DEFER only with rc == NO_ERROR && !g_is_server && g_drone_on.
  • src/combat/drone/follow_player_update.cpp is the body; src/runtime/combat/bindings/follow_player_update.cpp binds it. At 78c060a7, git grep -n FollowPlayerUpdateWithFx finds the adapter and its test only; nothing installs it.
  • At 78c060a7 the rules for the replay and the drain are pure headers src/combat/drone/drone_death_fx_rules.h and src/combat/drone/drone_fx_drain_rules.h (inert). The adapter runs replay, drain, body. It does not skip the body when TARGET_BODY_SYSTEM is 0, and it does not check combat.drone.

Not shown: that the PC implementation of the drivers (DeathFxDue, WallFxDue) can be wired through FollowFxDrivers with the same timing as the detour; that Quest needs an equivalent (its FX_DEFER writer does not exist: git grep -n FX_DEFER -- src/quest is a comment only).

Falsifier: at 78c060a7 or later, git grep -n FollowPlayerUpdateWithFx -- src finds a caller outside the adapter's test that passes a PC FollowFxDrivers, and that caller already skips the body while TARGET_BODY_SYSTEM is 0 and runs the drivers only with combat.drone on. Then the install exists and this issue's claim is false.

Work:

  1. A PC FollowFxDrivers implementation that calls DeathFxDue and WallFxDue; test: the adapter's order (exists) plus a case per driver.
  2. The install seam gates the drivers on combat.drone and the body on TARGET_BODY_SYSTEM != 0, as Hooked_FollowUpdate does; test: a fake follow update with a null body system runs no body and logs once.
  3. The install writes FX_DEFER by FxDeferWrites(installOk, isServer, droneOn); test: the eight combinations (exists for the rule).
  4. Cut dronefix.cpp's copies over once the binding is installed (standards nevr-cat-removal).
Dominant language
C++
Stars
3
Forks
5
Avg merge
4h 37m
Merged PRs (30d)
524

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.