mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-24 17:50:21 +01:00
added quick error check for self.drops
This commit is contained in:
parent
bc86a32af6
commit
d574045930
3
api.lua
3
api.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-- Mobs Api (21st January 2017)
|
-- Mobs Api (23rd January 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
@ -422,6 +422,7 @@ function check_for_death(self)
|
|||||||
-- drop items when dead
|
-- drop items when dead
|
||||||
local obj
|
local obj
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
|
self.drops = self.drops or {} -- error check
|
||||||
|
|
||||||
for n = 1, #self.drops do
|
for n = 1, #self.drops do
|
||||||
|
|
||||||
|
@ -148,6 +148,7 @@ end
|
|||||||
function mobs.detach(player, offset)
|
function mobs.detach(player, offset)
|
||||||
|
|
||||||
force_detach(player)
|
force_detach(player)
|
||||||
|
|
||||||
default.player_set_animation(player, "stand" , 30)
|
default.player_set_animation(player, "stand" , 30)
|
||||||
|
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
|
Loading…
Reference in New Issue
Block a user