Skip to content

Reset ammo count at the start of tactical and improve HotLoadedAmmo's code - #1625

Merged
Tedster59 merged 4 commits into
X2CommunityCore:masterfrom
Styrium:Better-GetClipSize-Calls
Oct 10, 2026
Merged

Tedster59 merged 4 commits into
X2CommunityCore:masterfrom
Styrium:Better-GetClipSize-Calls

Conversation

@Styrium

@Styrium Styrium commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Resolves #1624

@Tedster59

Copy link
Copy Markdown
Contributor

@Styrium does this cause issues for items that don't have ammo or clip size, such as non-weapons?

@Styrium

Styrium commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Well, for items that aren't X2WeaponTemplate or X2AmmoTemplate that value gets set to -1, which is the same value it gets on creation for those items. I think nothing has altered that value at this point in the pipeline. Effects that grant extra uses of abilities should trigger afterwards.

However, it will overwrite the MergeAmmoAsNeeded() behavior, so there needs to be an extra check before calling it.

@Styrium

Styrium commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

I'm fairly certain it should be safe to merge now

@Tedster59
Tedster59 merged commit b599a65 into X2CommunityCore:master Oct 10, 2026
4 checks passed
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.

Add call to reset all weapon ammo during tactical start and improve HotLoadAmmo GetClipSize handling

2 participants