暂存护盾拦截红字
This commit is contained in:
Binary file not shown.
@@ -26,10 +26,12 @@ namespace WulaFallenEmpire.HarmonyPatches
|
|||||||
{
|
{
|
||||||
if (interceptor.TryIntercept(__instance, lastExactPos, newExactPos))
|
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; // Prevent original method from running.
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user