1
0
Fork 0

Merge pull request 'Two fixes to mobs' (#1622) from jordan4ibanez/MineClone2:mineclone5 into mineclone5

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1622
mineclone5
jordan4ibanez 2021-04-23 20:31:48 +00:00
commit db0e3a389d
1 changed files with 13 additions and 0 deletions

View File

@ -85,6 +85,11 @@ end
-- states are executed here
local land_state_execution = function(self,dtime)
--no collisionbox exception
if not self.object:get_properties() then
return
end
local pos = self.object:get_pos()
local collisionbox = self.object:get_properties().collisionbox
--get the center of the mob
@ -739,6 +744,14 @@ mobs.mob_step = function(self, dtime)
self.pause_timer = 0
end
--stop projectile mobs from being completely disabled while stunned
if self.projectile_timer and self.projectile_timer > 0.01 then
self.projectile_timer = self.projectile_timer - dtime
if self.projectile_timer < 0.01 then
self.projectile_timer = 0.01
end
end
return -- don't allow collision detection
--do normal ai
else