diff options
| author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-06 21:36:50 +0200 |
|---|---|---|
| committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-11 13:43:00 +0200 |
| commit | aa04597c5f8bb806996d604699fc8ebff6d53bdd (patch) | |
| tree | 20e6a79a873605b62c80011fd5c80351f60df6fb /src/scripting/luautil.cpp | |
| parent | d95fccfca8575d8fb06988e558a338e37776961a (diff) | |
| download | manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.tar.gz manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.tar.xz manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.zip | |
Converted the Character class into a component
A CharacterData was created as a proxy class in order to allow using the
old serialization method.
Diffstat (limited to 'src/scripting/luautil.cpp')
| -rw-r--r-- | src/scripting/luautil.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scripting/luautil.cpp b/src/scripting/luautil.cpp index d082cbe..f835be8 100644 --- a/src/scripting/luautil.cpp +++ b/src/scripting/luautil.cpp @@ -128,14 +128,14 @@ Being *getBeing(lua_State *s, int p) return static_cast<Being *>(lua_touserdata(s, p)); } -Character *getCharacter(lua_State *s, int p) +Being *getCharacter(lua_State *s, int p) { if (!lua_islightuserdata(s, p)) return 0; Entity *t = static_cast<Entity *>(lua_touserdata(s, p)); if (t->getType() != OBJECT_CHARACTER) return 0; - return static_cast<Character *>(t); + return static_cast<Being *>(t); } ItemClass *getItemClass(lua_State *s, int p) @@ -206,9 +206,9 @@ Being *checkBeing(lua_State *s, int p) return being; } -Character *checkCharacter(lua_State *s, int p) +Being *checkCharacter(lua_State *s, int p) { - Character *character = getCharacter(s, p); + Being *character = getCharacter(s, p); luaL_argcheck(s, character, p, "character expected"); return character; } |
