Added tmp2 for tpt.get_property and tpt.set_property

This commit is contained in:
cracker64 2011-08-06 00:16:30 -03:00
parent 6dedc28517
commit 83e4f885da

View File

@ -437,6 +437,9 @@ int luatpt_set_property(lua_State* l)
} else if (strcmp(prop,"tmp")==0){ } else if (strcmp(prop,"tmp")==0){
offset = offsetof(particle, tmp); offset = offsetof(particle, tmp);
format = 1; format = 1;
} else if (strcmp(prop,"tmp2")==0){
offset = offsetof(particle, tmp2);
format = 1;
} else if (strcmp(prop,"vy")==0){ } else if (strcmp(prop,"vy")==0){
offset = offsetof(particle, vy); offset = offsetof(particle, vy);
format = 2; format = 2;
@ -577,6 +580,10 @@ int luatpt_get_property(lua_State* l)
lua_pushinteger(l, parts[i].tmp); lua_pushinteger(l, parts[i].tmp);
return 1; return 1;
} }
if (strcmp(prop,"tmp2")==0){
lua_pushinteger(l, parts[i].tmp2);
return 1;
}
if (strcmp(prop,"vy")==0){ if (strcmp(prop,"vy")==0){
lua_pushnumber(l, (double)parts[i].vy); lua_pushnumber(l, (double)parts[i].vy);
return 1; return 1;