mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Add Lua support for vertex heights.
This commit is contained in:
parent
60999c7b84
commit
f207048ab2
1 changed files with 21 additions and 1 deletions
|
@ -158,7 +158,11 @@ enum vertex_e {
|
|||
vertex_valid = 0,
|
||||
vertex_x,
|
||||
vertex_y,
|
||||
vertex_z
|
||||
vertex_z,
|
||||
vertex_floorz,
|
||||
vertex_floorzset,
|
||||
vertex_ceilingz,
|
||||
vertex_ceilingzset
|
||||
};
|
||||
|
||||
static const char *const vertex_opt[] = {
|
||||
|
@ -166,6 +170,10 @@ static const char *const vertex_opt[] = {
|
|||
"x",
|
||||
"y",
|
||||
"z",
|
||||
"floorz",
|
||||
"floorzset",
|
||||
"ceilingz",
|
||||
"ceilingzset",
|
||||
NULL};
|
||||
|
||||
enum ffloor_e {
|
||||
|
@ -973,6 +981,18 @@ static int vertex_get(lua_State *L)
|
|||
case vertex_z:
|
||||
lua_pushfixed(L, vertex->z);
|
||||
return 1;
|
||||
case vertex_floorzset:
|
||||
lua_pushboolean(L, vertex->floorzset);
|
||||
return 1;
|
||||
case vertex_ceilingzset:
|
||||
lua_pushboolean(L, vertex->ceilingzset);
|
||||
return 1;
|
||||
case vertex_floorz:
|
||||
lua_pushfixed(L, vertex->floorz);
|
||||
return 1;
|
||||
case vertex_ceilingz:
|
||||
lua_pushfixed(L, vertex->ceilingz);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue