Function: SetInCombat(spawn, val)
Description: Sets the entity's combat state. Entering combat also clears its running locations and recalculates movement with the stop flag.
Parameters:
spawn(Spawn): a player or other entity spawn.val(boolean): true enters combat; false leaves combat.
Returns: None. Invalid or non-entity input is logged and performs no update.
Movement target ownership: Target-based movement during recalculation acquires one original selected-target loan and keeps it across distance, line-of-sight and navigation work. Changing the selected target during a callback cannot redirect the ongoing calculation to a different allocation. Native navigation retains the original actor through command execution and retirement.