From 203ed8e40105c17d300b12ee461327cb4416acf2 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sun, 23 Sep 2007 11:35:06 +0000 Subject: Changed delayed events to an explicit interface. --- src/scripting/lua.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 3eb3ecf..f33393a 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); } } } -- cgit