mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-11-18 07:35:52 +01:00
pass self and mob_ent to arrow override function
This commit is contained in:
2
api.lua
2
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
|
||||
|
||||
|
||||
2
api.txt
2
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
|
||||
|
||||
Reference in New Issue
Block a user