diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-09-23 11:35:06 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-09-23 11:35:06 +0000 |
commit | 203ed8e40105c17d300b12ee461327cb4416acf2 (patch) | |
tree | cdbc670b1724500e696da4dc787f094c8f512283 /src/scripting/lua.cpp | |
parent | 6667a394a60e85f8bc34eb88c83350f4c28e9d34 (diff) | |
download | manaserv-203ed8e40105c17d300b12ee461327cb4416acf2.tar.gz manaserv-203ed8e40105c17d300b12ee461327cb4416acf2.tar.bz2 manaserv-203ed8e40105c17d300b12ee461327cb4416acf2.tar.xz manaserv-203ed8e40105c17d300b12ee461327cb4416acf2.zip |
Changed delayed events to an explicit interface.
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 3eb3ecff..f33393a5 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -214,8 +214,7 @@ static int LuaChr_Warp(lua_State *s) LOG_WARN("LuaChr_Warp called with a non-existing map."); return 0; } - DelayedEvent e = { EVENT_WARP, lua_tointeger(s, 3), lua_tointeger(s, 4), m }; - GameState::enqueueEvent(q, e); + GameState::enqueueWarp(q, m, lua_tointeger(s, 3), lua_tointeger(s, 4)); return 0; } @@ -284,8 +283,7 @@ static int LuaChr_InvChange(lua_State *s) Item *item = new Item(ic, nb); item->setMap(q->getMap()); item->setPosition(q->getPosition()); - DelayedEvent e = { EVENT_INSERT }; - GameState::enqueueEvent(item, e); + GameState::enqueueInsert(item); } } } |