aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2014-02-15 02:19:49 +0100
committerKahrl <kahrl@gmx.net>2014-02-15 02:19:49 +0100
commitc87316487840fd176662207acef4fb15286e32e8 (patch)
tree8f221faa29a107f9b3baf1e3f5204d618da98750 /games/minimal/mods/default
parent31ec14afe2ec1791821e742d79b172bbebe43e03 (diff)
downloadminetest-c87316487840fd176662207acef4fb15286e32e8.tar.gz
minetest-c87316487840fd176662207acef4fb15286e32e8.tar.bz2
minetest-c87316487840fd176662207acef4fb15286e32e8.zip
Accept any error response code for missing index.mth
Diffstat (limited to 'games/minimal/mods/default')
0 files changed, 0 insertions, 0 deletions
'#n130'>130 131 132 133 134 135 136 137 138 139 140 141 142 143
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "scriptapi.h"
#include "scriptapi_particles.h"
#include "server.h"
#include "script.h"
#include "scriptapi_types.h"
#include "scriptapi_common.h"

// add_particle(pos, velocity, acceleration, expirationtime,
// 		size, collisiondetection, texture, player)
// pos/velocity/acceleration = {x=num, y=num, z=num}
// expirationtime = num (seconds)
// size = num
// texture = e.g."default_wood.png"
int l_add_particle(lua_State *L)
{
	// Get server from registry
	Server *server = get_server(L);
	// Get parameters
	v3f pos = check_v3f(L, 1);
	v3f vel = check_v3f(L, 2);
	v3f acc = check_v3f(L, 3);
	float expirationtime = luaL_checknumber(L, 4);
	float size = luaL_checknumber(L, 5);
	bool collisiondetection = lua_toboolean(L, 6);
	std::string texture = luaL_checkstring(L, 7);