BF2.US bf2-rsdeveloper wiki Parity Discord bf2.us
Battlefield Heroes
On this page

Workbench alternate fire (a weapon's second fire): the feature checklist

Heroes

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.

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 owner's report

The ledger names the owner's open report on this feature: R-0111.

What a check is

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 knowsWorkbench alternate fire (a weapon's second fire)
kindworkbench
in the game's dataaddAltFireWeapon (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 reportR-0111
its row in the sweepsnotes/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.

AddressWhat it is, in the ledger's wordsFollowed
0x0075af1cworld::Kit::handlePickup, a shared step of every kit: this feature's part is the pass over the player's items that have an addAltFireWeapon nameas a part: its calls are not followed
0x006ef603Player vt+0x384: the weapons the gear is onwhole
0x006f4735Player vt+0x388: records the alternate's assetId on the weaponwhole
0x0072437aSoldier::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
0x007234a0the pass over the soldier's fire arms: the arm whose alternate's assetId is in the set gets itwhole
0x007082cdthe fire arm's alternate weapon's assetId (its template's)whole
0x0070e500the 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
0x004f0285the 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
0x004f04e0the CustomizeEvent's reader, a shared step: this feature's part keeps the non-empty listsas a part: its calls are not followed
0x006f155aPlayer vt+0x380: a weapon's list of idswhole

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.

SituationWhat the game does (W)What a player sees (S)Note
used on footchecked: 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 vehicleopen: not checkedopen: not checked
used from a passenger's or a gunner's seatopen: not checkedopen: not checked
enemy sitting in a vehicleopen: not checkedopen: not checked
the user dies while it runsopen: not checkedopen: not checked
after the user respawnsopen: not checkedopen: not checked
the round ends while it runs, and the next round starts cleanopen: not checkedopen: not checked
the map changes while it runsopen: not checkedopen: not checked
a player who joins while it runs sees itopen: not checkedopen: not checked
watching a team mate who uses it (after dying, or as a spectator)open: not checkedopen: not checked
team mates against enemies (who gets it and who does not)open: not checkedopen: not checked
in water (swimming)open: not checkedopen: not checked
on a ladderopen: not checkedopen: not checked
while another effect runs on the same heroopen: not checkedopen: not checked
bought at the workbench and used in a played game, not only in a testopen: not checkedopen: 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 functionKindReachedOursProofIts kindChecked
0x0075af1c world::Kit::vslot4_at194Sentry, depth 0crates/bf2-client/app/src/client/heroes_emote.rs:2crates/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 codeyes: PART: entered without its calls (expand = false)
0x006ef603 Player::vslot225Wentry, depth 0crates/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 codeyes
0x006f4735 Player::vslot226Wentry, depth 0crates/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 codeyes
0x0072437a world::Soldier::addItemWentry, depth 0crates/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 passopen: PART: entered without its calls (expand = false)
0x007234a0 FUN_007234a0Wentry, depth 0crates/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 codeyes
0x007082cd FUN_007082cdWentry, depth 0not portedtrivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)noneopen
0x0070e500 FUN_0070e500Sentry, depth 0crates/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:1test from the original's codeyes: PART: entered without its calls (expand = false)
0x004f0285 CustomizeEvent::vslot11Wentry, depth 0crates/bf2-net/src/bfh_events.rs:1220 (struct CustomizeEvent)scenario bfh_client_browser_seated_widget_sound (no recorded result)has a scenario, no recorded passopen: PART: entered without its calls (expand = false)
0x004f04e0 CustomizeEvent::vslot10Wentry, depth 0crates/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 codeyes: PART: entered without its calls (expand = false)
0x006f155a Player::vslot224Wentry, depth 0not portedidentified, 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 0x004f0285noneopen
0x0041370a FUN_0041370aW0x006ef603, depth 11.89 twin 0x00486649 is library code (coverage_bfh boilerplate)not a line
0x00460c04 ~std::_Tree::op_00460c04W0x006ef603, depth 1small 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_00489118W0x006ef603, depth 1thin wrapper (<= 80 bytes, calls only library code)not a line
0x0048b2c6 FUN_0048b2c6W0x006ef603, depth 1STL 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_00413ba1W0x006f4735, depth 1forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x00413f15 FUN_00413f15W0x006f4735, depth 1STL 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_004144e7W0x006f4735, depth 1thin wrapper (<= 80 bytes, calls only library code)not a line
0x00484e71 FUN_00484e71W0x006f4735, depth 1thin wrapper (<= 80 bytes, calls only library code)not a line
0x004f07b7 FUN_004f07b7W0x006f4735, depth 1not portednoneopen
0x004f0b89 FUN_004f0b89W0x006f4735, depth 1crates/bf2-world/src/control_point.rs:85 (fn unregister_control_point)crates/bf2-server/src/drones.rs:368, crates/bf2-server/src/sentry.rs:1686link line onlyopen
Show all 57 functions (the other 37)
The original's functionKindReachedOursProofIts kindChecked
0x006f843d FUN_006f843dW0x006f4735, depth 1not portednoneopen
0x009f0895 __EH_prolog3W0x006f4735, depth 1CRT / compiler name (scope_rules.LIBNAME)not a line
0x009f096d __EH_epilog3W0x006f4735, depth 1CRT / compiler name (scope_rules.LIBNAME)not a line
0x00489ef5 FUN_00489ef5W0x007234a0, depth 1forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x0048a6e1 FUN_0048a6e1W0x007234a0, depth 1forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x0053c702 FUN_0053c702W0x007234a0, depth 1crates/bf2-game/src/squad_manager.rs:864 (fn remove_applicant)crates/bf2-game/src/squad_manager.rs:3022link line onlyopen
0x0055b172 FUN_0055b172W0x007234a0, depth 1trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x0070886f FUN_0070886fW0x007234a0, depth 1trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x00708885 FUN_00708885W0x007234a0, depth 1crates/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 passopen
0x0070b6f4 FUN_0070b6f4S0x007234a0, depth 1crates/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:141test from the original's codeyes
0x0070b7b5 FUN_0070b7b5W0x007234a0, depth 1crates/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 codeyes
0x004f07e6 FUN_004f07e6W0x006f155a, depth 1forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x006f8477 FUN_006f8477W0x006f155a, depth 1not portednoneopen
0x0041358d ~std::_Tree::_Buynode_0041358dW0x00413ba1, depth 2small 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_00414183W0x004f07b7, depth 2STL 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_0048b52bW0x004f07b7, depth 2not portednoneopen
0x004f0701 ~std::_Tree::_Lbound_004f0701W0x004f0b89, depth 2small 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_004f07fbW0x004f0b89, depth 2forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x004f0aa9 FUN_004f0aa9W0x004f0b89, depth 2STL 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_0041b829W0x00489ef5, depth 2engine utility (>= 100 call sites)not a line
0x004882fd FUN_004882fdW0x0048a6e1, depth 2thin wrapper (<= 80 bytes, calls only library code)not a line
0x0053c036 FUN_0053c036W0x0053c702, depth 2trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x00403601 FUN_00403601W0x0070b6f4, depth 2not portednoneopen
0x00b1edb2 FUN_00b1edb2W0x0070b6f4, depth 2engine utility (>= 100 call sites)not a line
0x00b1f1a2 FUN_00b1f1a2W0x0070b6f4, depth 2engine utility (>= 100 call sites)not a line
0x00411eaf FUN_00411eafW0x0048b52b, depth 3trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x00411ec4 FUN_00411ec4W0x0048b52b, depth 3trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x0048ae0b FUN_0048ae0bW0x0048b52b, depth 3not portednoneopen
0x0048cc21 FUN_0048cc21W0x004f07fb, depth 3forwarder (<= 40 bytes, one call: default arguments, argument order, a constructor's fill, a deleting destructor)not a line
0x00403552 FUN_00403552W0x00403601, depth 31.89 twin 0x004034c1 is library code (coverage_bfh boilerplate)not a line
0x004035bb FUN_004035bbW0x00403601, depth 3not portednoneopen
0x009f08c8 __EH_prolog3_catchW0x00403601, depth 3CRT / compiler name (scope_rules.LIBNAME)not a line
0x00412f76 FUN_00412f76W0x0048ae0b, depth 4not portednoneopen
0x0048c6fe FUN_0048c6feW0x0048cc21, depth 4not portednoneopen
0x004034d0 FUN_004034d0W0x004035bb, depth 4trivial leaf (<= 40 bytes, no calls: a field accessor / vector op / clamp)not a line
0x00411e4e ~std::_Tree::_Buynode_00411e4eW0x00412f76, depth 5small helper: accessor / initialiser (no branches, no calls: reads or fills fields) (< 64 bytes)not a line
0x00411fbd FUN_00411fbdW0x00412f76, depth 5thin 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#

WhatWhere
this feature's ledgernotes/bfheroes/features/workbench/alt_fire.toml (its ticks: the folder notes/bfheroes/features/workbench/alt_fire.ticks)
the ledger's rulenotes/bfheroes/features/README.md
the recorded resultsnotes/bfheroes/features/records/<run>.tsv
the tool that walks the original's call graph and computes the statustools/bfheroes/feature_ledger.py
the counter the ledger was made withbfheroes e7ed773 2026-11-28T11:50:06
this page's makertools/devwiki/features.py
Source: tools/devwiki/features.py · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.