Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8538


Ignore:
Timestamp:
May 23, 2011, 3:09:07 PM (14 years ago)
Author:
simonmie
Message:

some comments in test-Weaponsettings made

Location:
code/branches/gameimmersion
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gameimmersion/data/levels/includes/weaponSettingsImmTest.oxi

    r8492 r8538  
    1818          <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
    1919        </links>
     20            <!-- HsW01 is the standard Weapon, 4 slots => 4 Projectiles spawned at one click -->
     21            <!-- LightningGun is the spiral weapon, 2 slots -->
     22            <!-- SimpleRocket is the target-following rocket -->
     23            <!-- Rocket is the player-guided rocket -->
    2024        <Weapon>
    2125          <attached>
  • code/branches/gameimmersion/src/modules/weapons/projectiles/BasicProjectile.cc

    r8492 r8538  
    4949
    5050        this->bDestroy_ = false;
    51 //        this->owner_ = 0;
    5251
    5352        this->damage_ = 0;
     
    127126    }
    128127
    129 /*    void BasicProjectile::setOwner(Pawn* owner)
    130     {
    131         this->owner_ = owner;
    132     }
    133 
    134     void BasicProjectile::destroyObject()
     128/*    void BasicProjectile::destroyObject()
    135129    {
    136130        if (GameMode::isMaster())
  • code/branches/gameimmersion/src/modules/weapons/projectiles/BasicProjectile.h

    r8492 r8538  
    4848            void basicDestroyObject();
    4949
    50 /*            void basicSetOwner(Pawn* owner);
    51             inline Pawn* basicGetOwner() const
    52                 { return this->owner_; }
    53 */
    54 
    5550            inline void setDamage(float damage)
    5651                { this->damage_ = damage;  }
     
    7570
    7671
    77 
    7872        private:
    79 //            WeakPtr<Pawn> owner_;
     73//            WeakPtr<Pawn> owner_; //owner cannot be set in BasicProjectile, because it's already defined in MobileEntity and Movable Entity
    8074
    8175            float damage_;
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc

    r8533 r8538  
    4747        this->setConfigValues();
    4848//        this->bDestroy_ = false;
    49         this->owner_ = 0;
     49//        this->owner_ = 0;
    5050//        this->damage_ = 115;
    5151///////////////////me
     
    100100    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    101101    {
    102         return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->owner_,this);
     102        return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this);
    103103    }
    104104
     
    160160        this->owner_ = owner;
    161161    }
    162 
    163162}
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.h

    r8492 r8538  
    5656                { return this->damage_; }
    5757*/
     58
     59
    5860            void setOwner(Pawn* owner);
    5961            inline Pawn* getOwner() const
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.cc

    r8533 r8538  
    148148    {
    149149        this->owner_ = owner;
    150         this->player_ = this->owner_->getPlayer();
    151         this->owner_->getPlayer()->startTemporaryControl(this);
     150        this->player_ = this->getOwner()->getPlayer();
     151        this->getOwner()->getPlayer()->startTemporaryControl(this);
    152152
    153153        if( GameMode::isMaster() )
     
    185185    bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    186186    {
    187         return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->owner_,this);
     187        return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this);
    188188
    189189/* * /        if (!this->bDestroy_ && GameMode::isMaster())
     
    246246    {
    247247        ParticleSpawner *effect1, *effect2;
    248         if( this->owner_ )
    249         {
    250             effect1 = new ParticleSpawner(this->owner_->getCreator());
    251             effect2 = new ParticleSpawner(this->owner_->getCreator());
     248        if( this->getOwner() )
     249        {
     250            effect1 = new ParticleSpawner(this->getOwner()->getCreator());
     251            effect2 = new ParticleSpawner(this->getOwner()->getCreator());
    252252        }
    253253        else
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.h

    r8533 r8538  
    111111                { return this->owner_; }
    112112
    113 /*            inline void setDamage(float damage)
    114                 { this->damage_ = damage; }
    115             inline float getDamage() const
    116                 { return this->damage_; }
    117 */
    118 
    119113            virtual void fired(unsigned int firemode);
    120114
  • code/branches/gameimmersion/src/modules/weapons/projectiles/SimpleRocket.cc

    r8533 r8538  
    159159    {
    160160        this->owner_ = owner;
    161         this->player_ = this->owner_->getPlayer();
     161        this->player_ = this->getOwner()->getPlayer();
    162162    }
    163163
     
    167167    bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    168168    {
    169         return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->owner_,this);
     169        return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this);
    170170/*        if (!this->bDestroy_ && GameMode::isMaster())
    171171        {
  • code/branches/gameimmersion/src/modules/weapons/projectiles/SimpleRocket.h

    r8533 r8538  
    113113            inline Pawn* getOwner() const
    114114                { return this->owner_; }
     115
    115116            inline bool hasFuel() const
    116117            { return this->fuel_; }
    117118
    118 /*            inline void setDamage(float damage)
    119                 { this->damage_ = damage; }
    120             inline float getDamage() const
    121                 { return this->damage_; }
    122 */
    123119
    124120        private:
Note: See TracChangeset for help on using the changeset viewer.