Skip to content

Fix runtime Reflection ArgumentExceptions and projectile/menu NullReferenceExceptions - #8

Open
Spagles wants to merge 3 commits into
realloon:mainfrom
Spagles:main
Open

Fix runtime Reflection ArgumentExceptions and projectile/menu NullReferenceExceptions#8
Spagles wants to merge 3 commits into
realloon:mainfrom
Spagles:main

Conversation

@Spagles

@Spagles Spagles commented Jul 31, 2026

Copy link
Copy Markdown

Replaced invalid null Reflection assignments on Verse.Verb primitive int fields (cachedBurstShotCount and cachedTicksBetweenBurstShots) with -1 to prevent ArgumentException crashes during module/trait updates.
Ensured Projectile.extraDamages is initialized before appending trait extra damages (e.g. EMP rounds) to avoid NullReferenceException when firing standard projectiles
Added null-conditional access to context.FirstSelectedPawn when retrieving reload float menu options to prevent null dereferences when no pawn is selected

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