diff --git a/includes/luaconsole.h b/includes/luaconsole.h index fc5e2c436..e55948269 100644 --- a/includes/luaconsole.h +++ b/includes/luaconsole.h @@ -19,6 +19,11 @@ #define LUACON_KDOWN 1 #define LUACON_KUP 2 +//Bitmasks for things that might need recalculating after changes to tpt.el +#define LUACON_EL_MODIFIED_CANMOVE 0x1 +#define LUACON_EL_MODIFIED_GRAPHICS 0x2 +#define LUACON_EL_MODIFIED_MENUS 0x4 + int *lua_el_func, *lua_el_mode; void luacon_open(); @@ -39,7 +44,7 @@ int luacon_transitionread(lua_State* l); int luacon_transitionwrite(lua_State* l); int luacon_particle_getproperty(char * key, int * format); int luacon_transition_getproperty(char * key, int * format); -int luacon_element_getproperty(char * key, int * format); +int luacon_element_getproperty(char * key, int * format, unsigned int * modified_stuff); int process_command_lua(pixel *vid_buf, char *console, char *console_error); int getPartIndex_curIdx; diff --git a/src/elements/bang.c b/src/elements/bang.c index 2c5c90408..9a374c2d8 100644 --- a/src/elements/bang.c +++ b/src/elements/bang.c @@ -45,12 +45,12 @@ int update_BANG(UPDATE_FUNC_ARGS) { if(!(rand()%2)) { create_part(i, x, y, PT_FIRE); - parts[i].temp = (MAX_TEMP/4)+otemp; + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); } else { create_part(i, x, y, PT_SMKE); - parts[i].temp = (MAX_TEMP/4)+otemp; + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); } } else @@ -60,7 +60,7 @@ int update_BANG(UPDATE_FUNC_ARGS) { create_part(i, x, y, PT_BOMB); parts[i].tmp = 1; parts[i].life = 50; - parts[i].temp = (MAX_TEMP/3)+otemp; + parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); parts[i].vx = rand()%20-10; parts[i].vy = rand()%20-10; } diff --git a/src/elements/ignt.c b/src/elements/ignt.c index c11fccf95..f002e2dbd 100644 --- a/src/elements/ignt.c +++ b/src/elements/ignt.c @@ -31,7 +31,7 @@ int update_IGNT(UPDATE_FUNC_ARGS) { parts[nb].life = 30; parts[nb].vx = rand()%20-10; parts[nb].vy = rand()%20-10; - parts[nb].temp = 400.0f+parts[i].temp-273.15; + parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); } } else diff --git a/src/interface.c b/src/interface.c index bb34c15f1..858af23f3 100644 --- a/src/interface.c +++ b/src/interface.c @@ -93,11 +93,18 @@ int drawgrav_enable = 0; void menu_count(void)//puts the number of elements in each section into .itemcount { int i=0; + for (i=0;i