From a3bf9627a4bd933981e2273d252e9ef748f1a99c Mon Sep 17 00:00:00 2001 From: BlockMen Date: Mon, 16 Nov 2015 17:33:35 +0100 Subject: [PATCH] Fix crash caused by missing eat node --- README.txt | 2 +- changelog.txt | 3 +++ creatures/README.txt | 4 ++-- creatures/functions.lua | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 54f2788..c1d77ed 100644 --- a/README.txt +++ b/README.txt @@ -2,7 +2,7 @@ Mod/Modpack Creatures ===================== Copyright (c) 2015 BlockMen -Version: 2.2 +Version: 2.2.1 A Mod(pack) for Minetest that provides a MOB-Engine and adds several creatures to the game. diff --git a/changelog.txt b/changelog.txt index 8c67533..b45a14e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,3 +14,6 @@ Version 2.2 - Added descriptions to spawners - Added option to set custom panic and swim animations +Version 2.2.1 +------------- +- Fixed crash caused by not existing node diff --git a/creatures/README.txt b/creatures/README.txt index ee119a5..008708c 100644 --- a/creatures/README.txt +++ b/creatures/README.txt @@ -2,7 +2,7 @@ Creatures MOB-Engine ==================== Copyright (c) 2015 BlockMen -Version: 2.0 Beta +Version: 2.0.1 This mod provides an engine, that handles the base function for MOB in Minetest. @@ -12,7 +12,7 @@ performance and functionality. See API.txt for more informations on how to use this engine for mobs. -License: +License: ~~~~~~~~ Code: (c) Copyright 2015 BlockMen; modified zlib-License diff --git a/creatures/functions.lua b/creatures/functions.lua index 8673891..56b5390 100644 --- a/creatures/functions.lua +++ b/creatures/functions.lua @@ -481,7 +481,7 @@ creatures.on_step = function(self, dtime) if name == self.last_node.name then eat_node = current_pos break - elseif name == sn.name then + elseif sn and sn.name == name then eat_node = p break end