Skip to content

Commit

Permalink
temporary workaround for attack-nil issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jul 25, 2020
1 parent cb46555 commit d726897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ function mob_class:do_states(dtime)

-- get mob and enemy positions and distance between
local s = self.object:get_pos()
local p = self.attack:get_pos()
local p = self.attack and self.attack:get_pos()
local dist = p and get_distance(p, s) or 500

-- stop attacking if player out of range or invisible
Expand Down

0 comments on commit d726897

Please sign in to comment.