diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-18 19:38:08 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-18 19:38:08 (GMT) |
| commit | f50801333214e79492dd72c23f05cd4bc84fcf54 (patch) | |
| tree | 3b6f934b80c45f1c696c0f8b1ae5f67c743b25b4 /src/powder.c | |
| parent | 8a962b2f9605672627c077d2878c03fab53495a4 (diff) | |
| download | powder-f50801333214e79492dd72c23f05cd4bc84fcf54.zip powder-f50801333214e79492dd72c23f05cd4bc84fcf54.tar.gz | |
New tables in lua API: el and version: element ids and version info respectively. New lua functions: element (get element id from name) and element_func for hooking/overriding element update functions
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c index c8c2ef4..fe25750 100644 --- a/src/powder.c +++ b/src/powder.c @@ -4,6 +4,9 @@ #include <powder.h> #include <air.h> #include <misc.h> +#ifdef LUACONSOLE +#include <luaconsole.h> +#endif int gravwl_timeout = 0; @@ -2094,11 +2097,22 @@ void update_particles_i(pixel *vid, int start, int inc) } //call the particle update function, if there is one +#ifdef LUACONSOLE + if (ptypes[t].update_func && lua_el_mode[t] != 2) +#else if (ptypes[t].update_func) +#endif { if ((*(ptypes[t].update_func))(i,x,y,surround_space,nt)) continue; } +#ifdef LUACONSOLE + if(lua_el_mode[t]) + { + if(luacon_part_update(t,i,x,y,surround_space,nt)) + continue; + } +#endif if (legacy_enable)//if heat sim is off update_legacy_all(i,x,y,surround_space,nt); |
