暂存护盾拦截红字

This commit is contained in:
2025-08-05 19:14:25 +08:00
parent b5dd9f58c4
commit e30000f047
2 changed files with 5 additions and 3 deletions

View File

@@ -26,10 +26,12 @@ namespace WulaFallenEmpire.HarmonyPatches
{
if (interceptor.TryIntercept(__instance, lastExactPos, newExactPos))
{
// Directly destroy the projectile instead of calling Impact via reflection.
// This is cleaner and avoids the NRE that happens when the game engine
// continues to process a projectile that was destroyed mid-tick.
__instance.Destroy(DestroyMode.Vanish);
ImpactMethod.Invoke(__instance, new object[] { null, true });
return false;
return false; // Prevent original method from running.
}
}
}