fix: release auto-mark tag the moment the marked target dies — vanilla keeps it until corpse despawn (skull shoot tag lifetime is 25s) which starves mark_limit and produced the post-kill dead zone; cancel_tag + cooldown reset now, next tick re-marks within 0.2s
This commit is contained in:
@@ -494,6 +494,21 @@ local function auto_mark_by_tag(tag_name, t, fixed_frame)
|
|||||||
local disabled_character_state_component = context.disabled_character_state_component
|
local disabled_character_state_component = context.disabled_character_state_component
|
||||||
local is_character_disabled = disabled_character_state_component and disabled_character_state_component.is_disabled and DISABLING_TYPES[disabled_character_state_component.disabling_type]
|
local is_character_disabled = disabled_character_state_component and disabled_character_state_component.is_disabled and DISABLING_TYPES[disabled_character_state_component.disabling_type]
|
||||||
local target_unit, target_tag, target_is_dormant_daemonhost
|
local target_unit, target_tag, target_is_dormant_daemonhost
|
||||||
|
-- dead-target tag release: vanilla keeps the tag until the corpse despawns (up to the
|
||||||
|
-- template lifetime), which starves mark_limit; drop the tag as soon as the target dies
|
||||||
|
if marked_tag and not marked_tag_is_manual then
|
||||||
|
local marked_target = marked_tag._target_unit
|
||||||
|
if marked_target and HEALTH_ALIVE and not HEALTH_ALIVE[marked_target] then
|
||||||
|
local smart_tag_system = context.smart_tag_system
|
||||||
|
local player_unit = context.player and context.player.player_unit
|
||||||
|
if smart_tag_system and player_unit then
|
||||||
|
mod:print_debug("Auto Mark target dead, releasing tag")
|
||||||
|
smart_tag_system:cancel_tag(marked_tag._id, player_unit, true)
|
||||||
|
marked_tag = nil
|
||||||
|
tag_context.cooldown = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
if is_character_disabled and (tag_name == TAG_NAMES.COMPANION_TAG or tag_name == TAG_NAMES.SERVO_SKULL_TAG) then
|
if is_character_disabled and (tag_name == TAG_NAMES.COMPANION_TAG or tag_name == TAG_NAMES.SERVO_SKULL_TAG) then
|
||||||
local disabling_unit = disabled_character_state_component and disabled_character_state_component.disabling_unit
|
local disabling_unit = disabled_character_state_component and disabled_character_state_component.disabling_unit
|
||||||
if disabling_unit and (not marked_tag or marked_tag._target_unit ~= disabling_unit) then
|
if disabling_unit and (not marked_tag or marked_tag._target_unit ~= disabling_unit) then
|
||||||
|
|||||||
Reference in New Issue
Block a user