--- trunk/OOPSE/libmdtools/ZConstraint.cpp 2004/04/28 22:34:02 1140 +++ trunk/OOPSE/libmdtools/ZConstraint.cpp 2004/04/28 23:09:32 1141 @@ -356,6 +356,8 @@ template ZConstraint::ZConstraint(SimIn cantPos.push_back(COM[whichDirection]); } + if(usingSMD) + prevCantPos = cantPos; #endif @@ -470,6 +472,10 @@ template void ZConstraint::update(){ if(usingSMD) cantPos.push_back(COM[whichDirection]); } + + if(usingSMD) + prevCantPos = cantPos; + // forcePolicy->update(); } @@ -974,6 +980,9 @@ template bool ZConstraint::checkZConsSt if (diff <= zconsTol && states[i] == zcsMoving){ states[i] = zcsFixed; changed_local = 1; + + if(usingSMD) + prevCantPos = cantPos; if (hasZConsGap) endFixTime[i] = info->getTime() + zconsFixTime; @@ -982,6 +991,9 @@ template bool ZConstraint::checkZConsSt states[i] = zcsMoving; changed_local = 1; + if(usingSMD) + cantPos = prevCantPos; + if (hasZConsGap) endFixTime[i] = INFINITE_TIME; }