From f3a1137c1df39b760417870544debf3baf1cd572 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Tue, 23 Aug 2011 22:34:15 +0800 Subject: Allowed map names in chr_warp function. Resolves: Mana-Mantis #293. Reviewed-by: Bertram. --- src/scripting/lua.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 7cc09d56..546f4a66 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -299,7 +299,7 @@ static int chr_warp(lua_State *s) Character *q = getCharacter(s, 1); bool b = lua_isnil(s, 2); - if (!q || !(b || lua_isnumber(s, 2))) + if (!q || !(b || lua_isnumber(s, 2) || lua_isstring(s, 2))) { raiseScriptError(s, "chr_warp called with incorrect parameters."); return 0; @@ -312,10 +312,14 @@ static int chr_warp(lua_State *s) Script *t = static_cast