mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add Lua support for vertex heights.
This commit is contained in:
parent
42bbad4810
commit
1d5b435de1
1 changed files with 21 additions and 1 deletions
|
|
@ -158,7 +158,11 @@ enum vertex_e {
|
||||||
vertex_valid = 0,
|
vertex_valid = 0,
|
||||||
vertex_x,
|
vertex_x,
|
||||||
vertex_y,
|
vertex_y,
|
||||||
vertex_z
|
vertex_z,
|
||||||
|
vertex_floorz,
|
||||||
|
vertex_floorzset,
|
||||||
|
vertex_ceilingz,
|
||||||
|
vertex_ceilingzset
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const vertex_opt[] = {
|
static const char *const vertex_opt[] = {
|
||||||
|
|
@ -166,6 +170,10 @@ static const char *const vertex_opt[] = {
|
||||||
"x",
|
"x",
|
||||||
"y",
|
"y",
|
||||||
"z",
|
"z",
|
||||||
|
"floorz",
|
||||||
|
"floorzset",
|
||||||
|
"ceilingz",
|
||||||
|
"ceilingzset",
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
enum ffloor_e {
|
enum ffloor_e {
|
||||||
|
|
@ -973,6 +981,18 @@ static int vertex_get(lua_State *L)
|
||||||
case vertex_z:
|
case vertex_z:
|
||||||
lua_pushfixed(L, vertex->z);
|
lua_pushfixed(L, vertex->z);
|
||||||
return 1;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue