Testing the creatures via scripts
I need to find some way to ensure type safety of userdata.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "creature_manager.hpp"
|
||||
|
||||
//args: mgr, avatar, script
|
||||
static int create(lua_State* L) {
|
||||
CreatureManager* mgr = static_cast<CreatureManager* const>(lua_touserdata(L, 1));
|
||||
int index = mgr->Create(lua_tostring(L, 2), lua_tointeger(L, 3));
|
||||
|
||||
Reference in New Issue
Block a user