22 lines
553 B
Plaintext
22 lines
553 B
Plaintext
-- Clear jam mid animation with motion marks
|
|
---@param state number
|
|
---@param mark string
|
|
---@param hud_item game_object
|
|
---@param owner game_object
|
|
function actor_on_hud_animation_mark(state, mark, hud_item, owner)
|
|
if mark == "clear_jam" then
|
|
if not hud_item or not owner then return end
|
|
|
|
local wpn = hud_item:cast_Weapon()
|
|
if not wpn then return end
|
|
|
|
if owner:id() ~= AC_ID then return end
|
|
|
|
hud_item:SetMisfire(false)
|
|
end
|
|
end
|
|
|
|
function on_game_start()
|
|
RegisterScriptCallback("actor_on_hud_animation_mark",actor_on_hud_animation_mark)
|
|
end
|