]> git.tdb.fi Git - netvis.git/blobdiff - source/host.cpp
Keep the local network in the center
[netvis.git] / source / host.cpp
index c18f117ba11d3dc360328ad0eb539c3d4e8939ed..fca3a304e545d29eefafd8201958020c92b6470e 100644 (file)
@@ -100,8 +100,9 @@ void Host::tick(const Msp::Time::TimeDelta &td)
                return;
 
        const map<unsigned, Host *> &hosts = netvis.get_hosts();
-       float fx = -pos.x*0.1;
-       float fy = -pos.y*0.1;
+       float center_force = (local ? 0.5 : 0.1);
+       float fx = -pos.x*center_force;
+       float fy = -pos.y*center_force;
        for(map<unsigned, Host *>::const_iterator i=hosts.begin(); i!=hosts.end(); ++i)
        {
                if(i->second!=this)