aboutsummaryrefslogtreecommitdiff
path: root/advtrains/models/advtrains_dtrack_swrst_60.b3d
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-10-25 22:39:25 +0200
committerorwell96 <orwell@bleipb.de>2018-10-25 22:40:28 +0200
commitf007017aa4efc5c51bbfe7202235053a6ae8d50a (patch)
tree4fe99adaf0c47bce17d56b5c01e30566272696fc /advtrains/models/advtrains_dtrack_swrst_60.b3d
parent69f368ab34614539c1dde8442fb56efa66bebe6d (diff)
downloadadvtrains-f007017aa4efc5c51bbfe7202235053a6ae8d50a.tar.gz
advtrains-f007017aa4efc5c51bbfe7202235053a6ae8d50a.tar.bz2
advtrains-f007017aa4efc5c51bbfe7202235053a6ae8d50a.zip
Add doc for supported_aspects, improve other doc and aspect autofill
Diffstat (limited to 'advtrains/models/advtrains_dtrack_swrst_60.b3d')
0 files changed, 0 insertions, 0 deletions
a id='n153' href='#n153'>153 154 155 156 157
/*
Minetest
Copyright (C) 2010-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 "voxelalgorithms.h"
#include "nodedef.h"

namespace voxalgo
{

void setLight(VoxelManipulator &v, VoxelArea a, u8 light,
		INodeDefManager *ndef)
{
	for(s32 x=a.MinEdge.X; x<=a.MaxEdge.X; x++)
	for(s32 z=a.MinEdge.Z; z<=a.MaxEdge.Z; z++)
	for(s32 y=a.MinEdge.Y; y<=a.MaxEdge.Y; y++)
	{
		v3s16 p(x,y,z);
		MapNode &n = v.getNodeRefUnsafe(p);
		n.setLight(LIGHTBANK_DAY, light, ndef);
		n.setLight(LIGHTBANK_NIGHT, light, ndef);
	}
}

void clearLightAndCollectSources(VoxelManipulator &v, VoxelArea a,
		enum LightBank bank, INodeDefManager *ndef,
		std::set<v3s16> & light_sources,
		std::map<v3s16, u8> & unlight_from)