Changeset 8290 for code/branches/portals/src/modules
- Timestamp:
- Apr 21, 2011, 10:48:55 PM (14 years ago)
- Location:
- code/branches/portals/src/modules/portals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/portals/src/modules/portals/PortalEndPoint.cc
r8278 r8290 9 9 { 10 10 CreateFactory(PortalEndPoint); 11 12 /*static*/ const std::string PortalEndPoint::EVENTFUNCTIONNAME = "execute"; 11 13 12 14 std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s; … … 31 33 XMLPortParam(PortalEndPoint, "design", setTemplate, getTemplate, xmlelement, mode); 32 34 XMLPortParamExtern(PortalEndPoint, DistanceMultiTrigger, this->trigger_, "distance", setDistance, getDistance, xmlelement, mode); 33 XMLPortParamLoadOnly(PortalEndPoint, "eventTemplate", setEventTemplate, xmlelement, mode);34 35 XMLPortParamLoadOnly(PortalEndPoint, "target", setTargets, xmlelement, mode).defaultValues("Pawn"); 36 37 // Add the DistanceMultiTrigger as event source. 38 this->addEventSource(this->trigger_, EVENTFUNCTIONNAME); 35 39 36 40 if(mode == XMLPort::LoadObject) … … 44 48 SUPER(PortalEndPoint, XMLEventPort, xmlelement, mode); 45 49 46 XMLPortEventSink(PortalEndPoint, BaseObject, "execute", execute, xmlelement, mode);50 XMLPortEventSink(PortalEndPoint, BaseObject, EVENTFUNCTIONNAME, execute, xmlelement, mode); 47 51 } 48 52 -
code/branches/portals/src/modules/portals/PortalEndPoint.h
r8243 r8290 49 49 void jumpOut(MobileEntity * entity); 50 50 protected: 51 51 52 private: 53 static const std::string EVENTFUNCTIONNAME; 54 52 55 unsigned int id_; 53 56 DistanceMultiTrigger * trigger_; 54 57 std::string templateName_; 55 void setEventTemplate(const std::string & temp) 56 { 57 this->addTemplate(temp); 58 } 58 59 59 std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link 60 60 };
Note: See TracChangeset
for help on using the changeset viewer.