mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
last modification on nodes movement
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0bd24f0e21
commit
b7e1cf73c6
@ -187,10 +187,8 @@ void Node::calculateForces(const double *map,int width,int height,int W,int H,fl
|
||||
|
||||
// now time filter:
|
||||
|
||||
float f = (_type == GraphWidget::ELASTIC_NODE_TYPE_OWN)?10.0f:1.0f ;
|
||||
|
||||
_speedx += xforce / (MASS_FACTOR * f);
|
||||
_speedy += yforce / (MASS_FACTOR * f);
|
||||
_speedx += xforce / MASS_FACTOR;
|
||||
_speedy += yforce / MASS_FACTOR;
|
||||
|
||||
if(_speedx > 10) _speedx = 10.0f ;
|
||||
if(_speedy > 10) _speedy = 10.0f ;
|
||||
@ -205,8 +203,8 @@ void Node::calculateForces(const double *map,int width,int height,int W,int H,fl
|
||||
|
||||
bool Node::advance()
|
||||
{
|
||||
// if(_type == GraphWidget::ELASTIC_NODE_TYPE_OWN)
|
||||
// return false;
|
||||
if(_type == GraphWidget::ELASTIC_NODE_TYPE_OWN)
|
||||
return false;
|
||||
|
||||
float f = std::max(fabs(newPos.x() - pos().x()), fabs(newPos.y() - pos().y())) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user