forked from oerkki/voxelands
fix more warnings, mostly unused variables
This commit is contained in:
parent
b3b7034447
commit
1fdac8b32b
|
@ -35,7 +35,7 @@
|
|||
#include <IAnimatedMesh.h>
|
||||
|
||||
class LocalPlayer;
|
||||
class MapDrawControl;
|
||||
struct MapDrawControl;
|
||||
class ExtrudedSpriteSceneNode;
|
||||
class Client;
|
||||
|
||||
|
|
|
@ -357,7 +357,6 @@ MobSAO::MobSAO(ServerEnvironment *env, u16 id, v3f pos, content_t type):
|
|||
m_oldpos(0,0,0),
|
||||
m_initial_pos(pos),
|
||||
m_yaw(0),
|
||||
m_touching_ground(false),
|
||||
m_falling(false),
|
||||
m_next_pos_exists(false),
|
||||
m_age(0),
|
||||
|
@ -387,7 +386,6 @@ MobSAO::MobSAO(ServerEnvironment *env, u16 id, v3f pos, v3f speed, content_t typ
|
|||
m_oldpos(0,0,0),
|
||||
m_initial_pos(pos),
|
||||
m_yaw(0),
|
||||
m_touching_ground(false),
|
||||
m_falling(false),
|
||||
m_next_pos_exists(false),
|
||||
m_age(0),
|
||||
|
@ -662,7 +660,6 @@ void MobSAO::step(float dtime, bool send_recommended)
|
|||
if (m_next_pos_exists) {
|
||||
v3f pos_f = m_base_position;
|
||||
v3f next_pos_f = intToFloat(m_next_pos_i, BS);
|
||||
v3f v = next_pos_f - pos_f;
|
||||
v3f diff = next_pos_f - pos_f;
|
||||
v3f dir = diff;
|
||||
dir.normalize();
|
||||
|
@ -1203,7 +1200,6 @@ void MobSAO::stepMotionThrown(float dtime)
|
|||
v3s16 pos = pos_i+v3s16(0,1,0);
|
||||
m_env->getMap().addNodeWithEvent(pos,MapNode(m.contact_place_node));
|
||||
}else if (m.contact_drop_item != CONTENT_IGNORE) {
|
||||
v3f pos = intToFloat(pos_i+v3s16(0,1,0),BS);
|
||||
InventoryItem *i = InventoryItem::create(m.contact_drop_item,1);
|
||||
if (i) {
|
||||
ServerActiveObject *obj = i->createSAO(m_env,0,m_base_position);
|
||||
|
|
|
@ -101,7 +101,6 @@ private:
|
|||
v3f m_oldpos;
|
||||
v3f m_initial_pos;
|
||||
float m_yaw;
|
||||
bool m_touching_ground;
|
||||
bool m_falling;
|
||||
bool m_next_pos_exists;
|
||||
v3s16 m_next_pos_i;
|
||||
|
|
|
@ -273,7 +273,6 @@ void ActiveBlockList::update(std::list<v3s16> &active_positions,
|
|||
ServerEnvironment::ServerEnvironment(ServerMap *map, Server *server):
|
||||
m_map(map),
|
||||
m_server(server),
|
||||
m_random_spawn_timer(3),
|
||||
m_send_recommended_timer(0),
|
||||
m_game_time(0),
|
||||
m_game_time_fraction_counter(0)
|
||||
|
@ -575,7 +574,6 @@ void ServerEnvironment::clearAllObjects()
|
|||
for (std::map<u16, ServerActiveObject*>::iterator i = m_active_objects.begin(); i != m_active_objects.end(); i++) {
|
||||
ServerActiveObject* obj = i->second;
|
||||
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);
|
||||
|
@ -3966,8 +3964,6 @@ void ClientEnvironment::step(float dtime)
|
|||
*/
|
||||
|
||||
{
|
||||
v3f lplayerpos = lplayer->getPosition();
|
||||
|
||||
// Apply physics
|
||||
if (lplayer->control.free == false && is_climbing == false) {
|
||||
// Gravity
|
||||
|
|
|
@ -372,7 +372,6 @@ private:
|
|||
// the env events for sending to clients
|
||||
Queue<EnvEvent> m_env_events;
|
||||
// Some timers
|
||||
float m_random_spawn_timer; // used for experimental code
|
||||
float m_send_recommended_timer;
|
||||
IntervalLimiter m_object_management_interval;
|
||||
// List of active blocks
|
||||
|
|
|
@ -307,8 +307,6 @@ public:
|
|||
s32 mouse_wheel;
|
||||
|
||||
private:
|
||||
IrrlichtDevice *m_device;
|
||||
|
||||
// The current state of keys
|
||||
KeyList keyIsDown;
|
||||
// Whether a key has been pressed or not
|
||||
|
|
11
src/map.cpp
11
src/map.cpp
|
@ -297,9 +297,6 @@ void Map::unspreadLight(enum LightBank bank,
|
|||
if (block->isDummy())
|
||||
continue;
|
||||
|
||||
// Calculate relative position in block
|
||||
v3s16 relpos = pos - blockpos_last * MAP_BLOCKSIZE;
|
||||
|
||||
u8 oldlight = j.getNode()->getValue();
|
||||
|
||||
// Loop through 6 neighbors
|
||||
|
@ -793,7 +790,6 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
|
|||
*/
|
||||
|
||||
v3s16 toppos = p + v3s16(0,1,0);
|
||||
v3s16 bottompos = p + v3s16(0,-1,0);
|
||||
|
||||
bool node_under_sunlight = true;
|
||||
core::map<v3s16, bool> light_sources;
|
||||
|
@ -1050,8 +1046,7 @@ void Map::removeNodeAndUpdate(v3s16 p,
|
|||
|
||||
// Get the brightest neighbour node and propagate light from it
|
||||
v3s16 n2p = getBrightestNeighbour(bank, p);
|
||||
bool pos_ok;
|
||||
MapNode n2 = getNodeNoEx(n2p,&pos_ok);
|
||||
bool pos_ok = isValidPosition(n2p);
|
||||
if (pos_ok)
|
||||
lightNeighbors(bank, n2p, modified_blocks);
|
||||
}
|
||||
|
@ -2168,9 +2163,6 @@ ServerMapSector * ServerMap::createSector(v2s16 p2d)
|
|||
|
||||
sector = new ServerMapSector(this, p2d);
|
||||
|
||||
// Sector position on map in nodes
|
||||
v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
|
||||
|
||||
/*
|
||||
Insert to container
|
||||
*/
|
||||
|
@ -2200,7 +2192,6 @@ MapBlock * ServerMap::generateBlock(
|
|||
//MapBlock *block = original_dummy;
|
||||
|
||||
v2s16 p2d(p.X, p.Z);
|
||||
v2s16 p2d_nodes = p2d * MAP_BLOCKSIZE;
|
||||
|
||||
/*
|
||||
Do not generate over-limit
|
||||
|
|
|
@ -1333,8 +1333,6 @@ void make_block(BlockMakeData *data)
|
|||
v3s16 blockpos = data->blockpos;
|
||||
|
||||
ManualMapVoxelManipulator &vmanip = *(data->vmanip);
|
||||
v3s16 blockpos_min = blockpos - v3s16(1,1,1);
|
||||
v3s16 blockpos_max = blockpos + v3s16(1,1,1);
|
||||
// Area of center block
|
||||
v3s16 node_min = blockpos*MAP_BLOCKSIZE;
|
||||
v3s16 node_max = (blockpos+v3s16(1,1,1))*MAP_BLOCKSIZE-v3s16(1,1,1);
|
||||
|
|
|
@ -971,8 +971,7 @@ Server::Server(
|
|||
m_mapsavedir(mapsavedir),
|
||||
m_configpath(configpath),
|
||||
m_shutdown_requested(false),
|
||||
m_ignore_map_edit_events(false),
|
||||
m_ignore_map_edit_events_peer_id(0)
|
||||
m_ignore_map_edit_events(false)
|
||||
{
|
||||
m_liquid_transform_timer = 0.0;
|
||||
m_print_info_timer = 0.0;
|
||||
|
@ -6000,9 +5999,6 @@ v3f findSpawnPos(ServerMap &map)
|
|||
// We're going to try to throw the player to this position
|
||||
nodepos = v2s16(-range + (myrand()%(range*2)),
|
||||
-range + (myrand()%(range*2)));
|
||||
v2s16 sectorpos = getNodeSectorPos(nodepos);
|
||||
// Get sector (NOTE: Don't get because it's slow)
|
||||
//m_env.getMap().emergeSector(sectorpos);
|
||||
// Get ground height at point (fallbacks to heightmap function)
|
||||
groundheight = map.findGroundLevel(nodepos);
|
||||
// Don't go underwater
|
||||
|
|
|
@ -716,14 +716,6 @@ private:
|
|||
This is behind m_env_mutex
|
||||
*/
|
||||
bool m_ignore_map_edit_events;
|
||||
/*
|
||||
If set to !=0, the incoming MapEditEvents are modified to have
|
||||
this peed id as the disabled recipient
|
||||
This is behind m_env_mutex
|
||||
*/
|
||||
u16 m_ignore_map_edit_events_peer_id;
|
||||
|
||||
Profiler *m_profiler;
|
||||
|
||||
friend class EmergeThread;
|
||||
friend class RemoteClient;
|
||||
|
|
|
@ -44,9 +44,7 @@
|
|||
*/
|
||||
|
||||
TextureSource::TextureSource(IrrlichtDevice *device):
|
||||
m_device(device),
|
||||
m_main_atlas_image(NULL),
|
||||
m_main_atlas_texture(NULL)
|
||||
m_device(device)
|
||||
{
|
||||
assert(m_device);
|
||||
|
||||
|
@ -1711,7 +1709,7 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
|
|||
errorstream<<"generateImagePart(): EVDF_RENDER_TO_TARGET not supported."<<std::endl;
|
||||
warned = true;
|
||||
}
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
core::dimension2d<u32> dim = baseimg->getDimension();
|
||||
|
@ -1723,7 +1721,7 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
|
|||
if (rtt == NULL) {
|
||||
errorstream<<"generateImagePart(): addRenderTargetTexture"
|
||||
" returned NULL."<<std::endl;
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the gui
|
||||
|
|
|
@ -257,10 +257,6 @@ private:
|
|||
// The two former containers are behind this mutex
|
||||
JMutex m_atlaspointer_cache_mutex;
|
||||
|
||||
// Main texture atlas. This is filled at startup and is then not touched.
|
||||
video::IImage *m_main_atlas_image;
|
||||
video::ITexture *m_main_atlas_texture;
|
||||
|
||||
// Queued texture fetches (to be processed by the main thread)
|
||||
RequestQueue<std::string, u32, u8, u8> m_get_texture_queue;
|
||||
};
|
||||
|
|
|
@ -268,8 +268,6 @@ void VoxelManipulator::clearFlag(u8 flags)
|
|||
// 0-1ms on moderate area
|
||||
TimeTaker timer("clearFlag", &clearflag_time);
|
||||
|
||||
v3s16 s = m_area.getExtent();
|
||||
|
||||
/*dstream<<"clearFlag clearing area of size "
|
||||
<<""<<s.X<<"x"<<s.Y<<"x"<<s.Z<<""
|
||||
<<std::endl;*/
|
||||
|
|
Loading…
Reference in New Issue