// WARNING: The 'HandleFall' method gets called every frame for every player and AI in a raid. Be very careful with logging or expensive operations in this prefix patch!
// Check if it's our own player, or if a Player property even exists
if(__instance.Player?.IsAI??true)
{
returntrue;// Run original method
}
// Global fall damage flag overrides everything
if(FreecamPlugin.GlobalDisableFallDamage.Value)
{
returnfalse;// Prevent original method from running
}
// If smart fall damage flag is enabled, check if we've recently teleported and if the fall height value was positive