Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6682 in orxonox.OLD


Ignore:
Timestamp:
Jan 24, 2006, 11:15:46 PM (18 years ago)
Author:
patrick
Message:

network: less parenting algoritmics

Location:
branches/network/src
Files:
3 edited

Legend:

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

    r6678 r6682  
    10521052  SYNCHELP_READ_FKT( BaseObject::writeState );
    10531053
    1054   char * parentName = NULL;
    1055   SYNCHELP_READ_STRINGM( parentName );
    1056 
    1057   if ( strcmp(parentName, "")==0 )
    1058   {
    1059     setParent( (char*)NULL );
    1060   }
    1061   else
    1062   {
    1063     setParent( parentName );
    1064   }
    1065 
    1066   delete[] parentName;
     1054//   char * parentName = NULL;
     1055//   SYNCHELP_READ_STRINGM( parentName );
     1056//
     1057//   if ( strcmp(parentName, "")==0 )
     1058//   {
     1059//     setParent( (char*)NULL );
     1060//   }
     1061//   else
     1062//   {
     1063//     setParent( parentName );
     1064//   }
     1065//
     1066//  delete[] parentName;
    10671067
    10681068  int parentMode;
     
    11151115  SYNCHELP_WRITE_FKT( BaseObject::readState );
    11161116
    1117   if ( this->parent )
    1118   {
    1119     SYNCHELP_WRITE_STRING( parent->getName() );
    1120   }
    1121   else
    1122   {
    1123     SYNCHELP_WRITE_STRING( "" );
    1124   }
     1117//   if ( this->parent )
     1118//   {
     1119//     SYNCHELP_WRITE_STRING( parent->getName() );
     1120//   }
     1121//   else
     1122//   {
     1123//     SYNCHELP_WRITE_STRING( "" );
     1124//   }
    11251125
    11261126  SYNCHELP_WRITE_INT( this->parentMode );
  • branches/network/src/util/state.cc

    r6498 r6682  
    4141Player* State::player = NULL;
    4242
     43bool State::bOnline = false;
    4344
    4445/**
  • branches/network/src/util/state.h

    r6498 r6682  
    7373
    7474
     75  ///////////////
     76  /// NETWORK ///
     77  ///////////////
     78  /** sets the online stat (multiplayer network) @param bOnline is true if node is online */
     79  static inline void setOnline(bool bOnline) { State::bOnline = bOnline; }
     80  /** @returns true if this node is online (multiplayer network game) */
     81  static bool isOnline() { return State::bOnline; }
     82
    7583
    7684 private:
     
    8795  static unsigned int           resX;              //!< The X Resolution of the screen.
    8896  static unsigned int           resY;              //!< The Y Resolution of the screen.
     97
     98  static bool                   bOnline;           //!< Is true if this node is in multiplayer mode (via network)
     99
    89100  };
    90101
Note: See TracChangeset for help on using the changeset viewer.