Skip to content

Fix shotguns not reading number of pellets from scripts.#1910

Open
Agiel wants to merge 2 commits intoNeotokyoRebuild:masterfrom
Agiel:neo_weapon_parse
Open

Fix shotguns not reading number of pellets from scripts.#1910
Agiel wants to merge 2 commits intoNeotokyoRebuild:masterfrom
Agiel:neo_weapon_parse

Conversation

@Agiel
Copy link
Copy Markdown
Contributor

@Agiel Agiel commented Mar 30, 2026

Description

Move all NT specific weapon info to a new CNEOWeaponInfo class, and add "Bullets" to the data being read. Then use that for the Supa7 and AA13 instead of hardcoding the value.

image

Toolchain

  • Linux GCC Distro Native - CachyOS - gcc version 15.2.1 20260209

Linked Issues

@Agiel Agiel requested a review from a team March 30, 2026 22:38

#ifndef NEO
m_iPlayerDamage = pKeyValuesData->GetInt( "damage", 0 );
#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno if you were getting a warning that was blocking the build, but wonder if we could actually keep the #ifndef NEO here so that we don't set m_iPLayerDamage twice, since this value may get clobbered and never used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to restore this file to it's original state. In general I think we should avoid ifdefs unless absolutely necessary.

  • If the script only contains "Damage" this will set it to 0, and then our subclass overwrites it with the correct value.
  • If the script only contains "damage" this will read that value, and then our subclass will default to 42.
  • If the script contains no damage entry, this will set it to 0 and then our subclass will default to 42.

So ifdefing out this line would have no effect as far as I can tell.

@sunzenshen sunzenshen requested a review from a team March 31, 2026 05:07
@Agiel Agiel requested a review from sunzenshen March 31, 2026 20:24
@DESTROYGIRL DESTROYGIRL added the Gunplay Gunplay elements in Neotokyo. Grenades, TTK, etc. label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gunplay Gunplay elements in Neotokyo. Grenades, TTK, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The supa7 should be firing 8 pellets per standard shot

3 participants