Changeset 10758 in orxonox.OLD for branches/presentation/src/world_entities
- Timestamp:
- Jun 21, 2007, 1:37:21 AM (18 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/npcs/actionbox_enemy.cc
r10749 r10758 283 283 fw.normalize(); 284 284 fw = fw * 100; 285 285 286 286 Vector mp = this->getAbsCoor(); 287 287 Vector op = mp + fw; 288 288 289 289 Vector targetPos = State::getPlayer()->getPlayable()->getAbsCoor(); 290 290 Vector dv = targetPos - this->getAbsCoor(); … … 292 292 dv *= 100; 293 293 dv += mp; 294 294 295 295 Vector spUp = this->getAbsDir().inverse().apply( this->getAbsDir().apply( Vector( 0, 1, 0 ) ) ); 296 296 spUp.normalize(); 297 297 spUp *= 100; 298 298 spUp += mp; 299 299 300 300 Vector up = fw.cross( dv ); 301 301 up += mp; 302 302 303 303 //PRINTF(0)("DEBUG\n"); 304 304 //mp.debug(); 305 305 //op.debug(); 306 306 307 307 glMatrixMode(GL_MODELVIEW); 308 308 glPushMatrix(); -
branches/presentation/src/world_entities/projectiles/hbolt.cc
r10747 r10758 51 51 this->setHealthMax(0); 52 52 this->lifeSpan = 3.0; 53 53 this->setDamage(10); 54 54 this->angle = 0; 55 55 // this->rotationSpeed = 600; … … 135 135 if (this->hitEntity != entity/* && entity->isA(NPC::staticClassID())*/ && entity->isA(ActionboxEnemy::staticClassID()) || entity == this->target) 136 136 this->destroy( entity ); 137 this->hitEntity = entity;137 // this->hitEntity = entity; 138 138 // dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage()); 139 139 this->deactivate(); -
branches/presentation/src/world_entities/projectiles/nadion_blast.cc
r10747 r10758 59 59 this->angle = 0; 60 60 61 this->setDamage(5); 62 61 63 //this->emitter = new DotEmitter(1000, 0, 0); 62 64 this->emitter = new DotEmitter(50, 0, 0); -
branches/presentation/src/world_entities/projectiles/plasma_pulse.cc
r10751 r10758 42 42 this->setMinEnergy(2); 43 43 this->setHealthMax(0); 44 this->setDamage(2); 44 45 this->lifeSpan = 2.0; 45 46 this->grid = new Billboard(); -
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10755 r10758 428 428 void SpaceShip::tick (float time) 429 429 { 430 431 printf("Ship Status: %f, %f\n", this->getHealth(), this->getShield()); 432 430 433 if(caminit) 431 434 { … … 1081 1084 void SpaceShip::hit( float damage, WorldEntity * killer ) 1082 1085 { 1083 PRINTF(4)("SS HIT: %f\n", this->getHealth());1086 printf("SS HIT: %f, %f \n", this->getHealth() , this->getShield()); 1084 1087 Playable::hit( damage, killer ); 1085 PRINTF(4)("SS HIT: %f\n", this->getHealth() );1088 PRINTF(4)("SS HIT: %f\n", this->getHealth()); 1086 1089 } 1087 1090 -
branches/presentation/src/world_entities/world_entity.cc
r10757 r10758 354 354 // extract the mount points 355 355 // Patrick: they get extracted automaticaly now within the model finalization process 356 /*356 357 357 358 358 if(model != NULL) … … 362 362 PRINTF(0)("Worldentity %s has no mount points", (this->getName()).c_str()); 363 363 return; 364 } */364 } 365 365 366 366 // first get all mount points from the model … … 823 823 * @returns the shield left (this->shieldMax - shiled + this->shield) 824 824 */ 825 float WorldEntity::increaseShield(float shi led)825 float WorldEntity::increaseShield(float shield) 826 826 { 827 827 this->shield += shield; … … 1007 1007 if ( !damageable ) 1008 1008 return; 1009 1010 this->decreaseHealth(damage); 1009 1010 if (this->getShieldActive()) 1011 damage = this->decreaseShield(damage*2); 1012 this->decreaseHealth(damage/2); 1011 1013 1012 1014 if( this->getHealth() > 0) … … 1187 1189 1188 1190 void WorldEntity::regen(float time){ 1189 static float tmp; 1190 increaseHealth(time * this->healthRegen); 1191 increaseShield(time * this->shieldRegen); 1191 1192 printf("regen: %f, %f, %f ****************** ", time, this->healthRegen, this->shieldRegen); 1193 float tmp; 1194 this->increaseHealth(time * this->healthRegen); 1195 this->increaseShield(time * this->shieldRegen); 1192 1196 1193 1197
Note: See TracChangeset
for help on using the changeset viewer.