Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6678 in orxonox.OLD for branches/network/src/lib/coord/p_node.cc


Ignore:
Timestamp:
Jan 24, 2006, 10:22:33 PM (18 years ago)
Author:
patrick
Message:

network: sys better now, got less errors and removed the pnode link sync alg, replacing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/coord/p_node.cc

    r6674 r6678  
    10841084  this->setRelDir( Quaternion( Vector(f2, f3, f4), f1 ) );
    10851085
    1086   int n;
    1087   char * childName;
    1088 
    1089   PRINTF(0)("JKLO %d %d %d %d\n", data[__synchelp_read_i], data[__synchelp_read_i+1], data[__synchelp_read_i+2], data[__synchelp_read_i+3]);
    1090   SYNCHELP_READ_INT( n );
    1091   PRINTF(0)("read %s:n=%d\n", this->getName(), n);
    1092 
    1093   for (int i = 0; i<n; i++)
    1094   {
    1095     SYNCHELP_READ_STRINGM( childName );
    1096     PRINTF(0)("RCVD CHILD = %s\n", childName);
    1097     addChild( childName );
    1098     delete childName;
    1099     childName = NULL;
    1100   }
     1086//   int n;
     1087//   char * childName;
     1088//
     1089//   PRINTF(0)("JKLO %d %d %d %d\n", data[__synchelp_read_i], data[__synchelp_read_i+1], data[__synchelp_read_i+2], data[__synchelp_read_i+3]);
     1090//   SYNCHELP_READ_INT( n );
     1091//   PRINTF(0)("read %s:n=%d\n", this->getName(), n);
     1092//
     1093//   for (int i = 0; i<n; i++)
     1094//   {
     1095//     SYNCHELP_READ_STRINGM( childName );
     1096//     PRINTF(0)("RCVD CHILD = %s\n", childName);
     1097//     addChild( childName );
     1098//     delete childName;
     1099//     childName = NULL;
     1100//   }
    11011101
    11021102  return SYNCHELP_READ_N;
     
    11351135  SYNCHELP_WRITE_FLOAT( this->relDirection.v.z );
    11361136
    1137   int n = children.size();
    1138 
    1139   //check if camera is in children
    1140   for (std::list<PNode*>::const_iterator it = children.begin(); it!=children.end(); it++)
    1141   {
    1142     if ( (*it)->isA(CL_CAMERA) )
    1143       n--;
    1144   }
    1145   PRINTF(0)("write %s:n=%d\n", this->getName(), n);
    1146   SYNCHELP_WRITE_INT( n );
    1147   PRINTF(0)("ASDF %d %d %d %d\n", data[__synchelp_write_i-4], data[__synchelp_write_i-3], data[__synchelp_write_i-2], data[__synchelp_write_i-1]);
    1148 
    1149   for (std::list<PNode*>::const_iterator it = children.begin(); it!=children.end(); it++)
    1150   {
    1151     //dont add camera because there is only one camera attached to local player
    1152     if ( !(*it)->isA(CL_CAMERA) )
    1153     {
    1154       PRINTF(0)("SENDING CHILD: %s\n", (*it)->getName());
    1155       SYNCHELP_WRITE_STRING( (*it)->getName() );
    1156     }
    1157   }
     1137//   int n = children.size();
     1138//   //check if camera is in children
     1139//   for (std::list<PNode*>::const_iterator it = children.begin(); it!=children.end(); it++)
     1140//   {
     1141//     if ( (*it)->isA(CL_CAMERA) )
     1142//       n--;
     1143//   }
     1144//   PRINTF(0)("write %s:n=%d\n", this->getName(), n);
     1145//   SYNCHELP_WRITE_INT( n );
     1146//   PRINTF(0)("ASDF %d %d %d %d\n", data[__synchelp_write_i-4], data[__synchelp_write_i-3], data[__synchelp_write_i-2], data[__synchelp_write_i-1]);
     1147//
     1148//
     1149//   for (std::list<PNode*>::const_iterator it = children.begin(); it!=children.end(); it++)
     1150//   {
     1151//     //dont add camera because there is only one camera attached to local player
     1152//     if ( !(*it)->isA(CL_CAMERA) )
     1153//     {
     1154//       PRINTF(0)("SENDING CHILD: %s\n", (*it)->getName());
     1155//       SYNCHELP_WRITE_STRING( (*it)->getName() );
     1156//     }
     1157//   }
    11581158
    11591159  return SYNCHELP_WRITE_N;
Note: See TracChangeset for help on using the changeset viewer.