f32 distance = speed_f.getLength();
std::vector<DistanceSortedActiveObject> clientobjects;
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
- for (int i=0; i < clientobjects.size(); i++)
+ for (size_t i=0; i < clientobjects.size(); i++)
{
if ((self == 0) || (self != clientobjects[i].obj)) {
objects.push_back((ActiveObject*)clientobjects[i].obj);
infostream << "EmergeThread: " x << std::endl; }
class Mapgen;
-class MapgenParams;
-class MapgenFactory;
+struct MapgenParams;
+struct MapgenFactory;
class Biome;
class BiomeDefManager;
class EmergeThread;
if(obj->getType() == ACTIVEOBJECT_TYPE_PLAYER)
continue;
u16 id = i->first;
- v3f objectpos = obj->getBasePosition();
// Delete static object if block is loaded
if(obj->m_static_exists){
MapBlock *block = m_map->getBlockNoCreateNoEx(obj->m_static_block);
// Ignore disconnected players
if(player->peer_id == 0)
continue;
-
- v3f playerpos = player->getPosition();
// Move
player->move(dtime, *m_map, 100*BS);
*/
{
- v3f lplayerpos = lplayer->getPosition();
-
// Apply physics
if(free_move == false && is_climbing == false)
{
i != m_players.end(); ++i)
{
Player *player = *i;
- v3f playerpos = player->getPosition();
/*
Handle non-local players
DesiredRect = rect;
recalculateAbsolutePosition(false);
- v2s32 size = rect.getSize();
-
v2s32 topleft = v2s32(10, 10);
/*
DesiredRect = rect;
recalculateAbsolutePosition(false);
- v2s32 size = rect.getSize();
-
v2s32 topleft = v2s32(10+80, 10+70);
/*
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
- v2s32 size_client = size - v2s32(40, 0);
/*
Add stuff
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
- v2s32 size_client = size - v2s32(40, 0);
int volume=(int)(g_settings->getFloat("sound_volume")*100);
/*
Add stuff
continue;
// Calculate relative position in block
- v3s16 relpos = pos - blockpos_last * MAP_BLOCKSIZE;
+ //v3s16 relpos = pos - blockpos_last * MAP_BLOCKSIZE;
// Get node straight from the block
- MapNode n = block->getNode(relpos);
+ //MapNode n = block->getNode(relpos);
u8 oldlight = j->second;
*/
v3s16 toppos = p + v3s16(0,1,0);
- v3s16 bottompos = p + v3s16(0,-1,0);
+ //v3s16 bottompos = p + v3s16(0,-1,0);
bool node_under_sunlight = true;
std::set<v3s16> light_sources;
// Get the brightest neighbour node and propagate light from it
v3s16 n2p = getBrightestNeighbour(bank, p);
try{
- MapNode n2 = getNode(n2p);
+ //MapNode n2 = getNode(n2p);
lightNeighbors(bank, n2p, modified_blocks);
}
catch(InvalidPositionException &e)
sector = new ServerMapSector(this, p2d, m_gamedef);
// Sector position on map in nodes
- v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
+ //v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
/*
Insert to container
v3s16 blockpos = data->blockpos_requested;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
- v3s16 blockpos_full_min = blockpos_min - v3s16(1,1,1);
- v3s16 blockpos_full_max = blockpos_max + v3s16(1,1,1);
// Area of central chunk
node_min = blockpos_min*MAP_BLOCKSIZE;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
- v3s16 blockpos_full_min = blockpos_min - v3s16(1, 1, 1);
- v3s16 blockpos_full_max = blockpos_max + v3s16(1, 1, 1);
node_min = blockpos_min * MAP_BLOCKSIZE;
node_max = (blockpos_max + v3s16(1, 1, 1)) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
full_node_min = (blockpos_min - 1) * MAP_BLOCKSIZE;
class IGameDef;
struct CollisionInfo;
class PlayerSAO;
-class HudElement;
+struct HudElement;
class Player
{
time_of_day = 24000.0 * lua_tonumber(L, 3);
time_of_day %= 24000;
u32 dnr = time_to_daynight_ratio(time_of_day, true);
- MapNode n = env->getMap().getNodeNoEx(pos);
try{
MapNode n = env->getMap().getNode(pos);
INodeDefManager *ndef = env->getGameDef()->ndef();
ServerEnvironment *env = o->m_env;
if(env == NULL) return 0;
// pos
- v3f pos = checkFloatPos(L, 2);
+ //v3f pos = checkFloatPos(L, 2);
// item
ItemStack item = read_item(L, 3);
if(item.empty() || !item.isKnown(get_server(L)->idef()))
video::SColor readARGB8(lua_State *L, int index)
{
- video::SColor color;
+ video::SColor color(0);
luaL_checktype(L, index, LUA_TTABLE);
lua_getfield(L, index, "a");
if(lua_isnumber(L, -1))
std::string str_decompressed = os_decompressed.str();
UTEST(str_decompressed.size() == data_in.size(), "Output size not"
" equal (output: %u, input: %u)",
- str_decompressed.size(), data_in.size());
+ (unsigned int)str_decompressed.size(), (unsigned int)data_in.size());
for(u32 i=0; i<size && i<str_decompressed.size(); i++){
UTEST(str_decompressed[i] == data_in[i],
"index out[%i]=%i differs from in[%i]=%i",
// 0-1ms on moderate area
TimeTaker timer("clearFlag", &clearflag_time);
- v3s16 s = m_area.getExtent();
+ //v3s16 s = m_area.getExtent();
/*dstream<<"clearFlag clearing area of size "
<<""<<s.X<<"x"<<s.Y<<"x"<<s.Z<<""