Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2007, 11:15:39 AM (17 years ago)
Author:
rennerc
Message:

improved damage handling for adm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/npcs/adm_turret.cc

    r10704 r10708  
    242242void AdmTurret::addCannons( const TiXmlElement * root )
    243243{
    244   this->cannons = new WorldEntity();
     244  this->cannons = new DamageForwardingWorldEntity( this );
    245245        this->cannons->setParent(this);
    246246        this->cannons->loadParams( root );
     
    250250
    251251        this->cannons->toList( getOMListNumber() );
     252        this->cannons->setForwardDamageToParent( true );
    252253}
    253254
     
    260261        //this->weapon->setAbsCoor( this->cannons->getAbsCoor() );
    261262        this->weapon->setAbsDir( this->weapon->getAbsDir() * Quaternion( PI, Vector(0, 1, 0) ) );
     263       
     264        this->weapon->setForwardDamageToParent( true );
    262265}
    263266
    264267void AdmTurret::addSensor( const TiXmlElement * root )
    265268{
    266   this->sensor = new WorldEntity();
     269  this->sensor = new DamageForwardingWorldEntity( this );
    267270        this->sensor->setParent(this);
    268271        this->sensor->loadParams( root );
     
    270273        //this->sensor->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    271274        //this->sensor->addNodeFlags(PNODE_PROHIBIT_CHILD_DELETE);
    272         this->sensor->toList( getOMListNumber() );
     275       
    273276}
    274277
Note: See TracChangeset for help on using the changeset viewer.