Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10128


Ignore:
Timestamp:
Nov 19, 2014, 4:00:53 PM (9 years ago)
Author:
sriedel
Message:

Should work so far

Location:
code/branches/surfaceraceHS14
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/surfaceraceHS14/data/levels/templates/spaceshipDodgeRace.oxt

    r10127 r10128  
    77   explosionchunks        = 4
    88
    9    health            = 80
    10    maxhealth         = 200
    11    initialhealth     = 80
     9   health            = 40
     10   maxhealth         = 40
     11   initialhealth     = 40
    1212
    13    shieldhealth        = 35
    14    initialshieldhealth = 35
    15    maxshieldhealth     = 60
     13   shieldhealth        = 80
     14   initialshieldhealth = 80
     15   maxshieldhealth     = 80
    1616   shieldabsorption    = 0.9
    1717   reloadrate          = 1
     
    3535   collisionType     = "dynamic"
    3636   mass              = 4200000
    37    linearDamping     = 0.7
     37   linearDamping     = 0.9999999
    3838   angularDamping    = 0.9999999
    3939
    40     collisiondamage = 100
    41     enablecollisiondamage = true
     40   collisiondamage = 100
     41   enablecollisiondamage = true
     42   
    4243  >
    4344    <engines>
     
    6869  <DodgeRaceShip>
    6970    <camerapositions>
    70       <CameraPosition position="0,30,120" direction="0, 0, -1" drag=false mouselook=true />
    71       <CameraPosition position="0,300,-100" direction="0, -1, 0" drag=false mouselook=true />
    72       <CameraPosition position="0,300,-100" direction="1, 0, 0" drag=false mouselook=true />
     71      <CameraPosition position="0,30,150" direction="0, 0, -1" drag=false mouselook=true />
     72      <CameraPosition position="0,1300,-100" direction="0, -1, 0" drag=false mouselook=true />
    7373    </camerapositions>
    7474  </DodgeRaceShip>
  • code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc

    r10127 r10128  
    8989        // shoot!
    9090        if (isFireing)
    91             ControllableEntity::fire(0);
     91        {
     92                //pos += Vector3(900, 0, 0) * dt;
     93            //ControllableEntity::fire(0);
     94        }
     95
    9296
    9397        // Camera
     
    103107        // bring back on track!
    104108        if(pos.y != 0)
    105             pos.y = 0;
     109        {
     110                pos.y = 0;
     111        }
    106112
    107113        setPosition(pos);
     
    135141    {
    136142        lastTimeLeft = 0;
    137         desiredVelocity.x = -value.x * speed;
     143        desiredVelocity.x = value.x * speed;
    138144    }
    139145    void DodgeRaceShip::boost(bool bBoost)
     
    141147        isFireing = bBoost;
    142148    }
    143     /*
     149
    144150    inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    145151    {
    146         // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
    147         WeakPtr<DodgeRaceEnemy> enemy = orxonox_cast<DodgeRaceEnemy*>(otherObject);
    148         WeakPtr<Projectile> shot = orxonox_cast<Projectile*>(otherObject);
    149         // ensure that this gets only called once per enemy.
    150         if (enemy != NULL && lastEnemy != enemy)
     152        if (otherObject != NULL && lastEntity != otherObject)
    151153        {
    152             lastEnemy = enemy;
     154                lastEntity = otherObject;
     155                removeHealth(20);
     156            //this->death();
     157        }
    153158
    154             removeHealth(20);
    155             if (getGame())
    156             {
    157                 getGame()->multiplier = 1;
    158             }
    159         }
    160         // was shot, decrease multiplier
    161         else if (shot != NULL  && lastShot != shot)
    162         {
    163             if (getGame() && orxonox_cast<DodgeRaceEnemy*>(shot->getShooter()) != NULL)
    164             {
    165                 if (getGame()->multiplier > 1)
    166                 {
    167                     lastShot = shot;
    168                     getGame()->multiplier -= 1;
    169                 }
    170             }
    171         }
    172159        return false;
    173         // SUPER(DodgeRaceShip, collidesAgainst, otherObject, contactPoint);
    174160    }
    175 */
     161
    176162    WeakPtr<DodgeRace> DodgeRaceShip::getGame()
    177163    {
  • code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.h

    r10124 r10128  
    7979
    8080        private:
     81            virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    8182            WeakPtr<DodgeRace> getGame();
    8283            WeakPtr<DodgeRace> game;
    8384            WeakPtr<Projectile> lastShot;
     85            WeakPtr<WorldEntity> lastEntity;
    8486            Camera* camera;
    8587            float lastTimeFront, lastTimeLeft, lastTime;
     
    9092            } velocity, desiredVelocity;
    9193
    92 
    93 
    94 
    95 /*
    96                          virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    97 
    98         private:
    99 
    100             WeakPtr<DodgeRaceEnemy> lastEnemy;
    101            */
    102 
    10394    };
    10495}
Note: See TracChangeset for help on using the changeset viewer.