- Timestamp:
- Jan 31, 2007, 4:27:32 AM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc.cc
r10531 r10539 411 411 WorldEntity::draw(); 412 412 } 413 414 // HACK just to make sure they explode as nice as possible :) 415 void NPC::hit( float damage, WorldEntity* killer) 416 { 417 this->setDamage(killer->getDamage()); 418 } -
trunk/src/world_entities/npcs/npc.h
r10531 r10539 37 37 void destroy( /*WorldEntity* killer*/ ); 38 38 39 void hit( float damage, WorldEntity* killer); 40 39 41 private: 40 42 inline void setTeamNumber(int number) { teamNumber=number; } -
trunk/src/world_entities/projectiles/swarm_projectile.cc
r10538 r10539 226 226 if( this->target != NULL && (this->getAbsCoor() - this->target->getAbsCoor()).len() < 3) // FIXME Temp fake workaround for collision :) 227 227 { 228 dynamic_cast<WorldEntity*>(target)->hit(this->getDamage(), this); 229 this->deactivate(); 230 } 228 dynamic_cast<WorldEntity*>(target)->destroy(this); //hit(this->getDamage(), this); 229 this->deactivate(); 230 PRINTF(0)("Target was hit by Swarm Missile!\n"); 231 } 232 else if( this->target == NULL) 233 this->deactivate(); 231 234 } 232 235 -
trunk/src/world_entities/space_ships/space_ship.cc
r10538 r10539 190 190 this->weaponMan.addWeapon( wpRight1, 0, 1); 191 191 192 this->weaponMan.addWeapon( wpLeft2, 1, 2);193 this->weaponMan.addWeapon( wpRight2, 1, 3);194 195 this->weaponMan.addWeapon( wpLeft3, 2, 4);196 this->weaponMan.addWeapon( wpRight3, 2, 5);192 this->weaponMan.addWeapon( wpLeft2, 1, 0); 193 this->weaponMan.addWeapon( wpRight2, 1, 1); 194 195 this->weaponMan.addWeapon( wpLeft3, 2, 0); 196 this->weaponMan.addWeapon( wpRight3, 2, 1); 197 197 198 198 this->weaponMan.addWeapon( wpLeft1, 3, 0); … … 235 235 engineEnergyShare = 0.4; 236 236 237 shieldCur = 20;237 shieldCur = 100; 238 238 shieldMax = 100; 239 239 shieldTH = .2 * shieldMax; // shield power must be 20% before shield kicks in again 240 240 241 this->setHealth( 20);241 this->setHealth( 100); 242 242 this->setHealthMax( 100); 243 243 … … 507 507 glMultMatrixf((float*)matrix); 508 508 //glScalef(2.0, 2.0, 2.0); // no double rescale 509 // FIXME510 509 511 510 -
trunk/src/world_entities/weapons/acid_launcher.cc
r10516 r10539 124 124 void AcidLauncher::tick(float dt) 125 125 { 126 if (!Weapon::tickW(dt)) 127 return; 126 128 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 127 129 { … … 130 132 } 131 133 132 if (!Weapon::tickW(dt)) 133 return; 134 134 135 /* 135 136 Quaternion quat; -
trunk/src/world_entities/weapons/heavy_blaster.cc
r10516 r10539 272 272 void HeavyBlaster::tick(float dt) 273 273 { 274 if (!Weapon::tickW(dt)) 275 return; 274 276 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 275 277 { -
trunk/src/world_entities/weapons/light_blaster.cc
r10533 r10539 179 179 void LightBlaster::tick(float dt) 180 180 { 181 if (!Weapon::tickW(dt)) 182 return; 181 183 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 182 184 { -
trunk/src/world_entities/weapons/medium_blaster.cc
r10516 r10539 178 178 void MediumBlaster::tick(float dt) 179 179 { 180 if (!Weapon::tickW(dt)) 181 return; 180 182 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 181 183 { -
trunk/src/world_entities/weapons/swarm_launcher.cc
r10533 r10539 22 22 23 23 #include "model.h" 24 #include "world_entities/npcs/npc.h" 24 25 25 26 #include "state.h" … … 157 158 PRINTF(0)("fire\n"); 158 159 Projectile* pj = NULL; 159 for( ObjectList< Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)160 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) 160 161 { 161 if( ((*eIterator)->getOMListNumber() != (this->getOMListNumber() -1)) && ((*eIterator)->getClassCName() != "Weapon") && ((*eIterator)->getClassCName() != "Projectile") && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 300)162 if( ((*eIterator)->getOMListNumber() != (this->getOMListNumber())) && ((*eIterator)->getClassCName() != "Weapon") && ((*eIterator)->getClassCName() != "Projectile") && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 300) 162 163 { 163 164 pj = this->getProjectile(); … … 172 173 pj->setAbsDir(this->getAbsDir()); 173 174 dynamic_cast<SwarmProjectile*>(pj)->setTarget( (PNode*)(*eIterator) ); 174 //pj->toList(OM_GROUP_01_PROJ);175 175 pj->activate(); 176 176 } -
trunk/src/world_entities/weapons/weapon_manager.cc
r10528 r10539 442 442 { 443 443 if( firingWeapon->getCurrentState() == WS_SHOOTING) continue; 444 445 444 firingWeapon->requestAction(WA_SHOOT); 446 445 } … … 454 453 455 454 /** 456 * triggers fire of all weapons in the current weaponconfig455 * triggers release fire of all weapons in the current weaponconfig 457 456 */ 458 457 void WeaponManager::releaseFire()
Note: See TracChangeset
for help on using the changeset viewer.