- Timestamp:
- Aug 26, 2005, 11:18:24 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/cd_engine.cc
r5116 r5131 100 100 //////////////// 101 101 102 /*if( likely(entity2 != this->terrain))102 if( likely(entity2 != this->terrain)) 103 103 { 104 104 PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName()); 105 105 tree = entity1->getOBBTree(); 106 106 if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2); 107 } */107 } 108 108 entity2 = iterator2->nextElement(); 109 109 } -
trunk/src/lib/util/list.h
r5120 r5131 382 382 inline T* tIterator<T>::firstElement () 383 383 { 384 this->currentEl = this->list->first; 385 if (this->currentEl != NULL) 386 return this->currentEl->curr; 384 this->tmpEl = this->list->first; 385 if (this->tmpEl != NULL) 386 { 387 this->currentEl = this->tmpEl->next; 388 return this->tmpEl->curr; 389 } 387 390 else 388 391 return NULL; … … 392 395 inline T* tIterator<T>::lastElement () 393 396 { 394 this->currentEl = this->list->last; 395 if (this->currentEl != NULL) 396 return this->currentEl->curr; 397 this->tmpEl = this->list->last; 398 if (this->tmpEl != NULL) 399 { 400 this->currentEl = tmpEl->prev; 401 return this->tmpEl->curr; 402 } 397 403 else 398 404 return NULL; … … 410 416 return NULL; 411 417 418 this->tmpEl = this->currentEl; 412 419 this->currentEl = this->currentEl->next; 413 if (this->currentEl != NULL) 414 return this->currentEl->curr; 415 else 416 return NULL; 420 421 return this->tmpEl->curr; 417 422 } 418 423 … … 427 432 return NULL; 428 433 434 this->tmpEl = this->currentEl; 429 435 this->currentEl = this->currentEl->prev; 430 if (this->currentEl != NULL) 431 return this->currentEl->curr; 432 else 433 return NULL; 436 437 return this->tmpEl->curr; 434 438 } 435 439
Note: See TracChangeset
for help on using the changeset viewer.