Changeset 10128
- Timestamp:
- Nov 19, 2014, 4:00:53 PM (10 years ago)
- Location:
- code/branches/surfaceraceHS14
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/surfaceraceHS14/data/levels/templates/spaceshipDodgeRace.oxt
r10127 r10128 7 7 explosionchunks = 4 8 8 9 health = 8010 maxhealth = 20011 initialhealth = 809 health = 40 10 maxhealth = 40 11 initialhealth = 40 12 12 13 shieldhealth = 3514 initialshieldhealth = 3515 maxshieldhealth = 6013 shieldhealth = 80 14 initialshieldhealth = 80 15 maxshieldhealth = 80 16 16 shieldabsorption = 0.9 17 17 reloadrate = 1 … … 35 35 collisionType = "dynamic" 36 36 mass = 4200000 37 linearDamping = 0. 737 linearDamping = 0.9999999 38 38 angularDamping = 0.9999999 39 39 40 collisiondamage = 100 41 enablecollisiondamage = true 40 collisiondamage = 100 41 enablecollisiondamage = true 42 42 43 > 43 44 <engines> … … 68 69 <DodgeRaceShip> 69 70 <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 /> 73 73 </camerapositions> 74 74 </DodgeRaceShip> -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc
r10127 r10128 89 89 // shoot! 90 90 if (isFireing) 91 ControllableEntity::fire(0); 91 { 92 //pos += Vector3(900, 0, 0) * dt; 93 //ControllableEntity::fire(0); 94 } 95 92 96 93 97 // Camera … … 103 107 // bring back on track! 104 108 if(pos.y != 0) 105 pos.y = 0; 109 { 110 pos.y = 0; 111 } 106 112 107 113 setPosition(pos); … … 135 141 { 136 142 lastTimeLeft = 0; 137 desiredVelocity.x = -value.x * speed;143 desiredVelocity.x = value.x * speed; 138 144 } 139 145 void DodgeRaceShip::boost(bool bBoost) … … 141 147 isFireing = bBoost; 142 148 } 143 /* 149 144 150 inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 145 151 { 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) 151 153 { 152 lastEnemy = enemy; 154 lastEntity = otherObject; 155 removeHealth(20); 156 //this->death(); 157 } 153 158 154 removeHealth(20);155 if (getGame())156 {157 getGame()->multiplier = 1;158 }159 }160 // was shot, decrease multiplier161 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 }172 159 return false; 173 // SUPER(DodgeRaceShip, collidesAgainst, otherObject, contactPoint);174 160 } 175 */ 161 176 162 WeakPtr<DodgeRace> DodgeRaceShip::getGame() 177 163 { -
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.h
r10124 r10128 79 79 80 80 private: 81 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 81 82 WeakPtr<DodgeRace> getGame(); 82 83 WeakPtr<DodgeRace> game; 83 84 WeakPtr<Projectile> lastShot; 85 WeakPtr<WorldEntity> lastEntity; 84 86 Camera* camera; 85 87 float lastTimeFront, lastTimeLeft, lastTime; … … 90 92 } velocity, desiredVelocity; 91 93 92 93 94 95 /*96 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);97 98 private:99 100 WeakPtr<DodgeRaceEnemy> lastEnemy;101 */102 103 94 }; 104 95 }
Note: See TracChangeset
for help on using the changeset viewer.