diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 8eff5048d..dc4a044e5 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -106,6 +106,7 @@ enum actionparams ACTION_VIEWTYPE, ACTION_INCVAL, ACTION_DELAY, + ACTION_FLAGS, ACTION_PARAM_COUNT, }; @@ -116,6 +117,7 @@ struct action // can be initialized by passing a table with numeric indices (con.action). int16_t startframe, numframes; int16_t viewtype, incval, delay; + uint16_t flags; }; struct move diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index eed2e1f75..8a481ff53 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -53,10 +53,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // increase by 3, because atomic GRP adds 1, and Shareware adds 2 #ifdef LUNATIC // Lunatic -# define BYTEVERSION_EDUKE32 306 +# define BYTEVERSION_EDUKE32 309 #else // Non-Lua build -# define BYTEVERSION_EDUKE32 306 +# define BYTEVERSION_EDUKE32 309 #endif //#define BYTEVERSION_13 27 diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index ea90ec92a..8e3e61dcf 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -135,6 +135,7 @@ ffi.cdef[[ struct action { int16_t startframe, numframes; int16_t viewtype, incval, delay; + uint16_t flags; }; struct move { diff --git a/polymer/eduke32/source/lunatic/doc/lunatic.txt b/polymer/eduke32/source/lunatic/doc/lunatic.txt index 1d04af287..8e179b40b 100644 --- a/polymer/eduke32/source/lunatic/doc/lunatic.txt +++ b/polymer/eduke32/source/lunatic/doc/lunatic.txt @@ -1898,7 +1898,7 @@ The value to add the actor's _current frame_ on each frame advance. May be --1, 0, or 1. // In the wild, sometimes other values, too. -[[action_delay]] `[5] delay`:: +[[action_delay]] `[5] delay` (default: 0):: Roughly, the number of <> time units (120 per second) after which a frame is advanced, at a granularity of one game tic (30 per second, corresponding to a `delay` difference of 4).footnote:[The reason @@ -1907,6 +1907,8 @@ code increments its hidden ``action tics'' counter by four (= 120/30).] // TODO: the above can be more precise. State in terms of floor(delay/4). +`[6] flags` (default: 0):: + .Equivalent `action` definitions ========== Each of the following calls return an action with the same public members: diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 505436279..095927362 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -1961,8 +1961,8 @@ local Couter = { move = sp1 * tok.identifier * (sp1 * tok.define)^-2 -- hvel, vvel / function(...) Define.composite(LABEL.MOVE, ...) end, - -- startframe, numframes, viewtype, incval, delay: - action = sp1 * tok.identifier * (sp1 * tok.define)^-5 -- ACTION_PARAM_COUNT + -- startframe, numframes, viewtype, incval, delay, flags: + action = sp1 * tok.identifier * (sp1 * tok.define)^-6 -- ACTION_PARAM_COUNT / function(...) Define.composite(LABEL.ACTION, ...) end, -- action, move, flags...: