* added access to translucency and triggertag in polyobj_t

* added POF_ flags to INT_CONST in dehacked.c
This commit is contained in:
Monster Iestyn 2020-09-08 22:10:11 +01:00
parent 33c96ab1aa
commit 5fc58de94f
2 changed files with 30 additions and 1 deletions

View File

@ -9906,6 +9906,25 @@ struct {
{"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
// PolyObject flags
{"POF_CLIPLINES",POF_CLIPLINES}, ///< Test against lines for collision
{"POF_CLIPPLANES",POF_CLIPPLANES}, ///< Test against tops and bottoms for collision
{"POF_SOLID",POF_SOLID}, ///< Clips things.
{"POF_TESTHEIGHT",POF_TESTHEIGHT}, ///< Test line collision with heights
{"POF_RENDERSIDES",POF_RENDERSIDES}, ///< Renders the sides.
{"POF_RENDERTOP",POF_RENDERTOP}, ///< Renders the top.
{"POF_RENDERBOTTOM",POF_RENDERBOTTOM}, ///< Renders the bottom.
{"POF_RENDERPLANES",POF_RENDERPLANES}, ///< Renders top and bottom.
{"POF_RENDERALL",POF_RENDERALL}, ///< Renders everything.
{"POF_INVERT",POF_INVERT}, ///< Inverts collision (like a cage).
{"POF_INVERTPLANES",POF_INVERTPLANES}, ///< Render inside planes.
{"POF_INVERTPLANESONLY",POF_INVERTPLANESONLY}, ///< Only render inside planes.
{"POF_PUSHABLESTOP",POF_PUSHABLESTOP}, ///< Pushables will stop movement.
{"POF_LDEXEC",POF_LDEXEC}, ///< This PO triggers a linedef executor.
{"POF_ONESIDE",POF_ONESIDE}, ///< Only use the first side of the linedef.
{"POF_NOSPECIALS",POF_NOSPECIALS}, ///< Don't apply sector specials.
{"POF_SPLAT",POF_SPLAT}, ///< Use splat flat renderer (treat cyan pixels as invisible).
#ifdef HAVE_LUA_SEGS
// Node flags
{"NF_SUBSECTOR",NF_SUBSECTOR}, // Indicate a leaf.

View File

@ -24,7 +24,9 @@ enum polyobj_e {
polyobj_angle,
polyobj_damage,
polyobj_thrust,
polyobj_flags
polyobj_flags,
polyobj_translucency,
polyobj_triggertag
};
static const char *const polyobj_opt[] = {
"valid",
@ -34,6 +36,8 @@ static const char *const polyobj_opt[] = {
"damage",
"thrust",
"flags",
"translucency",
"triggertag",
NULL};
static int polyobj_get(lua_State *L)
@ -72,6 +76,12 @@ static int polyobj_get(lua_State *L)
case polyobj_flags:
lua_pushinteger(L, polyobj->flags);
break;
case polyobj_translucency:
lua_pushinteger(L, polyobj->translucency);
break;
case polyobj_triggertag:
lua_pushinteger(L, polyobj->triggertag);
break;
}
return 1;
}