]> git.lizzy.rs Git - minetest.git/blobdiff - src/player.cpp
added dedicated server build without irrlicht
[minetest.git] / src / player.cpp
index 5e838bf7acf52ca068f89add3370b2ce13a6e5ff..2c04f1f7637a7b2fe80b7c166f4fa6d471b940c9 100644 (file)
@@ -72,12 +72,12 @@ void Player::move(f32 dtime, Map &map)
                if(in_water)
                {
                        v3s16 pp = floatToInt(position + v3f(0,0,0));
-                       in_water = material_liquid(map.getNode(pp).d);
+                       in_water = content_liquid(map.getNode(pp).d);
                }
                else
                {
                        v3s16 pp = floatToInt(position + v3f(0,BS/2,0));
-                       in_water = material_liquid(map.getNode(pp).d);
+                       in_water = content_liquid(map.getNode(pp).d);
                }
        }
        catch(InvalidPositionException &e)
@@ -122,7 +122,7 @@ void Player::move(f32 dtime, Map &map)
                for(s16 z = oldpos_i.Z - 1; z <= oldpos_i.Z + 1; z++){
                        for(s16 x = oldpos_i.X - 1; x <= oldpos_i.X + 1; x++){
                                try{
-                                       if(material_walkable(map.getNode(v3s16(x,y,z)).d) == false){
+                                       if(content_walkable(map.getNode(v3s16(x,y,z)).d) == false){
                                                continue;
                                        }
                                }
@@ -228,6 +228,8 @@ void Player::accelerate(v3f target_speed, f32 max_increase)
        RemotePlayer
 */
 
+#ifndef SERVER
+
 RemotePlayer::RemotePlayer(
                scene::ISceneNode* parent,
                IrrlichtDevice *device,
@@ -236,7 +238,7 @@ RemotePlayer::RemotePlayer(
        m_text(NULL)
 {
        m_box = core::aabbox3d<f32>(-BS/2,0,-BS/2,BS/2,BS*2,BS/2);
-       
+
        if(parent != NULL && device != NULL)
        {
                // ISceneNode stores a member called SceneManager
@@ -320,6 +322,9 @@ void RemotePlayer::updateName(const char *name)
        }
 }
 
+#endif
+
+#ifndef SERVER
 /*
        LocalPlayer
 */
@@ -399,5 +404,5 @@ void LocalPlayer::applyControl(float dtime)
        // Accelerate to target speed with maximum increment
        accelerate(speed, inc);
 }
-
+#endif