Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

update

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.