Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Description:
During gameplay, when a projectile doesn’t hit any target (e.g. due to the TrueVisualMisses mod or other projectile flight modifications), the Postfix Infusion.Harmonize.Impact.Postfix assumes that both hitThing and __state are never null.
In such cases, this results in a NullReferenceException.
Log excerpt:
Exception ticking RNBullet_BlueDeath1778600: System.NullReferenceException: Object reference not set to an instance of an object
at Infusion.Harmonize.Impact.Postfix (Verse.Thing hitThing, RimWorld.Bullet __instance, Infusion.Harmonize.BulletImpactPatchState __state)
at RimWorld.Bullet.Impact (Verse.Thing hitThing, System.Boolean blockedByShield)
- PREFIX lucio.TrueVisualMisses: ...
- POSTFIX rimworld.sk.infusion: Void Infusion.Harmonize.Impact:Postfix(...)
Suggested fix:
Add null-safety checks in the Postfix:
if (__instance == null || __state == null || hitThing == null || hitThing.Destroyed) return;
This will make the mod resilient when other mods cause the bullet to have no hit target or alter the flow in Impact.
Reproduction notes:
Occurs when used with TrueVisualMisses (likely also with other mods altering projectile hits).
Happens with any bullet type if hitThing ends up null.
The real reason why this error has surfaced is because TrueVisualMisses is making some destructive changes to the bullet mechanics which causes my mod to fail. If you test my mod in vanilla, you won't face any similar issues. I have applied the fix that ChatGPT recommended because it does improve resilience against these type of issues but I am still not too optimistic.
I've updated my mod to 1.4.6. Please try it out and if you face any more issues, do let me know because I have a feeling I might have to set this mod as incompatible. Thank you again for the report.