Crocodile attack destroys Twig Foundation

I have used tpve_prod and have done various verifications but it breaks no matter how I try.

Do you have any good suggestions?

yes, upgrade from twig so it doesn't happen, or use tpve.trace which is pinned in this forum.

======================
==  STARTING TRACE  ==
==  07:49:48.22332  ==
======================
 From: Unknown_Weapon, Unknown_Prefab
 To: BasePlayer, player
   No shared locations (empty location) - no exclusions
   No shared locations with attacker (empty locations for victim) - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 Initiator is hurt trigger; allow and return​


Yes, I have tried that some times and can't do anything as it says Unknown.
(I tried adding Unknown to the group just to be sure, but it didn't help.)

ok that trace is not for crocodiles. it's not tracing it at all, because there is no damage being done. the crocodile is outright killing the twig instead. buildingBlock.Kill(BaseNetworkable.DestroyMode.Gib);

so using a rule to block the damage cannot work.

i could use a different hook (OnEntityKill), but it's not worth using such a broad hook (performance hit). I will wait for oxide/carbon to add a general hook to crocodiles instead which will have much less impact on performance.

Rust native code: public class State_CrocBreakFoundation

	protected override void DoDamage()
	{
		if (base.Senses.FindTarget(out var target) && BaseEntityTargettingExtensions.ToNonNpcPlayer(target, out var player))
		{
			BuildingBlock buildingBlock = FindNearestTwigFoundationOnTargetBuilding(base.Agent, player, null);
			if (buildingBlock == null)
			{
				base.DoDamage();
			}
			else
			{
				buildingBlock.Kill(BaseNetworkable.DestroyMode.Gib);
			}
		}
	}​

Thanks for the info.
What line should I insert that code on?

hi, you don't insert this code. that is the native code in Rust

I know this issue will not be resolved until RUST addresses it, but is there any progress?

hi, this is not a bug or rust issue

it requires oxide to add a hook, or to use harmony to patch it. truepve does not use any harmony, and it needs a hook specific to the DoDamage method.

its twig only, so you can easily  upgrade to wood to solve the problem