Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)
[oweals/minetest.git] / src / collision.cpp
index 6d22c079889546319e8db083160e799b400d239f..c0891c15280bcd07780d8c4df811fc1d18a193a0 100644 (file)
@@ -22,11 +22,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "map.h"
 #include "nodedef.h"
 #include "gamedef.h"
-#include "log.h"
-#include "environment.h"
+#ifndef SERVER
+#include "clientenvironment.h"
+#endif
+#include "serverenvironment.h"
 #include "serverobject.h"
-#include <vector>
-#include <set>
 #include "util/timetaker.h"
 #include "profiler.h"
 
@@ -367,7 +367,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
 #endif
                {
                        ServerEnvironment *s_env = dynamic_cast<ServerEnvironment*>(env);
-                       if (s_env != 0) {
+                       if (s_env != NULL) {
                                f32 distance = speed_f->getLength();
                                std::vector<u16> s_objects;
                                s_env->getObjectsInsideRadius(s_objects, *pos_f, distance * 1.5);