From 388c0f3de5d96e0f312de963ac172572c3598671 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 17 Nov 2025 17:04:46 +0000 Subject: [PATCH] pass self and mob_ent to arrow override function --- api.lua | 2 +- api.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 36af64a..88a2220 100644 --- a/api.lua +++ b/api.lua @@ -2390,7 +2390,7 @@ function mob_class:do_states(dtime) local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5 -- check for arrow custom override - if self.arrow_override then self.arrow_override(ent) end + if self.arrow_override then self.arrow_override(ent, self) end local v = ent.velocity or 1 -- or set to default diff --git a/api.txt b/api.txt index 1f0f88f..38c3697 100644 --- a/api.txt +++ b/api.txt @@ -142,7 +142,7 @@ functions needed for the mob to work properly which contains the following: 'arrow' holds the pre-defined arrow object to shoot when attacking. 'arrow_override' function that allows tweaking of arrow entity from - inside mob definition (self) passed to function. + inside mob definition (self, mob_ent) passed to function. 'dogshoot_switch' allows switching between attack types by using timers (1 for shoot, 2 for dogfight) 'dogshoot_count_max' contains how many seconds before switching from