Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9243 in orxonox.OLD for branches/scripting/src/world_entities


Ignore:
Timestamp:
Jul 6, 2006, 4:10:39 PM (18 years ago)
Author:
snellen
Message:

update

Location:
branches/scripting/src/world_entities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/scripting/src/world_entities/npcs/gate.cc

    r9241 r9243  
    1313   ### File Specific
    1414   main-programmer: Patrick Boenzli
    15    co-programmer:
     15   co-programmer: Silvan Nellen
    1616*/
    1717#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     
    6666  this->scale = 1.0f;
    6767  this->actionRadius = 1.0;
     68  this->destroyed = false;
    6869
    6970  if( root != NULL)
     
    151152void Gate::open()
    152153{
    153   if( this->bLocked)
     154  if( this->bLocked || this->destroyed)
    154155    return;
    155156
     
    164165void Gate::close()
    165166{
     167 
     168  if( this->destroyed)
     169    return;
     170 
    166171  this->setAnimation(GATE_CLOSE, MD2_ANIM_ONCE);
    167172  this->bOpen = false;
     
    171176void Gate::destroy()
    172177{
     178  if( this->destroyed)
     179    return;
     180 
    173181  this->setAnimation(GATE_DIE, MD2_ANIM_ONCE);
    174182
    175   Explosion::explode(this, Vector(10,10,10));
     183  Explosion::explode(this, Vector(this->getScaling()/160,this->getScaling()/160,this->getScaling()/160));
     184 
     185 
     186  this->destroyed = true;
    176187}
    177188
  • branches/scripting/src/world_entities/npcs/gate.h

    r9235 r9243  
    5050
    5151  private:
     52    bool           destroyed;         //!< true if the door is destroyed
    5253    bool           bOpen;             //!< true if the door is open
    5354    bool           bLocked;           //!< true if this door is locked
  • branches/scripting/src/world_entities/projectiles/guided_missile.cc

    r9235 r9243  
    4343  this->lifeSpan = 4.0;
    4444  this->agility = 3.5;
    45   this->maxVelocity = 75;
     45  this->maxVelocity = 100;
    4646
    4747  this->emitter = new DotEmitter(100, 5, M_2_PI);
  • branches/scripting/src/world_entities/space_ships/spacecraft_2d.cc

    r9235 r9243  
    498498    this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
    499499  else if( event.type == KeyMapper::PEV_BACKWARD)
    500     this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
     500  {this->bBackward = event.bPressed; printf(" %f, %f, %f \n",getAbsCoorX(),getAbsCoorY(),getAbsCoorZ());} //this->shiftCoor(0,-.1,0);
    501501  else if( event.type == EV_MOUSE_MOTION)
    502502  {
  • branches/scripting/src/world_entities/weapons/aiming_system.cc

    r9235 r9243  
    115115  if( this->owner != killer)
    116116  {
    117     PRINTF(0)("real hit: %s\n", killer->getClassName());
     117    //PRINTF(0)("real hit: %s\n", killer->getClassName());
    118118    this->selectionList.push_back(killer);
    119119  }
  • branches/scripting/src/world_entities/world_entity.h

    r9235 r9243  
    129129
    130130  /* --- Character Attribute Block --- */
     131  /** @returns the scaling of the model */
     132  float getScaling(){return this->scaling;}
    131133  /** @returns the damage dealt by this world entity */
    132134  float getDamage() const { return this->damage; }
Note: See TracChangeset for help on using the changeset viewer.