Update creatures mod to Git commit 3fadf2b...

https://github.com/AntumMT/mod-creatures/tree/3fadf2b
This commit is contained in:
Jordan Irwin 2021-05-01 16:45:37 -07:00
parent 27973087b0
commit a5ab11b010
3 changed files with 9 additions and 4 deletions

View File

@ -84,7 +84,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [dinosaurs_aggressive][] -- version: [874f299 Git][ver.dinosaurs_aggressive] *2017-07-27*
* velociraptor ([LGPL][lic.lgpl2.1] / [CC BY-SA][lic.ccbysa3.0]) -- forked from *mobs_farlands* (part of [farlands][] sub-game)
* engine/
* [creatures][] ([zlib][lic.creatures] / [CC BY-SA][lic.ccbysa3.0]) -- version: [revived 1.0][ver.creatures] *2021-04-30*
* [creatures][] ([zlib][lic.creatures] / [CC BY-SA][lic.ccbysa3.0]) -- version: [revived 3fadf2b Git][ver.creatures] *2021-05-04*
* [mobkit][] ([MIT][lic.mobkit]) -- version: [ddea141 Git][ver.mobkit] *2021-02-01*
* [mobs_redo][] ([MIT][lic.mobs_redo] / [CC BY][lic.ccby3.0] / [CC0][lic.cc0]) -- version: [f6e16a5 Git][ver.mobs_redo] *2021-04-11* ([patched][patch.mobs_redo])
* [folks][] ([GPL][lic.gpl3.0]) -- version: [0.2.0][ver.folks] *2021-02-23*
@ -494,7 +494,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.compassgps]: https://github.com/Kilarin/compassgps/tree/567b95f
[ver.crafting_bench]: https://github.com/minetest-mods/crafting_bench/tree/69083ed
[ver.craftguide]: https://github.com/minetest-mods/craftguide/tree/f379998
[ver.creatures]: https://github.com/AntumMT/mod-creatures/releases/tag/revived-v1.0
[ver.creatures]: https://github.com/AntumMT/mod-creatures/tree/3fadf2b
[ver.crops]: https://github.com/minetest-mods/crops/tree/v1
[ver.currency]: https://gitlab.com/VanessaE/currency/tree/2021-01-30
[ver.deploy_nodes]: https://github.com/cornernote/minetest-deploy_nodes/tree/b67e162

View File

@ -131,7 +131,7 @@ and with a chance of 100% 2 items of type "default:stone"
combat = { -- specifies behavior of hostile mobs in "attack" mode
attack_damage = 1, -- how much damage deals each hit
attack_speed = 0.6, -- time in seconds between hits
attack_speed = 1.0, -- time in seconds between hits (default: 1.0)
attack_radius = 1.1, -- distance in blocks mob can reach to hit
search_enemy = true, -- true to search enemies to attack

View File

@ -294,6 +294,11 @@ creatures.on_step = function(self, dtime)
return
end
-- set default speed if not specified
if def.combat then
def.combat.attack_speed = def.combat.attack_speed or 1.0
end
-- timer updates
self.lifetimer = self.lifetimer + dtime
self.modetimer = self.modetimer + dtime
@ -482,7 +487,7 @@ creatures.on_step = function(self, dtime)
local sn = core.get_node_or_nil(p)
local eat_node
for _,name in pairs(nodes) do
if name == self.last_node.name then
if self.last_node ~= nil and name == self.last_node.name then
eat_node = current_pos
break
elseif sn and sn.name == name then