diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-11 12:02:00 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-11 12:02:00 (GMT) |
| commit | 9e634b95cca748b67d63a496b719a0b5c9746dc3 (patch) | |
| tree | d2e5b90c634e148a735dcde600ea58e07746d98b /src/luaconsole.c | |
| parent | 806e1933a2f1a80feeeb10e7923ae58461640225 (diff) | |
| download | powder-9e634b95cca748b67d63a496b719a0b5c9746dc3.zip powder-9e634b95cca748b67d63a496b719a0b5c9746dc3.tar.gz | |
Fire intensity from Lua
Diffstat (limited to 'src/luaconsole.c')
| -rw-r--r-- | src/luaconsole.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c index dac25ea..5eba5e2 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -53,6 +53,7 @@ void luacon_open(){ {"display_mode", &luatpt_cmode_set}, {"throw_error", &luatpt_error}, {"heat", &luatpt_heat}, + {"setfire", &luatpt_setfire}, {NULL,NULL} }; @@ -1036,8 +1037,15 @@ int luatpt_heat(lua_State* l) int luatpt_cmode_set(lua_State* l) { int aheatstate; - aheatstate = luaL_optint(l, 1, CM_COUNT); + aheatstate = luaL_optint(l, 1, CM_FIRE); cmode = aheatstate; return 0; } +int luatpt_setfire(lua_State* l) +{ + int firesize = luaL_optint(l, 2, 4); + float fireintensity = (float)luaL_optnumber(l, 1, 1.0d); + prepare_alpha(firesize, fireintensity); + return 0; +} #endif |
