- Timestamp:
- Jul 4, 2006, 8:20:52 PM (19 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/defs/class_id.h
r9131 r9167 226 226 CL_ROCKET = 0x000003e1, 227 227 CL_LASER = 0x000003e2, 228 CL_BOMB = 0x000003e3, 229 CL_GROUND_TURRET = 0x000003e4, 230 CL_GUIDED_MISSILE = 0x000003e5, 231 CL_HYPERBLAST = 0x000003e6, 228 CL_RAIL_PROJECTILE = 0x000003e3, 229 CL_BOMB = 0x000003e4, 230 CL_GROUND_TURRET = 0x000003e5, 231 CL_GUIDED_MISSILE = 0x000003e6, 232 CL_HYPERBLAST = 0x000003e7, 232 233 233 234 // NPC's -
branches/presentation/src/world_entities/WorldEntities.am
r9158 r9167 34 34 world_entities/projectiles/bomb.cc \ 35 35 world_entities/projectiles/laser.cc \ 36 world_entities/projectiles/rail_projectile.cc \ 36 37 world_entities/projectiles/test_bullet.cc \ 37 38 world_entities/projectiles/rocket.cc \ … … 101 102 projectiles/bomb.h \ 102 103 projectiles/laser.h \ 104 projectiles/rail_projectile.h \ 103 105 projectiles/test_bullet.h \ 104 106 projectiles/rocket.h \ -
branches/presentation/src/world_entities/environments/model_entity.cc
r7193 r9167 32 32 { 33 33 this->setClassID(CL_MODEL_ENTITY, "ModelEntity"); 34 this->toList(OM_ENVIRON _NOTICK);34 this->toList(OM_ENVIRON); 35 35 36 36 this->speed = NULL; … … 71 71 void ModelEntity::setMomentum (float angle, float x, float y, float z) 72 72 { 73 Vector v(x,y,z); 74 v.normalize(); 73 75 if (this->momentum == NULL) 74 76 this->momentum = new Quaternion; 75 *this->momentum = Quaternion(angle, Vector(x, y, z));77 *this->momentum = Quaternion(angle, v); 76 78 } 77 79 78 80 void ModelEntity::tick(float dt) 79 81 { 82 printf("TEST\n"); 80 83 if (this->speed != NULL) 81 84 this->shiftCoor(*this->speed * dt); -
branches/presentation/src/world_entities/projectiles/rail_projectile.cc
r9165 r9167 39 39 this->setClassID(CL_RAIL_PROJECTILE, "RailProjectile"); 40 40 41 this->loadModel("models/projectiles/ rail_projectile.obj");41 this->loadModel("models/projectiles/test_projectile.obj", 100); 42 42 43 43 this->setMinEnergy(10); 44 44 this->setHealthMax(10); 45 this->lifeSpan = 5.0;45 this->lifeSpan = .5f; 46 46 47 47 this->emitter = new DotEmitter(100, 5, M_2_PI); -
branches/presentation/src/world_entities/space_ships/spacecraft_2d.cc
r9159 r9167 424 424 if (this->toTravelHeight != NULL) 425 425 { 426 this->travelNode->shiftCoor(Vector(0, (*toTravelHeight - this->travelNode->getAbsCoor().y) * dt , 0));426 this->travelNode->shiftCoor(Vector(0, (*toTravelHeight - this->travelNode->getAbsCoor().y) * dt * 10.0, 0)); 427 427 if (fabsf(this->travelNode->getAbsCoor().y - *this->toTravelHeight) < .1) 428 428 { … … 435 435 accel.y = 0.0; 436 436 437 438 437 Vector accelerationDir = this->getAbsDir().apply(accel * this->acceleration); 439 438 accelerationDir.y = 0.0; 440 441 442 /*443 if (this->getRelCoor().z > this->travelDistance.y && accel.z > 0.0)444 accel.z = 0.0f;445 if (this->getRelCoor().z < -this->travelDistance.y && accel.z < 0.0)446 accel.z = 0.0f;447 448 if (this->getRelCoor().x > this->travelDistance.x && accel.x > 0.0)449 accel.x = 0.0f;450 if (this->getRelCoor().x < -this->travelDistance.x && accel.x < 0.0)451 accel.x = 0.0f;*/452 453 439 454 440 // this is the air friction (necessary for a smooth control) … … 523 509 else if (cameraLook < -M_PI_4) 524 510 cameraLook = -M_PI_4; 525 //this->cameraNode.setRelDirSoft(this->direction,10);526 511 } 527 512 } -
branches/presentation/src/world_entities/weapons/laser_cannon.cc
r9159 r9167 72 72 73 73 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 74 this->setProjectileType(CL_ LASER);74 this->setProjectileType(CL_RAIL_PROJECTILE); 75 75 this->prepareProjectiles(100); 76 76 this->setEmissionPoint(Vector(2.8,0,0) * 5.0);
Note: See TracChangeset
for help on using the changeset viewer.