summaryrefslogtreecommitdiff
path: root/src/scripting/lua.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-04-22 18:48:09 +0100
committerDavid Athay <ko2fan@gmail.com>2009-04-22 18:48:09 +0100
commitb4864fb3a210dd2aea1ecfef4d5e34f0d1054cec (patch)
treedd3db0f3af3087a8a52b75083793ece43dd7efa2 /src/scripting/lua.cpp
parent6108f98638e1c8d3fb81d0cf38c148c5dee90ee5 (diff)
downloadmanaserv-b4864fb3a210dd2aea1ecfef4d5e34f0d1054cec.tar.gz
manaserv-b4864fb3a210dd2aea1ecfef4d5e34f0d1054cec.tar.bz2
manaserv-b4864fb3a210dd2aea1ecfef4d5e34f0d1054cec.tar.xz
manaserv-b4864fb3a210dd2aea1ecfef4d5e34f0d1054cec.zip
Fixed non combat beings taking damage. Added some debugging info on inserting and removing objects.
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r--src/scripting/lua.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp
index e6e7860a..2b148ef0 100644
--- a/src/scripting/lua.cpp
+++ b/src/scripting/lua.cpp
@@ -453,6 +453,9 @@ static int being_damage(lua_State *s)
{
Being *being = getBeing(s, 1);
+ if (!being->canFight())
+ return 0;
+
Damage damage;
damage.base = lua_tointeger(s, 2);
damage.delta = lua_tointeger(s, 3);