Compiles on dolphin, finally
This commit is contained in:
@@ -22,13 +22,13 @@ int moduleMapLoad(lua_State *L) {
|
||||
// Potentially provide up to 3 params
|
||||
chunkpos_t initial = { .x = 0, .y = 0, .z = 0 };
|
||||
if(lua_isnumber(L, 2)) {
|
||||
initial.x = (chunkunit_t)luaL_checkinteger(L, 2);
|
||||
initial.x = (chunkunit_t)lua_tonumber(L, 2);
|
||||
}
|
||||
if(lua_isnumber(L, 3)) {
|
||||
initial.y = (chunkunit_t)luaL_checkinteger(L, 3);
|
||||
initial.y = (chunkunit_t)lua_tonumber(L, 3);
|
||||
}
|
||||
if(lua_isnumber(L, 4)) {
|
||||
initial.z = (chunkunit_t)luaL_checkinteger(L, 4);
|
||||
initial.z = (chunkunit_t)lua_tonumber(L, 4);
|
||||
}
|
||||
|
||||
// Load the map.
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
|
||||
int scriptFuncEntityAdd(lua_State *L) {
|
||||
assertNotNull(L, "Lua state cannot be NULL");
|
||||
assertTrue(lua_isnumber(L, 1), "Expected integer entity type");
|
||||
|
||||
assertTrue(lua_isinteger(L, 1), "Expected integer entity type");
|
||||
|
||||
lua_Integer entityType = luaL_checkinteger(L, 1);
|
||||
entitytype_t entityType = (entitytype_t)luaL_checknumber(L, 1);
|
||||
assertTrue(
|
||||
entityType >= ENTITY_TYPE_NULL && entityType < ENTITY_TYPE_COUNT,
|
||||
"Invalid entity type passed to scriptFuncEntityAdd"
|
||||
|
||||
Reference in New Issue
Block a user