Changeset 10117 in orxonox.OLD for branches/playability/src/world_entities/space_ships
- Timestamp:
- Dec 20, 2006, 12:31:27 AM (18 years ago)
- Location:
- branches/playability/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/space_ships/space_ship.cc
r10113 r10117 147 147 Weapon* wpRight1 = new LightBlaster (); 148 148 wpRight1->setName( "LightBlaster"); 149 wpRight1->setParent( this);149 //wpRight1->setParent( this); 150 150 Weapon* wpLeft1 = new LightBlaster (); 151 151 wpLeft1->setName( "LightBlaster"); 152 wpLeft1->setParent( this);152 //wpLeft1->setParent( this); 153 153 154 154 Weapon* wpRight2 = new MediumBlaster (); 155 155 wpRight2->setName( "MediumBlaster"); 156 wpRight2->setParent( this);156 //wpRight2->setParent( this); 157 157 Weapon* wpLeft2 = new MediumBlaster (); 158 158 wpLeft2->setName( "MediumBlaster"); 159 wpLeft2->setParent( this);159 //wpLeft2->setParent( this); 160 160 161 161 Weapon* wpRight3 = new HeavyBlaster (); 162 162 wpRight3->setName( "HeavyBlaster"); 163 wpRight3->setParent( this);163 //wpRight3->setParent( this); 164 164 Weapon* wpLeft3 = new HeavyBlaster (); 165 165 wpLeft3->setName( "HeavyBlaster"); 166 wpLeft3->setParent( this);166 //wpLeft3->setParent( this); 167 167 168 168 Weapon* cannon = new SwarmLauncher(); 169 169 cannon->setName( "SwarmLauncher"); 170 cannon->setParent( this);170 //cannon->setParent( this); 171 171 172 172 … … 180 180 this->secWeaponMan.addWeapon( cannon, 0, 0); 181 181 182 182 /* 183 183 wpRight1->requestAction(WA_ACTIVATE); 184 184 wpLeft1->requestAction(WA_ACTIVATE); … … 190 190 191 191 cannon->requestAction(WA_ACTIVATE); 192 192 */ 193 193 194 194 this->weaponMan.changeWeaponConfig(1); … … 418 418 void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location) 419 419 { 420 PRINTF(0)("SPACESHIP COLLIDED WITH %s\n",entity->getCName());421 420 } 422 421 … … 669 668 670 669 void SpaceShip::damage(float pDamage, float eDamage){ 671 PRINTF( 0)("ship hit for (%f,%f) \n",pDamage,eDamage);670 PRINTF(5)("ship hit for (%f,%f) \n",pDamage,eDamage); 672 671 673 672 if( this->shieldActive) { … … 968 967 void SpaceShip::nextWeaponConfig() 969 968 { 970 971 this->curWeaponPrimary = (curWeaponPrimary + 1) % 3; 972 this->weaponMan.changeWeaponConfig(this->curWeaponPrimary); 969 PRINTF(0)("Requested next weapon config!\n"); 970 this->weaponMan.nextWeaponConfig(); 973 971 Playable::weaponConfigChanged(); 974 972 } … … 979 977 void SpaceShip::previousWeaponConfig() 980 978 { 981 this->curWeaponPrimary = ( curWeaponPrimary + 1) % 3;979 this->curWeaponPrimary = (this->curWeaponPrimary + 1) % 3; 982 980 this->weaponMan.changeWeaponConfig(this->curWeaponPrimary); 983 981 Playable::weaponConfigChanged(); 984 982 } 983 984 void SpaceShip::hit(float damage, WorldEntity* killer) 985 { 986 this->damage(killer->getDamage(),0); 987 killer->collidesWith( this, this->getAbsCoor()); 988 //this->collidesWith(killer, this->getAbsCoor()); 989 } -
branches/playability/src/world_entities/space_ships/space_ship.h
r10113 r10117 82 82 void previousWeaponConfig(); 83 83 84 inline void hit(float damage, WorldEntity* killer) { this->collidesWith(killer, this->getAbsCoor()); killer->collidesWith(this, this->getAbsCoor()); };84 virtual void hit(float damage, WorldEntity* killer); 85 85 86 86 private:
Note: See TracChangeset
for help on using the changeset viewer.