changing execution order inside Destructible.cs

Would it be possible to change the execution order inside the script (Destructible)?
In Line 276:

From this
C#:
            // The RaycastHit will be null if the destruction happens with no collision.
            var hitPosition = (hit != null && hit.HasValue) ? hit.Value.point : m_Transform.position;
            var hitNormal = (hit != null && hit.HasValue) ? hit.Value.normal : m_Transform.up;
            Destruct(hitPosition, hitNormal);

#if ULTIMATE_CHARACTER_CONTROLLER_MULTIPLAYER
            if (m_NetworkInfo != null && m_NetworkInfo.IsServer()) {
                m_DestructibleMonitor.Destruct(hitPosition, hitNormal);
            }
#endif

to this
C#:
            // The RaycastHit will be null if the destruction happens with no collision.
            var hitPosition = (hit != null && hit.HasValue) ? hit.Value.point : m_Transform.position;
            var hitNormal = (hit != null && hit.HasValue) ? hit.Value.normal : m_Transform.up;

#if ULTIMATE_CHARACTER_CONTROLLER_MULTIPLAYER
            if (m_NetworkInfo != null && m_NetworkInfo.IsServer()) {
                m_DestructibleMonitor.Destruct(hitPosition, hitNormal);
            }
#endif
            Destruct(hitPosition, hitNormal);


In my mirror integration the grenades get destroyed before i can call the RPC method for the explosion effect.
I'm actually nor sure how you make that work with PUN.
 
Top