On this page
Workbench alternate fire (a weapon's second fire): the feature checklist
Workbench alternate fire (a weapon's second fire) is a Battlefield Heroes workbench. This page is its checklist from the project's feature ledger: every step of the original's code behind it and every situation it must work in, each with the proof that stands for it, or none. The ledger's status today: 9 of 66 lines checked.
Situations: 1 of 15 checked for what the game does, 0 of 15 for what a player sees. The original's code: 8 of 36 checked (24 functions and 12 inner calls). By the ledger's rule this feature is not called done, fixed or the same as the original. The ledger was written on 2026-11-28 11:55.
The ledger names the owner's open report on this feature: R-0111.
Every line has a kind: W, what the game does with nothing to see (a number, a speed, a refusal), or S, what a player sees or hears. A W line is checked by a test written from the original's code or by a play with a recorded pass; an S line only by a recorded play whose pixels an assert reads, or that a person looked at and wrote so. A scenario that merely exists, a test that merely calls the Rust function and a read of the listing are not checks. All feature checklists explains the rule.
What it is for a player#
At the workbench a hero puts upgrades on a weapon: a larger magazine, a scope, a better critical hit, or a second way to fire on the right mouse button. A sweep of 2026-11-28 read what the original does with each of them and laid it beside the port. It was started by a player's report: an alt-fire added at the workbench did nothing. This page is that sweep, row by row, in its own verdict words.
That is this wiki's own line about it, taken at build time from the page that tells it.
| the name a player knows | Workbench alternate fire (a weapon's second fire) |
| kind | workbench |
| in the game's data | addAltFireWeapon (the gear's line), isAltFireWeapon; the hero's (weapon -> ids) lists in CustomizeEvent |
| what it acts on (the ledger's tags) | targets-enemies |
| the owner's report | R-0111 |
| its row in the sweeps | notes/bfheroes/workbench_sweep.md (R-0111, slot wb1) |
The original's entry functions#
Where the original starts doing it (BFHeroes.exe 1.126). The code behind the feature is everything these reach.
| Address | What it is, in the ledger's words | Followed |
|---|---|---|
0x0075af1c | world::Kit::handlePickup, a shared step of every kit: this feature's part is the pass over the player's items that have an addAltFireWeapon name | as a part: its calls are not followed |
0x006ef603 | Player vt+0x384: the weapons the gear is on | whole |
0x006f4735 | Player vt+0x388: records the alternate's assetId on the weapon | whole |
0x0072437a | Soldier::addItem, a shared step of every item: this feature's part is a weapon with isAltFireWeapon (an item slot from 10) | as a part: its calls are not followed |
0x007234a0 | the pass over the soldier's fire arms: the arm whose alternate's assetId is in the set gets it | whole |
0x007082cd | the fire arm's alternate weapon's assetId (its template's) | whole |
0x0070e500 | the fire arm's input, a shared step of every weapon: this feature's part is PIAltFire goes to the alternate (at 0x0070e853 inside it) | as a part: its calls are not followed |
0x004f0285 | the CustomizeEvent's writer, a shared step: this feature's part is each item id followed by its list (Player vt+0x380) | as a part: its calls are not followed |
0x004f04e0 | the CustomizeEvent's reader, a shared step: this feature's part keeps the non-empty lists | as a part: its calls are not followed |
0x006f155a | Player vt+0x380: a weapon's list of ids | whole |
The situations#
Every situation the ledger's matrix names for a feature of this kind, with its two lines side by side. "Has a scenario, no recorded pass" and "passed on a branch not landed" are the ledger's words for a play that is not a check yet.
| Situation | What the game does (W) | What a player sees (S) | Note |
|---|---|---|---|
| used on foot | checked: play with a recorded pass, state asserts (scenario bfh_client_alt_fire_battle_arm (PASS in run 20261028_070505_fix_bfh_client_alt_fire_battle_arm)) | open: play with a recorded pass, state asserts (scenario bfh_client_alt_fire_battle_arm (PASS in run 20261028_070505_fix_bfh_client_alt_fire_battle_arm)) | |
| used at the wheel of a vehicle | open: not checked | open: not checked | |
| used from a passenger's or a gunner's seat | open: not checked | open: not checked | |
| enemy sitting in a vehicle | open: not checked | open: not checked | |
| the user dies while it runs | open: not checked | open: not checked | |
| after the user respawns | open: not checked | open: not checked | |
| the round ends while it runs, and the next round starts clean | open: not checked | open: not checked | |
| the map changes while it runs | open: not checked | open: not checked | |
| a player who joins while it runs sees it | open: not checked | open: not checked | |
| watching a team mate who uses it (after dying, or as a spectator) | open: not checked | open: not checked | |
| team mates against enemies (who gets it and who does not) | open: not checked | open: not checked | |
| in water (swimming) | open: not checked | open: not checked | |
| on a ladder | open: not checked | open: not checked | |
| while another effect runs on the same hero | open: not checked | open: not checked | |
| bought at the workbench and used in a played game, not only in a test | open: not checked | open: not checked |
Recorded plays#
2 more scenarios the ledger names have no row in the records file: bfh_client_alt_fire_battle_arm, bfh_alt_fire_ammo_pool.
A recorded pass on a commit that is not in the tree's history counts, in the ledger's words, as "passed on a branch not landed", and is not a check. A run is named by its folder's name; the runs themselves are not published, so a row links to nothing. The ledger also reads run folders that this file does not hold; the tables above carry its verdicts.
The code behind it#
57 functions of the original reachable from the entries, as the ledger's tool walked them: each with its kind, the port's place, the proof that stands for it and that proof's kind. "Checked" is the ledger's tick; a row that is no line of the checklist (library code, shared engine code that is tested in its own game) says so.
| The original's function | Kind | Reached | Ours | Proof | Its kind | Checked |
|---|---|---|---|---|---|---|
0x0075af1c world::Kit::vslot4_at194 | S | entry, depth 0 | crates/bf2-client/app/src/client/heroes_emote.rs:2 | crates/bfh-game/src/customization.rs:2290 (fn kit_items_register_emote_containers), crates/bfh-game/src/customization/gear_alt.rs:96 (fn gear_alt_fire_weapon_becomes_a_kit_object_per_weapon) | test from the original's code | yes: PART: entered without its calls (expand = false) |
0x006ef603 Player::vslot225 | W | entry, depth 0 | crates/bfh-game/src/customization/gear_alt.rs:28 (fn weapons_with) | crates/bfh-game/src/customization/gear_alt.rs:78 (fn weapon_sets_answer_the_weapons_holding_an_id) | test from the original's code | yes |
0x006f4735 Player::vslot226 | W | entry, depth 0 | crates/bfh-game/src/customization/gear_alt.rs:34 (fn insert) | crates/bfh-game/src/customization/gear_alt.rs:78 (fn weapon_sets_answer_the_weapons_holding_an_id) | test from the original's code | yes |
0x0072437a world::Soldier::addItem | W | entry, depth 0 | crates/bf2-server/src/alt_fire_heroes.rs:95 (fn add_item_pass) | scenario bfh_client_browser_seated_widget_sound (no recorded result) | has a scenario, no recorded pass | open: PART: entered without its calls (expand = false) |
0x007234a0 FUN_007234a0 | W | entry, depth 0 | crates/bfh-game/src/soldier_items.rs:51 (fn alt_fire_link) | crates/bfh-game/src/soldier_items.rs:193 (fn alt_fire_pass_picks_the_arm_that_names_the_weapon) | test from the original's code | yes |
0x007082cd FUN_007082cd | W | entry, depth 0 | not ported | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | none | open |
0x0070e500 FUN_0070e500 | S | entry, depth 0 | crates/bf2-client/src/weapons.rs:7055 (fn call) | crates/bf2-client/tests/heroes_ammo_pool.rs:3 (fn read), crates/bf2-gameplay/tests/message_handler_bfh126.rs:1 | test from the original's code | yes: PART: entered without its calls (expand = false) |
0x004f0285 CustomizeEvent::vslot11 | W | entry, depth 0 | crates/bf2-net/src/bfh_events.rs:1220 (struct CustomizeEvent) | scenario bfh_client_browser_seated_widget_sound (no recorded result) | has a scenario, no recorded pass | open: PART: entered without its calls (expand = false) |
0x004f04e0 CustomizeEvent::vslot10 | W | entry, depth 0 | crates/bf2-net/src/bfh_events.rs:1220 (struct CustomizeEvent) | crates/bf2-net/tests/bfh_retail_database.rs:5 (fn hex) | test from the original's code | yes: PART: entered without its calls (expand = false) |
0x006f155a Player::vslot224 | W | entry, depth 0 | not ported | identified, ours keeps it another way (H5582: bfh-game's customization holds the hero's (upgrade, weapon) pairs, weapon_gear equipped_on): Player vslot224 (vt+0x380(key, value)): the Player's map +0x3a0 goes from an id (by UpgradeWeaponComp's use a weapon's asset id) to an inner map from a customization item's id to an int; the entry of the key, when there is one (0x006f8477), has its inner map (+0x10) handed to 0x004f07e6 with the second argument (the inner map's assignment 0x004f07b7, not read to its end); called by 0x004f0285 | none | open |
0x0041370a FUN_0041370a | W | 0x006ef603, depth 1 | 1.89 twin 0x00486649 is library code (coverage_bfh boilerplate) | not a line | ||
0x00460c04 ~std::_Tree::op_00460c04 | W | 0x006ef603, depth 1 | small helper: STL tree walk (MSVC std::_Tree: tests or sets the node's _Isnil byte; find / erase / iterate / buy a node) (< 64 bytes) | not a line | ||
0x00489118 FUN_00489118 | W | 0x006ef603, depth 1 | thin wrapper (<= 80 bytes, calls only library code) | not a line | ||
0x0048b2c6 FUN_0048b2c6 | W | 0x006ef603, depth 1 | STL container code, READ: a container's own member by its listing; it calls a body that holds a Dinkumware error string (a stl-read: row of parity_denominator.yaml, H7762) | not a line | ||
0x00413ba1 FUN_00413ba1 | W | 0x006f4735, depth 1 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x00413f15 FUN_00413f15 | W | 0x006f4735, depth 1 | STL container code, UNREAD: it calls a body that holds a Dinkumware error string and no one has read it (a row of parity_stl_unread.tsv, H7762) | not a line | ||
0x004144e7 FUN_004144e7 | W | 0x006f4735, depth 1 | thin wrapper (<= 80 bytes, calls only library code) | not a line | ||
0x00484e71 FUN_00484e71 | W | 0x006f4735, depth 1 | thin wrapper (<= 80 bytes, calls only library code) | not a line | ||
0x004f07b7 FUN_004f07b7 | W | 0x006f4735, depth 1 | not ported | none | open | |
0x004f0b89 FUN_004f0b89 | W | 0x006f4735, depth 1 | crates/bf2-world/src/control_point.rs:85 (fn unregister_control_point) | crates/bf2-server/src/drones.rs:368, crates/bf2-server/src/sentry.rs:1686 | link line only | open |
Show all 57 functions (the other 37)
| The original's function | Kind | Reached | Ours | Proof | Its kind | Checked |
|---|---|---|---|---|---|---|
0x006f843d FUN_006f843d | W | 0x006f4735, depth 1 | not ported | none | open | |
0x009f0895 __EH_prolog3 | W | 0x006f4735, depth 1 | CRT / compiler name (scope_rules.LIBNAME) | not a line | ||
0x009f096d __EH_epilog3 | W | 0x006f4735, depth 1 | CRT / compiler name (scope_rules.LIBNAME) | not a line | ||
0x00489ef5 FUN_00489ef5 | W | 0x007234a0, depth 1 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x0048a6e1 FUN_0048a6e1 | W | 0x007234a0, depth 1 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x0053c702 FUN_0053c702 | W | 0x007234a0, depth 1 | crates/bf2-game/src/squad_manager.rs:864 (fn remove_applicant) | crates/bf2-game/src/squad_manager.rs:3022 | link line only | open |
0x0055b172 FUN_0055b172 | W | 0x007234a0, depth 1 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x0070886f FUN_0070886f | W | 0x007234a0, depth 1 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x00708885 FUN_00708885 | W | 0x007234a0, depth 1 | crates/bf2-server/src/alt_fire_heroes.rs:375 (fn arm_of) | scenario bfh_client_killed_by_alt (no recorded result) | has a scenario, no recorded pass | open |
0x0070b6f4 FUN_0070b6f4 | S | 0x007234a0, depth 1 | crates/bf2-client/src/weapons.rs:7355 (fn heroes_make_alt) | crates/bf2-client/tests/heroes_ammo_pool.rs:110 (fn alternate_shot_sends_the_arms_fire_animation_message), crates/bf2-client/tests/heroes_ammo_pool.rs:141 | test from the original's code | yes |
0x0070b7b5 FUN_0070b7b5 | W | 0x007234a0, depth 1 | crates/bf2-server/src/players_input.rs:3214 (fn weapon_call) | crates/bf2-client/tests/heroes_ammo_pool.rs:3 (fn read) | test from the original's code | yes |
0x004f07e6 FUN_004f07e6 | W | 0x006f155a, depth 1 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x006f8477 FUN_006f8477 | W | 0x006f155a, depth 1 | not ported | none | open | |
0x0041358d ~std::_Tree::_Buynode_0041358d | W | 0x00413ba1, depth 2 | small helper: STL tree walk (MSVC std::_Tree: tests or sets the node's _Isnil byte; find / erase / iterate / buy a node) (< 64 bytes) | not a line | ||
0x00414183 FUN_00414183 | W | 0x004f07b7, depth 2 | STL container code, READ: a container's own member by its listing; it calls a body that holds a Dinkumware error string (a stl-read: row of parity_denominator.yaml, H7762) | not a line | ||
0x0048b52b FUN_0048b52b | W | 0x004f07b7, depth 2 | not ported | none | open | |
0x004f0701 ~std::_Tree::_Lbound_004f0701 | W | 0x004f0b89, depth 2 | small helper: STL tree walk (MSVC std::_Tree: tests or sets the node's _Isnil byte; find / erase / iterate / buy a node) (< 64 bytes) | not a line | ||
0x004f07fb FUN_004f07fb | W | 0x004f0b89, depth 2 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x004f0aa9 FUN_004f0aa9 | W | 0x004f0b89, depth 2 | STL container code, UNREAD: it calls a body that holds a Dinkumware error string and no one has read it (a row of parity_stl_unread.tsv, H7762) | not a line | ||
0x0041b829 FUN_0041b829 | W | 0x00489ef5, depth 2 | engine utility (>= 100 call sites) | not a line | ||
0x004882fd FUN_004882fd | W | 0x0048a6e1, depth 2 | thin wrapper (<= 80 bytes, calls only library code) | not a line | ||
0x0053c036 FUN_0053c036 | W | 0x0053c702, depth 2 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x00403601 FUN_00403601 | W | 0x0070b6f4, depth 2 | not ported | none | open | |
0x00b1edb2 FUN_00b1edb2 | W | 0x0070b6f4, depth 2 | engine utility (>= 100 call sites) | not a line | ||
0x00b1f1a2 FUN_00b1f1a2 | W | 0x0070b6f4, depth 2 | engine utility (>= 100 call sites) | not a line | ||
0x00411eaf FUN_00411eaf | W | 0x0048b52b, depth 3 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x00411ec4 FUN_00411ec4 | W | 0x0048b52b, depth 3 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x0048ae0b FUN_0048ae0b | W | 0x0048b52b, depth 3 | not ported | none | open | |
0x0048cc21 FUN_0048cc21 | W | 0x004f07fb, depth 3 | forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor) | not a line | ||
0x00403552 FUN_00403552 | W | 0x00403601, depth 3 | 1.89 twin 0x004034c1 is library code (coverage_bfh boilerplate) | not a line | ||
0x004035bb FUN_004035bb | W | 0x00403601, depth 3 | not ported | none | open | |
0x009f08c8 __EH_prolog3_catch | W | 0x00403601, depth 3 | CRT / compiler name (scope_rules.LIBNAME) | not a line | ||
0x00412f76 FUN_00412f76 | W | 0x0048ae0b, depth 4 | not ported | none | open | |
0x0048c6fe FUN_0048c6fe | W | 0x0048cc21, depth 4 | not ported | none | open | |
0x004034d0 FUN_004034d0 | W | 0x004035bb, depth 4 | trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp) | not a line | ||
0x00411e4e ~std::_Tree::_Buynode_00411e4e | W | 0x00412f76, depth 5 | small helper: accessor / initialiser (no branches, no calls: reads or fills fields) (< 64 bytes) | not a line | ||
0x00411fbd FUN_00411fbd | W | 0x00412f76, depth 5 | thin wrapper (<= 80 bytes, calls only library code) | not a line |
Inner calls#
A call through a virtual table has no line in the call graph; the ledger lists every one it met: 12 here, 12 of them open lines (nobody has named what they call, or what they call is not checked).
What is open#
In a player's words, as the ledger writes them:
- used on foot (what you see): played and passed, but no assert read the screen and nobody wrote that they looked
- used at the wheel of a vehicle (what it does): not checked
- used at the wheel of a vehicle (what you see): not checked
- used from a passenger's or a gunner's seat (what it does): not checked
- used from a passenger's or a gunner's seat (what you see): not checked
- enemy sitting in a vehicle (what it does): not checked
- enemy sitting in a vehicle (what you see): not checked
- the user dies while it runs (what it does): not checked
- the user dies while it runs (what you see): not checked
- after the user respawns (what it does): not checked
- after the user respawns (what you see): not checked
- the round ends while it runs, and the next round starts clean (what it does): not checked
- the round ends while it runs, and the next round starts clean (what you see): not checked
- the map changes while it runs (what it does): not checked
- the map changes while it runs (what you see): not checked
- a player who joins while it runs sees it (what it does): not checked
- a player who joins while it runs sees it (what you see): not checked
- watching a team mate who uses it (after dying, or as a spectator) (what it does): not checked
- watching a team mate who uses it (after dying, or as a spectator) (what you see): not checked
- team mates against enemies (who gets it and who does not) (what it does): not checked
- team mates against enemies (who gets it and who does not) (what you see): not checked
- in water (swimming) (what it does): not checked
- in water (swimming) (what you see): not checked
- on a ladder (what it does): not checked
- on a ladder (what you see): not checked
- while another effect runs on the same hero (what it does): not checked
- while another effect runs on the same hero (what you see): not checked
- bought at the workbench and used in a played game, not only in a test (what it does): not checked
- bought at the workbench and used in a played game, not only in a test (what you see): not checked
And 28 lines about the original's code (the first 25):
- a step of the original (world::Soldier::addItem): in ours; a scenario names it, with no recorded pass; no test written from the original
- a step of the original (FUN_007082cd): in ours, but no test written from the original's code holds it
- a step of the original (CustomizeEvent::vslot11): in ours; a scenario names it, with no recorded pass; no test written from the original
- a step of the original (Player::vslot224): in ours, but no test written from the original's code holds it
- a step of the original (FUN_004f07b7): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_004f0b89): in ours, but no test written from the original's code holds it
- a step of the original (FUN_006f843d): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_0053c702): in ours, but no test written from the original's code holds it
- a step of the original (FUN_00708885): in ours; a scenario names it, with no recorded pass; no test written from the original
- a step of the original (FUN_006f8477): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_0048b52b): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_00403601): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_0048ae0b): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_004035bb): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_00412f76): this part of the original is in no count of ours: nobody has placed it
- a step of the original (FUN_0048c6fe): this part of the original is in no count of ours: nobody has placed it
- a large shared step of the original (0x0075af1c) is on the list by itself: what it calls for this feature is not followed yet
- an inner call of the original (in 0x006f4735, slot 0x4) is not followed yet: nobody has named what it calls
- an inner call of the original (in 0x006f4735, slot 0x34) is not followed yet: nobody has named what it calls
- a large shared step of the original (0x0072437a) is on the list by itself: what it calls for this feature is not followed yet
- an inner call of the original (in 0x007234a0, slot 0x28) is not followed yet: nobody has named what it calls
- an inner call of the original (in 0x007234a0, slot 0x50) is not followed yet: nobody has named what it calls
- an inner call of the original (in 0x007234a0, slot 0x384) is not followed yet: nobody has named what it calls
- a large shared step of the original (0x0070e500) is on the list by itself: what it calls for this feature is not followed yet
- a large shared step of the original (0x004f0285) is on the list by itself: what it calls for this feature is not followed yet
The other 3 stand in the ledger's file.
How it is tested#
This page is the answer: the tables above name each test and each played scenario that stands for a line, with its kind. The ledger's own tool refuses a status that disagrees with its rows, a tick the rule does not give, and a proof that is not in the tree (feature_ledger.py --check). The wiki's test checks that this page says done only where the ledger does.
In the code#
| What | Where |
|---|---|
| this feature's ledger | notes/bfheroes/features/workbench/alt_fire.toml (its ticks: the folder notes/bfheroes/features/workbench/alt_fire.ticks) |
| the ledger's rule | notes/bfheroes/features/README.md |
| the recorded results | notes/bfheroes/features/records/<run>.tsv |
| the tool that walks the original's call graph and computes the status | tools/bfheroes/feature_ledger.py |
| the counter the ledger was made with | bfheroes e7ed773 2026-11-28T11:50:06 |
| this page's maker | tools/devwiki/features.py |
tools/devwiki/features.py · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.