From 4d84c4ffd2c4f25a67b2f094baf6ac81c68ebb07 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 16 Mar 2012 23:20:38 +0100 Subject: Renamed Thing to Entity In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira --- src/scripting/luautil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/scripting/luautil.cpp') diff --git a/src/scripting/luautil.cpp b/src/scripting/luautil.cpp index feed7568..fd83b58b 100644 --- a/src/scripting/luautil.cpp +++ b/src/scripting/luautil.cpp @@ -144,7 +144,7 @@ Character *getCharacter(lua_State *s, int p) { if (!lua_islightuserdata(s, p)) return 0; - Thing *t = static_cast(lua_touserdata(s, p)); + Entity *t = static_cast(lua_touserdata(s, p)); if (t->getType() != OBJECT_CHARACTER) return 0; return static_cast(t); @@ -174,7 +174,7 @@ Monster *getMonster(lua_State *s, int p) { if (!lua_islightuserdata(s, p)) return 0; - Thing *t = static_cast(lua_touserdata(s, p)); + Entity *t = static_cast(lua_touserdata(s, p)); if (t->getType() != OBJECT_MONSTER) return 0; return static_cast(t); @@ -204,7 +204,7 @@ NPC *getNPC(lua_State *s, int p) { if (!lua_islightuserdata(s, p)) return 0; - Thing *t = static_cast(lua_touserdata(s, p)); + Entity *t = static_cast(lua_touserdata(s, p)); if (t->getType() != OBJECT_NPC) return 0; return static_cast(t); @@ -309,7 +309,7 @@ void push(lua_State *s, const std::string &val) lua_pushstring(s, val.c_str()); } -void push(lua_State *s, Thing *val) +void push(lua_State *s, Entity *val) { lua_pushlightuserdata(s, val); } -- cgit v1.2.3-70-g09d2