Fix and tune player movement checks (make them very loose)
authorPerttu Ahola <celeron55@gmail.com>
Sun, 27 Nov 2011 03:08:44 +0000 (05:08 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:55 +0000 (19:13 +0200)
src/server.cpp

index 66cc099e3d612bad8f0144c15d3da95055be4daf..1d0b747bf9099ed110f00eff4c0844a78f362a15 100644 (file)
@@ -1320,8 +1320,8 @@ void Server::AsyncRunStep()
                float player_max_speed = BS * 20; // Fast speed
                float player_max_speed_up = BS * 20;
                
-               player_max_speed *= 1.7; // Tolerance
-               player_max_speed_up *= 1.7;
+               player_max_speed *= 2.5; // Tolerance
+               player_max_speed_up *= 2.5;
 
                for(core::map<u16, RemoteClient*>::Iterator
                        i = m_clients.getIterator();
@@ -2535,9 +2535,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                /*
                        Check that target is reasonably close
                */
+               if(action != 2) // action 2 has always position (0,0,0)
                {
                        v3f np_f = intToFloat(p_under, BS);
-                       float max_d = BS * 8; // Just some large enough value
+                       float max_d = BS * 10; // Just some large enough value
                        float d = srp->m_last_good_position.getDistanceFrom(np_f);
                        if(d > max_d){
                                actionstream<<"Player "<<player->getName()