Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lightning gun weapon number zeroed when sending weapon info to EV_MISSILE_MISS event #695

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LegendaryGuard
Copy link

@LegendaryGuard LegendaryGuard commented Oct 16, 2024

This forgotten detail from id Software has been unfixed for years and years.
So, that means lightning gun sounds and effects don't play while the weapon number is always 0.
That can be reproduced and debugged writing these lines on cgame/cg_weapons.c in line ~1923:

	Com_Printf( "what weapon I am holding? answer: %d\n", weapon );
	Com_Printf( "WP_GAUNTLET: %d\n", WP_GAUNTLET );
	Com_Printf( "WP_MACHINEGUN: %d\n", WP_MACHINEGUN );
	Com_Printf( "WP_SHOTGUN: %d\n", WP_SHOTGUN );
	Com_Printf( "WP_GRENADE_LAUNCHER: %d\n", WP_GRENADE_LAUNCHER );
	Com_Printf( "WP_ROCKET_LAUNCHER: %d\n", WP_ROCKET_LAUNCHER );
	Com_Printf( "WP_LIGHTNING: %d\n", WP_LIGHTNING );
	Com_Printf( "WP_RAILGUN: %d\n", WP_RAILGUN );
	Com_Printf( "WP_PLASMAGUN: %d\n", WP_PLASMAGUN );
	Com_Printf( "WP_BFG: %d\n", WP_BFG );

Compile, run the game, get the lightning gun weapon, use it and shoot no matter where, it will print the log in the console.

That's what happens in the console log:

  • Before/Original:
what weapon I am holding? answer: 0
WP_GAUNTLET: 1
WP_MACHINEGUN: 2
WP_SHOTGUN: 3
WP_GRENADE_LAUNCHER: 4
WP_ROCKET_LAUNCHER: 5
WP_LIGTHNING: 6
WP_RAILGUN: 7
WP_PLASMAGUN: 8
WP_BFG: 9
  • Fixed:
what weapon I am holding? answer: 6
WP_GAUNTLET: 1
WP_MACHINEGUN: 2
WP_SHOTGUN: 3
WP_GRENADE_LAUNCHER: 4
WP_ROCKET_LAUNCHER: 5
WP_LIGTHNING: 6
WP_RAILGUN: 7
WP_PLASMAGUN: 8
WP_BFG: 9

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