diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-04 16:58:04 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-04 17:02:36 +0100 |
commit | 06f328207fa0a3e606992d3569b061b335eb0f48 (patch) | |
tree | 324ce16ead2a4080882bd23077d93e446811add5 /src/localplayer.cpp | |
parent | 2066655aae2022384fc12a10c04dccfd2996f0ac (diff) | |
download | minetest-06f328207fa0a3e606992d3569b061b335eb0f48.tar.gz minetest-06f328207fa0a3e606992d3569b061b335eb0f48.tar.bz2 minetest-06f328207fa0a3e606992d3569b061b335eb0f48.zip |
ABMHandler and player_collisions use sequential read/write. Switch from std::list to std::vector
* Also remove dead code Map::unloadUnusedData which is dead since a long time
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 69d4ec7ef..cb183947a 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -67,7 +67,7 @@ LocalPlayer::~LocalPlayer() } void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, - std::list<CollisionInfo> *collision_info) + std::vector<CollisionInfo> *collision_info) { Map *map = &env->getMap(); INodeDefManager *nodemgr = m_gamedef->ndef(); @@ -323,9 +323,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, */ bool bouncy_jump = false; // Dont report if flying - if(collision_info && !(g_settings->getBool("free_move") && fly_allowed)) - { - for(size_t i=0; i<result.collisions.size(); i++){ + if(collision_info && !(g_settings->getBool("free_move") && fly_allowed)) { + for(size_t i=0; i<result.collisions.size(); i++) { const CollisionInfo &info = result.collisions[i]; collision_info->push_back(info); if(info.new_speed.Y - info.old_speed.Y > 0.1*BS && |