diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-08 00:47:14 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-08 00:47:14 +0300 |
commit | 4b54b291ae2ba5a5f214cadad74f0bed29376f84 (patch) | |
tree | f386ca435350867508333d95f3e9f5537fbd28a1 /src/server.cpp | |
parent | 2dba606e1217ffb236e19aa38157a945e919d76b (diff) | |
download | minetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.tar.gz minetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.tar.bz2 minetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.zip |
Some progress on transitioning from MapBlockObject to ActiveObject.
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index d25c4a9d6..20a6a21c3 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1222,7 +1222,7 @@ void Server::AsyncRunStep() //u16 peer_id = i.getNode()->getKey(); RemoteClient *client = i.getNode()->getValue(); Player *player = m_env.getPlayer(client->peer_id); - std::cout<<player->getName()<<" "; + std::cout<<player->getName()<<"\t"; client->PrintInfo(std::cout); } } @@ -1235,6 +1235,8 @@ void Server::AsyncRunStep() Check added and deleted active objects */ { + //dstream<<"Server: Checking added and deleted active objects"<<std::endl; + JMutexAutoLock envlock(m_env_mutex); JMutexAutoLock conlock(m_con_mutex); @@ -1248,7 +1250,11 @@ void Server::AsyncRunStep() RemoteClient *client = i.getNode()->getValue(); Player *player = m_env.getPlayer(client->peer_id); if(player==NULL) + { + dstream<<"WARNING: "<<__FUNCTION_NAME<<": Client "<<client->peer_id + <<" has no associated player"<<std::endl; continue; + } v3s16 pos = floatToInt(player->getPosition(), BS); core::map<u16, bool> removed_objects; @@ -1260,7 +1266,10 @@ void Server::AsyncRunStep() // Ignore if nothing happened if(removed_objects.size() == 0 && added_objects.size() == 0) + { + //dstream<<"INFO: active objects: none changed"<<std::endl; continue; + } std::string data_buffer; |