1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-11-18 15:45:29 +01:00

pass self and mob_ent to arrow override function

This commit is contained in:
tenplus1
2025-11-17 17:04:46 +00:00
parent a0a30a4a0c
commit 388c0f3de5
2 changed files with 2 additions and 2 deletions

View File

@@ -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 local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5
-- check for arrow custom override -- 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 local v = ent.velocity or 1 -- or set to default

View File

@@ -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 'arrow' holds the pre-defined arrow object to shoot when
attacking. attacking.
'arrow_override' function that allows tweaking of arrow entity from '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 'dogshoot_switch' allows switching between attack types by using timers
(1 for shoot, 2 for dogfight) (1 for shoot, 2 for dogfight)
'dogshoot_count_max' contains how many seconds before switching from 'dogshoot_count_max' contains how many seconds before switching from