Fix shotguns not reading number of pellets from scripts.#1910
Open
Agiel wants to merge 2 commits intoNeotokyoRebuild:masterfrom
Open
Fix shotguns not reading number of pellets from scripts.#1910Agiel wants to merge 2 commits intoNeotokyoRebuild:masterfrom
Agiel wants to merge 2 commits intoNeotokyoRebuild:masterfrom
Conversation
sunzenshen
reviewed
Mar 31, 2026
|
|
||
| #ifndef NEO | ||
| m_iPlayerDamage = pKeyValuesData->GetInt( "damage", 0 ); | ||
| #endif |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Toolchain
Linked Issues