mirror of
https://github.com/minetest/minetest.git
synced 2024-08-20 13:34:17 +02:00
Fix nearly all warnings
This commit is contained in:
parent
55a97f4605
commit
d00e8bd31a
@ -298,7 +298,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
||||
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);
|
||||
|
@ -31,8 +31,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
infostream << "EmergeThread: " x << std::endl; }
|
||||
|
||||
class Mapgen;
|
||||
class MapgenParams;
|
||||
class MapgenFactory;
|
||||
struct MapgenParams;
|
||||
struct MapgenFactory;
|
||||
class Biome;
|
||||
class BiomeDefManager;
|
||||
class EmergeThread;
|
||||
|
@ -910,7 +910,6 @@ void ServerEnvironment::clearAllObjects()
|
||||
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);
|
||||
@ -1031,8 +1030,6 @@ void ServerEnvironment::step(float dtime)
|
||||
// Ignore disconnected players
|
||||
if(player->peer_id == 0)
|
||||
continue;
|
||||
|
||||
v3f playerpos = player->getPosition();
|
||||
|
||||
// Move
|
||||
player->move(dtime, *m_map, 100*BS);
|
||||
@ -2072,8 +2069,6 @@ void ClientEnvironment::step(float dtime)
|
||||
*/
|
||||
|
||||
{
|
||||
v3f lplayerpos = lplayer->getPosition();
|
||||
|
||||
// Apply physics
|
||||
if(free_move == false && is_climbing == false)
|
||||
{
|
||||
@ -2197,7 +2192,6 @@ void ClientEnvironment::step(float dtime)
|
||||
i != m_players.end(); ++i)
|
||||
{
|
||||
Player *player = *i;
|
||||
v3f playerpos = player->getPosition();
|
||||
|
||||
/*
|
||||
Handle non-local players
|
||||
|
@ -165,8 +165,6 @@ void GUIConfigureWorld::regenerateGui(v2u32 screensize)
|
||||
DesiredRect = rect;
|
||||
recalculateAbsolutePosition(false);
|
||||
|
||||
v2s32 size = rect.getSize();
|
||||
|
||||
v2s32 topleft = v2s32(10, 10);
|
||||
|
||||
/*
|
||||
|
@ -112,8 +112,6 @@ void GUICreateWorld::regenerateGui(v2u32 screensize)
|
||||
DesiredRect = rect;
|
||||
recalculateAbsolutePosition(false);
|
||||
|
||||
v2s32 size = rect.getSize();
|
||||
|
||||
v2s32 topleft = v2s32(10+80, 10+70);
|
||||
|
||||
/*
|
||||
|
@ -95,7 +95,6 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
|
||||
|
||||
v2s32 size = rect.getSize();
|
||||
v2s32 topleft_client(40, 0);
|
||||
v2s32 size_client = size - v2s32(40, 0);
|
||||
|
||||
/*
|
||||
Add stuff
|
||||
|
@ -96,7 +96,6 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
|
||||
|
||||
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
|
||||
|
10
src/map.cpp
10
src/map.cpp
@ -288,10 +288,10 @@ void Map::unspreadLight(enum LightBank bank,
|
||||
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;
|
||||
|
||||
@ -937,7 +937,7 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
|
||||
*/
|
||||
|
||||
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;
|
||||
@ -1246,7 +1246,7 @@ void Map::removeNodeAndUpdate(v3s16 p,
|
||||
// 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)
|
||||
@ -2831,7 +2831,7 @@ ServerMapSector * ServerMap::createSector(v2s16 p2d)
|
||||
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
|
||||
|
@ -375,8 +375,6 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
|
||||
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;
|
||||
|
@ -152,8 +152,6 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
|
||||
|
||||
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;
|
||||
|
@ -87,7 +87,7 @@ class Map;
|
||||
class IGameDef;
|
||||
struct CollisionInfo;
|
||||
class PlayerSAO;
|
||||
class HudElement;
|
||||
struct HudElement;
|
||||
|
||||
class Player
|
||||
{
|
||||
|
@ -227,7 +227,6 @@ int EnvRef::l_get_node_light(lua_State *L)
|
||||
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();
|
||||
@ -373,7 +372,7 @@ int EnvRef::l_add_item(lua_State *L)
|
||||
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()))
|
||||
|
@ -147,7 +147,7 @@ v3s16 check_v3s16(lua_State *L, int index)
|
||||
|
||||
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))
|
||||
|
@ -464,7 +464,7 @@ struct TestCompress: public TestBase
|
||||
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",
|
||||
|
@ -264,7 +264,7 @@ void VoxelManipulator::clearFlag(u8 flags)
|
||||
// 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<<""
|
||||
|
Loading…
Reference in New Issue
Block a user