Changeset 6738 for code/branches/gamestates2/src/libraries/core/input
- Timestamp:
- Apr 16, 2010, 12:22:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestates2/src/libraries/core/input/InputManager.cc
r6662 r6738 390 390 device->update(time); 391 391 392 // Collect function scalls for the update392 // Collect function calls for the update 393 393 for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i) 394 394 activeStatesTicked_[i]->update(time.getDeltaTime()); … … 414 414 void InputManager::updateActiveStates() 415 415 { 416 // temporary resize 416 // Calculate the stack of input states 417 // and assign it to the corresponding device 417 418 for (unsigned int i = 0; i < devices_.size(); ++i) 418 419 { … … 433 434 } 434 435 435 // update tickables (every state will only appear once)436 // Using a std::set to avoid duplicates436 // See that we only update each InputState once for each device 437 // Using an std::set to avoid duplicates 437 438 std::set<InputState*> tempSet; 438 439 for (unsigned int i = 0; i < devices_.size(); ++i) … … 441 442 tempSet.insert(devices_[i]->getStateListRef()[iState]); 442 443 443 // copy the content of the std::set back to the actual vector444 // Copy the content of the std::set back to the actual vector 444 445 activeStatesTicked_.clear(); 445 446 for (std::set<InputState*>::const_iterator it = tempSet.begin();it != tempSet.end(); ++it)
Note: See TracChangeset
for help on using the changeset viewer.