Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2011, 10:54:34 PM (14 years ago)
Author:
dafrick
Message:

Some changes in prsentation level. Making PortalEndPoints radar viewable.

Location:
code/branches/presentation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/data/levels/presentationFS11.oxw

    r8601 r8628  
    5454   
    5555    <!-- BOUNDARIES AND PORTALS -->
    56    
    5756
    5857    <Template name=PortalDefault>
     
    6463    </Template>
    6564
    66     <PortalEndPoint position="350,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
    67     <PortalEndPoint position="-30300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
     65    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-90000,0,0"/>
     66    <PortalEndPoint position="-350,0,0" id="3" distance="40" target="MobileEntity" design="PortalDefault"/>
     67    <PortalEndPoint position="-72000,0,0" id="4" distance="40" target="MobileEntity" design="PortalDefault"/>
     68    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,10000,0"/>
    6869
    6970    <SpaceBoundaries warnDistance="1" maxDistance="450" showDistance="300" healthDecrease="0.1" position="0,0,0"/>
    7071    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-30000,0,0"/>
    7172
    72     <PortalLink fromID="1" toID="2" />
    73     <PortalLink fromID="2" toID="1" />
     73    <PortalLink fromID="3" toID="4" />
     74    <PortalLink fromID="4" toID="3" />
    7475
    7576    <!-- MODELS, DEBRIS, ETC -->
    7677
    77     <!-- hydrogen farmer -->
    78     <SpaceShip position="0,1750,0" roll=90 mass=10000 >
    79       <attached>
    80         <!-- Docking -->
    81         <DistanceTriggerBeacon name="bcnDestroyer" />
    82         <DockingTarget name="destroyer" />
    83 
    84         <Dock orientation="0.5, 0.5, 0.5, 0.5" position="-1500,0,0" >
    85             <animations>
    86                 <MoveToDockingTarget target="destroyer" position="-1300,0,0" />
    87             </animations>
    88             <effects>
    89                 <DockToShip target="spaceShip" />
    90             </effects>
    91             <events>
    92                 <execute>
    93                     <EventListener event="dockMe" />
    94                 </execute>
    95             </events>
    96             <attached>
    97                 <DistanceTrigger position="0,0,-200" distance="30" target="Pawn"
    98                     beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
    99                 />
    100                 <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" />
    101             </attached>
    102         </Dock>
    103 
    104         <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 />
    105         <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490"  /> -->
    106         <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> -->
    107         <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> -->
    108         <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> -->
    109       </attached>
    110       <collisionShapes>
    111         <BoxCollisionShape  position="-1120,0,0" halfExtents="230,200,490" />
    112         <BoxCollisionShape  position="580,0,-960" halfExtents="230,200,490" yaw=-120 />
    113         <BoxCollisionShape  position="580,0,960" halfExtents="230,200,490" yaw=-240 />
    114       </collisionShapes>
    115     </SpaceShip>
    116 
    117     <SpaceShip template="spaceshipassff2" position="0,3500,0" >
    118       <attached>
    119         <DockingTarget name="spaceShip" />
    120       </attached>
    121 
    122     </SpaceShip>
    123 
    124 
    12578    <!-- This is a model of Earth: mass=EarthMass/1000 and radius=EarthRadius[km]*10 -->
    12679    <Planet
    127       position="70500,0,0"
     80      position="80500,0,0"
    12881      scale="63000"
    12982      collisionType="dynamic"
     
    150103    </Planet>
    151104
     105    <!-- MOON AREA -->
     106
    152107    <!-- This is a model of our Moon: mass=MoonMass/1000 and radius=MoonRadius[km]*10 and position=DistanceFromEarth[km]*10 -->
    153108    <Planet
    154       position="-15000,0,0"
     109      position="-80000,0,0"
    155110      scale="4000"
    156111      collisionType="dynamic"
     
    176131    </Planet>
    177132
     133    <!-- Hydrogen farmer -->
     134    <SpaceShip position="-74000,2500,0" roll=90 yaw=180 pitch=20 mass=10000 >
     135      <attached>
     136        <!-- Docking -->
     137        <DistanceTriggerBeacon name="bcnDestroyer" />
     138        <DockingTarget name="destroyer" />
     139
     140        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 />
     141        <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490"  /> -->
     142        <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> -->
     143        <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> -->
     144        <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> -->
     145      </attached>
     146      <collisionShapes>
     147        <BoxCollisionShape  position="-1120,0,0" halfExtents="230,200,490" />
     148        <BoxCollisionShape  position="580,0,-960" halfExtents="230,200,490" yaw=-120 />
     149        <BoxCollisionShape  position="580,0,960" halfExtents="230,200,490" yaw=-240 />
     150      </collisionShapes>
     151    </SpaceShip>
     152
     153    <Dock position="-73942, 1288, -255" roll=90 yaw=180 >
     154        <animations>
     155            <MoveToDockingTarget target="destroyer" />
     156        </animations>
     157        <effects>
     158            <DockToShip target="spaceShip" />
     159        </effects>
     160        <events>
     161            <execute>
     162                <EventListener event="dockMe" />
     163            </execute>
     164        </events>
     165        <attached>
     166            <DistanceTrigger position="10,-202, -42" distance="400" target="Pawn"
     167                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
     168            />
     169            <Billboard position="10,-202,-42" material="Examples/Flare" colour="1.0, 0, 0" />
     170        </attached>
     171    </Dock>
     172
     173    <SpaceShip template="spaceshipassff2" position="-73915,3786,67" orientation="-0.14045, 0.68254, 0.68144, 0.223774" >
     174      <attached>
     175        <DockingTarget name="spaceShip" />
     176      </attached>
     177    </SpaceShip>
     178
    178179
    179180    <PickupSpawner position="-25,-50,-125" respawnTime="10" triggerDistance="20" maxSpawnedItems="5">
  • code/branches/presentation/src/modules/portals/PortalEndPoint.cc

    r8605 r8628  
    4242    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
    4343
    44     PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(NULL), reenterDelay_(0)
     44    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), RadarViewable(creator, static_cast<WorldEntity*>(this)), id_(0), trigger_(NULL), reenterDelay_(0)
    4545    {
    4646        RegisterObject(PortalEndPoint);
     
    4949        this->trigger_->setName("portal");
    5050        this->attach(trigger_);
     51
     52        this->setRadarObjectColour(ColourValue::White);
     53        this->setRadarObjectShape(RadarViewable::Dot);
     54        this->setRadarVisibility(true);
    5155    }
    5256   
     
    117121    }
    118122
     123    void PortalEndPoint::changedActivity(void)
     124    {
     125        SUPER(PortalEndPoint, changedActivity);
     126       
     127        this->setRadarVisibility(this->isActive());
     128    }
     129
    119130    bool PortalEndPoint::letsEnter(MobileEntity* entity)
    120131    {
  • code/branches/presentation/src/modules/portals/PortalEndPoint.h

    r8605 r8628  
    4343
    4444#include "worldentities/StaticEntity.h"
     45#include "interfaces/RadarViewable.h"
    4546#include "graphics/Billboard.h"
    4647#include "objects/triggers/DistanceMultiTrigger.h"
     
    5758     */
    5859   
    59     class _PortalsExport PortalEndPoint : public StaticEntity
     60    class _PortalsExport PortalEndPoint : public StaticEntity, public RadarViewable
    6061    {
    6162        public:
    6263            PortalEndPoint(BaseObject* creator);
    6364            virtual ~PortalEndPoint();
     65           
    6466            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     67            virtual void changedActivity(void);
     68           
    6569            inline void setTarget(const std::string & target)                 //!< add types which are allowed to activate the PortalEndPoint
    66             {
    67                 this->trigger_->addTarget(target);
    68             }
     70                { this->trigger_->addTarget(target); }
    6971           
    7072            void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
    7173            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
    7274            inline void setReenterDelay(unsigned int seconds)
    73             {
    74                 this->reenterDelay_ = seconds;
    75             }
     75                { this->reenterDelay_ = seconds; }
    7676            inline unsigned int getReenterDelay()
    77             {
    78                 return this->reenterDelay_;
    79             }
     77                { return this->reenterDelay_; }
    8078            inline void setID(unsigned int id)
    81             {
    82                 this->id_ = id;
    83             }
     79                { this->id_ = id; }
    8480           
    8581            inline unsigned int getID() const
    86             {
    87                 return this->id_;
    88             }
     82                { return this->id_; }
    8983           
    9084            /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object
    9185            inline void setTemplate(const std::string & name)
    92             {
    93                 this->templateName_ = name;
    94                 this->addTemplate(name);
    95             }
     86                { this->templateName_ = name; this->addTemplate(name); }
    9687
    9788            /// \brief Get the name of the attached design template
    9889            inline const std::string & getTemplate()
    99             {
    100                 return this->templateName_;
    101             }
     90                { return this->templateName_; }
    10291
    10392            /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
Note: See TracChangeset for help on using the changeset viewer.