Created
November 1, 2012 19:57
-
-
Save xyzz/3996063 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/environment.cpp b/src/environment.cpp | |
index 3ba0a21..abb3cbd 100644 | |
--- a/src/environment.cpp | |
+++ b/src/environment.cpp | |
@@ -992,7 +992,20 @@ void ServerEnvironment::step(float dtime) | |
floatToInt(player->getPosition(), BS)); | |
players_blockpos.push_back(blockpos); | |
} | |
- | |
+ | |
+ for(core::map<u16, ServerActiveObject*>::Iterator | |
+ i = m_active_objects.getIterator(); | |
+ i.atEnd()==false; i++) | |
+ { | |
+ ServerActiveObject* obj = i.getNode()->getValue(); | |
+ if(obj->getType() == ACTIVEOBJECT_TYPE_PLAYER) | |
+ continue; | |
+ v3s16 blockpos = getNodeBlockPos( | |
+ floatToInt(obj->getBasePosition(), BS)); | |
+ players_blockpos.push_back(blockpos); | |
+ std::cerr << "added" << std::endl; | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment