Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9489 for code


Ignore:
Timestamp:
Dec 3, 2012, 5:46:12 PM (12 years ago)
Author:
moralelastix
Message:

What ever

Location:
code/branches/turret
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/turret/data/levels/templates/lodInformation.oxt

    r8706 r9489  
    1515      <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/>
    1616      <MeshLodInformation mesh=HydroHarvester.mesh enabled=false />
     17      <MeshLodInformation mesh=turretHead.mesh enabled=false />
    1718
    1819      <!-- disable LOD for some debris meshes which caused a crash (fixed in Ogre 1.7.3) -->
  • code/branches/turret/data/levels/turretTest.oxw

    r9469 r9489  
    11<LevelInfo
    22 name = "turret Test"
    3  description = "A level with absolutely nothing in it."
     3 description = "A level with a turret in it."
    44 tags = "test"
    55 screenshot = "emptylevel.png"
     
    1515  include("templates/spaceshipAssff.oxt")
    1616  include("templates/spaceshipPirate.oxt")
     17  include("templates/spaceshipTurret.oxt")
    1718?>
    1819
     
    2728    skybox       = "Orxonox/Starbox"
    2829  >
     30    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
     31    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     32
     33
     34<StaticEntity position="0,0,0" yaw=0 pitch=0>
     35    <attached>
     36        <Model position="0,0,0" mesh="turretSocketFront.mesh" scale3D="10,10,10" />
     37        <Model position="0,0,0" mesh="turretSocketIn.mesh" scale3D="10,10,10" />
     38        <Model position="0,0,0" mesh="turretSocketTop.mesh" scale3D="10,10,10" />
     39        <Model position="0,0,0" mesh="turretSocketLeft.mesh" scale3D="10,10,10" />
     40        <Model position="0,0,0" mesh="turretSocketRight.mesh" scale3D="10,10,10" />
     41    </attached>
     42</StaticEntity>
    2943
    3044
    3145
    32 
    33     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    34     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     46<SpaceShip position="0,10,0" pitch="-45" yaw="225" roll="0">
     47    <templates>
     48        <Template link=spaceshipturret />
     49    </templates>
     50    <controller>
     51        <WaypointPatrolController alertnessradius=100 team=10>
     52        </WaypointPatrolController>
     53     </controller>
     54</SpaceShip>
    3555   
    3656  </Scene>
  • code/branches/turret/src/modules/objects/Turret.cc

    r9469 r9489  
    3939     * @brief Constructor
    4040     */
    41     Turret::Turret(BaseObject* creator) : Pawn(creator)
     41    Turret::Turret(BaseObject* creator) : SpaceShip(creator)
    4242    {
    4343        RegisterObject(Turret);
     
    5353    }
    5454
    55     /*void Turret::rotateYaw(const Vector2& value)
    56     {
    57 
    58     }
    59 
    6055
    6156    void Turret::rotatePitch(const Vector2& value)
    6257    {
    63 
     58        Vector2 pitch = value;
     59        float nextPitch = this->localAngularAcceleration_.x() + pitch.x*0.8f;
     60        // Einschraenken auf 0 bis 180
     61        this->localAngularAcceleration_.setX(nextPitch);
    6462    }
    6563
    66     void Turret::rotateRoll(const Vector2& value)
    67     {
    68 
    69     }*/
    7064
    7165    void Turret::setAlertnessRadius(float value)
  • code/branches/turret/src/modules/objects/Turret.h

    r9469 r9489  
    3838#include "objects/ObjectsPrereqs.h"
    3939
    40 #include "worldentities/pawns/Pawn.h"
     40#include "worldentities/pawns/SpaceShip.h"
    4141
    4242namespace orxonox
    4343{
    44     class _ObjectsExport Turret : public Pawn
     44    class _ObjectsExport Turret : public SpaceShip
    4545    {
    4646        public:
     
    4949
    5050            //virtual void tick(float dt);
    51             virtual void moveFrontBack(const Vector2& value) {}
    52             virtual void moveRightLeft(const Vector2& value) {}
    53             virtual void moveUpDown(const Vector2& value) {}
    5451
    55             /*virtual void rotateYaw(const Vector2& value);
    5652            virtual void rotatePitch(const Vector2& value);
    57             virtual void rotateRoll(const Vector2& value);*/
    5853
    5954            void setAlertnessRadius(float value);
Note: See TracChangeset for help on using the changeset viewer.