Changeset 3528 in orxonox.OLD for orxonox/trunk/src/track_manager.cc
- Timestamp:
- Mar 13, 2005, 9:09:25 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/track_manager.cc
r3527 r3528 19 19 #include "p_node.h" 20 20 21 #include "track_node.h" 22 21 23 #include <stdarg.h> 22 #include "p_node.h"23 24 24 25 using namespace std; … … 206 207 { 207 208 this->setClassName ("TrackManager"); 209 210 singletonRef = this; 208 211 209 212 PRINTF(3)("Initializing the TrackManager\n"); … … 214 217 this->maxTime = 0; 215 218 this->trackElemCount = 1; 216 this->bindSlave = NULL;219 this->bindSlave = TrackNode::getInstance(); 217 220 } 218 221 … … 242 245 TrackManager* TrackManager::getInstance(void) 243 246 { 244 if (TrackManager::singletonRef) 245 return TrackManager::singletonRef; 246 else 247 return TrackManager::singletonRef = new TrackManager(); 247 if (!singletonRef) 248 singletonRef = new TrackManager(); 249 return singletonRef; 248 250 } 249 251 … … 694 696 void TrackManager::setBindSlave(PNode* bindSlave) 695 697 { 696 if ( !this->bindSlave)698 if (this->bindSlave == TrackNode::getInstance() || bindSlave == TrackNode::getInstance()) 697 699 this->bindSlave = bindSlave; 700 else 701 PRINTF(2)("Already a Bindslave set that is not the TrackNode itself. Not updating\n"); 698 702 } 699 703
Note: See TracChangeset
for help on using the changeset viewer.