Changeset 9526 for code/trunk/src/modules/portals
- Timestamp:
- Feb 19, 2013, 10:25:42 AM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/portals/PortalEndPoint.cc
r8767 r9526 28 28 29 29 #include "PortalEndPoint.h" 30 #include "portals/PortalLink.h" 30 31 31 32 #include <ctime> … … 35 36 36 37 #include "worldentities/MobileEntity.h" 37 38 38 #include "objects/triggers/MultiTriggerContainer.h" 39 39 40 #include " portals/PortalLink.h"40 #include "sound/WorldSound.h" 41 41 42 42 namespace orxonox … … 59 59 this->setRadarObjectShape(RadarViewable::Dot); 60 60 this->setRadarVisibility(true); 61 if( GameMode::isMaster() ) 62 { 63 this->portalSound_ = new WorldSound(this); 64 this->portalSound_->setLooping(false); 65 this->attach(this->portalSound_); 66 this->portalSound_->setSource("sounds/Weapon_HsW01.ogg"); //TODO: change sound file 67 } 61 68 } 62 69 … … 158 165 entity->rotate(this->getWorldOrientation()); 159 166 entity->setVelocity(this->getWorldOrientation() * entity->getVelocity()); 167 //play Sound 168 if( this->portalSound_ && !(this->portalSound_->isPlaying())) 169 { 170 this->portalSound_->play(); 171 } 160 172 } 161 173 -
code/trunk/src/modules/portals/PortalEndPoint.h
r8767 r9526 115 115 std::map<MobileEntity *, time_t> jumpOutTimes_; //!< Stores the time at which a certain MobileEntity @ref jumpOut "jumped out" of this PortalEndPoint 116 116 std::set<MobileEntity *> recentlyJumpedOut_; //!< Stores the entities witch recently jumped out of this PortalEndPoint and haven't left the activation radius yet. This is needed in order to prevent them from beeing pulled into the PortalEndPoint they have just come out of. 117 118 WorldSound* portalSound_; 117 119 }; 118 120
Note: See TracChangeset
for help on using the changeset viewer.