Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 8, 2007, 9:46:13 PM (18 years ago)
Author:
nicolasc
Message:

just another upload
GUI seems to work, but there are still some unexplainable segfaults

Location:
branches/playability/src/world_entities/projectiles
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/projectile.h

    r10104 r10196  
    8787    OrxSound::SoundBuffer  explosionBuffer;
    8888    OrxSound::SoundBuffer  engineBuffer;
    89 
    90 //     virtual Vector newDirection(Vector curDirection, Vector estTargetDir, float angle);
    9189};
    9290
  • branches/playability/src/world_entities/projectiles/spike.cc

    r10173 r10196  
    165165  float matrix[4][4];
    166166  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    167 
     167  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     168  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    168169  glRotatef(angle, 1.0, 0.0, 0.0);
    169170  this->getAbsDir().matrix (matrix);
  • branches/playability/src/world_entities/projectiles/spike.h

    r10173 r10196  
    3434    virtual void draw () const;
    3535
    36 
     36    inline void setVelocity(Vector velocity) {this->velocity = velocity;}
    3737  private:
    3838    static FastFactory*               fastFactory;
  • branches/playability/src/world_entities/projectiles/spike_ball.cc

    r10188 r10196  
    3232
    3333#include "weapons/weapon.h"
    34 
     34#include "../weapons/weapon_manager.h"
    3535
    3636#include "class_id_DEPRECATED.h"
     
    6565  this->halo->setSize(2, 2);
    6666  this->halo->setTexture("hbolt_halo.png");
    67 /*
    68 //   this->weaponMan = new WeaponManager(dynamic_cast<WorldEntity*>(this));
    69   this->weaponMan.setParentEntity(this);
     67
     68  this->weaponMan = new WeaponManager(dynamic_cast<WorldEntity*>(this));
     69  this->weaponMan->setParentEntity(this);
    7070
    7171  Weapon* cannon = new SpikeLauncher();
    7272  cannon->setName( "SpikeLauncher");
    73   this->weaponMan.addWeapon(cannon, 0, 0);
    74   this->weaponMan.changeWeaponConfig(0);
    75 */
     73  this->weaponMan->addWeapon(cannon, 0, 0);
     74  this->weaponMan->changeWeaponConfig(0);
     75
    7676
    7777}
     
    177177
    178178  if (this->tickLifeCycle(dt)){
    179 //     this->blow();
     179    this->weaponMan->fire();
    180180    this->deactivate();
    181181  }
  • branches/playability/src/world_entities/projectiles/spike_ball.h

    r10188 r10196  
    1111
    1212#include "../weapons/spike_launcher.h"
    13 #include "../weapons/weapon.h"
    14 #include "../weapons/weapon_manager.h"
     13
     14
     15#include "extendable.h"
    1516
    1617class Vector;
     
    6263    WorldEntity* hitEntity; // FIXME TEMPORARY
    6364
    64 //     WeaponManager                     weaponMan;
     65    WeaponManager*                   weaponMan;
    6566
    6667};
  • branches/playability/src/world_entities/projectiles/swarm_projectile.cc

    r10188 r10196  
    1 
    21/*
    32   orxonox - the future of 3D-vertical-scrollers
     
    187186void SwarmProjectile::tick (float time)
    188187{
     188  if(unlikely(this->target == NULL)) /** Check whether the target still exists*/
     189    this->deactivate();
     190
    189191/*
    190192  Vector targetFarFarAway = this->getAbsCoor() + Vector(100000, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.