- Timestamp:
- May 12, 2011, 1:17:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/portals/src/modules/portals/PortalEndPoint.cc
r8290 r8454 53 53 bool PortalEndPoint::execute(bool bTriggered, BaseObject* trigger) 54 54 { 55 if(!this->isActive()) 56 return true; 57 55 58 MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger); 56 59 if(cont == 0) … … 64 67 } 65 68 66 if(this->getAttachedObjects().find(orxonox_cast<WorldEntity *>(originatingTrigger)) == this->getAttachedObjects().end()) // only necessary if events have the same name67 return true;68 69 69 MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData()); 70 70 if(entity == 0) … … 73 73 if(bTriggered) 74 74 { 75 if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end()) // only enter the portal if not recentlyjumped out of it75 if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end()) // only enter the portal if not just jumped out of it 76 76 { 77 77 PortalLink::use(entity, this); … … 89 89 { 90 90 this->recentlyJumpedOut_.insert(entity); 91 91 92 entity->setPosition(this->getWorldPosition()); 92 93 entity->rotate(this->getWorldOrientation()); 93 94 entity->setVelocity(this->getWorldOrientation() * entity->getVelocity()); 95 entity->setVelocity(entity->getVelocity() * 1.5); 94 96 } 95 97
Note: See TracChangeset
for help on using the changeset viewer.