Changeset 6959 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Feb 1, 2006, 4:40:34 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r6873 r6959 1253 1253 SYNCHELP_WRITE_BEGIN(); 1254 1254 1255 if ( this->getHostID()!= this->getOwner() )1255 if ( this->getHostID()!=0 && this->getHostID()!=this->getOwner() ) 1256 1256 { 1257 1257 return SYNCHELP_WRITE_N; … … 1259 1259 1260 1260 byte flags = 0; 1261 if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS ||1262 fabs( coory - relCoordinate.y ) > __OFFSET_POS ||1263 fabs( coorz - relCoordinate.z ) > __OFFSET_POS )1261 if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS*0.05*this->velocity.len() || 1262 fabs( coory - relCoordinate.y ) > __OFFSET_POS*0.05*this->velocity.len() || 1263 fabs( coorz - relCoordinate.z ) > __OFFSET_POS*0.05*this->velocity.len() ) 1264 1264 flags |= __FLAG_COOR; 1265 1265 … … 1272 1272 1273 1273 SYNCHELP_WRITE_BYTE( flags, NWT_PN_FLAGS ); 1274 //PRINTF(0)("FLAGS = %d\n", flags);1274 PRINTF(0)("FLAGS = %d\n", flags); 1275 1275 1276 1276 if ( flags & __FLAG_COOR ) 1277 1277 { 1278 1278 1279 //PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);1279 PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z); 1280 1280 1281 1281 SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_SCOORX ); … … 1291 1291 { 1292 1292 1293 //PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);1293 PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z); 1294 1294 1295 1295 SYNCHELP_WRITE_FLOAT( this->absDirection.w, NWT_PN_SROTV ); … … 1309 1309 bool PNode::needsReadSync( ) 1310 1310 { 1311 if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS ||1312 fabs( coory - relCoordinate.y ) > __OFFSET_POS ||1313 fabs( coorz - relCoordinate.z ) > __OFFSET_POS )1311 if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS*0.05*this->velocity.len() || 1312 fabs( coory - relCoordinate.y ) > __OFFSET_POS*0.05*this->velocity.len() || 1313 fabs( coorz - relCoordinate.z ) > __OFFSET_POS*0.05*this->velocity.len() ) 1314 1314 return true; 1315 1315
Note: See TracChangeset
for help on using the changeset viewer.