Skip to content

Quake 0.3.25: draw the gun whatever left-hand slot is selected - #253

Open
Kyoskii wants to merge 1 commit into
masterfrom
quake/left-slot-gun
Open

Kyoskii wants to merge 1 commit into
masterfrom
quake/left-slot-gun

Conversation

@Kyoskii

@Kyoskii Kyoskii commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Quake's gun was invisible for any hunter with their second or third left-hand slot selected.

Cause

The equipment block (GameDataMan +0x8 → +0x240) keeps the hand weapon ids from +0x64 in hand order: left 1, right 1, left 2, right 2, left 3, right 3. The hand holds ids[2 * slot], with the left slot index at +0xc and the right at +0x10 (0x1a5e027 reads them this way). Quake always wrote its gun into ids[0], left slot 1. With slot 2 or 3 up, the game kept the hunter's own weapon in part slot 7, which Quake then placed as the viewmodel, so no Quake gun appeared.

Fix

  • The gun goes into the selected left slot (left_slot(), left_weapon_id(slot)).
  • If the player switches left slot while Quake has them, the old slot gets its weapon back before the new one takes the gun.
  • left_weapon.txt now stores <id> <slot>. An older file holding only the id reads as slot 1, and a gun an older session left in slot 1 is given back.

Checks

  • Headless on a copy of a save with left slot 2 selected: five lamp travels between Central Yharnam and the Hunter's Dream, a cutscene in each area, and a left-slot switch both ways. The Church Cannon (WP_A_1752) was in hand throughout and nothing crashed. Before the fix, part slot 7 stayed WP_A_1000, the hunter's own weapon.
  • That run used the v0.2.34 host with c7bd664's lamp-travel fix. On master it builds clean (-Wall); I haven't run it on the v0.2.35 host.

🤖 Generated with Claude Code

The equipment's hand ids run left 1, right 1, left 2, right 2, left 3, right
3 from +0x64, and the hand holds ids[2 * slot] with the left slot at +0xc
(0x1a5e027 reads them so). Quake wrote its gun into left 1 alone, so a hunter
with the second or third left slot up kept their own weapon in hand and saw
no gun. The gun now goes in the selected left slot; a slot switched while
Quake has the player gets its own weapon back first; left_weapon.txt keeps
"<id> <slot>" (an older file, the id alone, is slot 1's), and a gun an older
session left in another slot is given back.

Checked headless on a copy of Kyo's save (left slot 2 up) on the v0.2.34
host with c7bd664's crash fix: five lamp travels between Central Yharnam and
the Hunter's Dream with cutscenes in each and a left-slot switch both ways -
the Church Cannon (WP_A_1752) in hand throughout, no crash. Builds clean on
master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test build of fc02d19: Windows zip, Linux tarball and Steam Deck kit, unsigned, kept 14 days.
Download windows, linux or steamdeck (each with its package), or release (everything), from the bottom of the run page:
https://github.com/droogie/bbhost/actions/runs/43752531104#artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant