mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add BodyType, fix crouching
This commit is contained in:
parent
7e80642ec3
commit
0a14d6220a
13 changed files with 131 additions and 34 deletions
|
|
@ -273,13 +273,7 @@ static int l_get_textures(lua::State* L) {
|
|||
|
||||
static int l_get_model(lua::State* L) {
|
||||
if (auto def = require_block(L)) {
|
||||
switch (def->model) {
|
||||
case BlockModel::block: return lua::pushstring(L, "block");
|
||||
case BlockModel::aabb: return lua::pushstring(L, "aabb");
|
||||
case BlockModel::xsprite: return lua::pushstring(L, "X");
|
||||
case BlockModel::custom: return lua::pushstring(L, "custom");
|
||||
case BlockModel::none: return lua::pushstring(L, "none");
|
||||
}
|
||||
return lua::pushstring(L, to_string(def->model));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue