Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2011, 5:17:20 PM (14 years ago)
Author:
simonmie
Message:

New shielddamage implemented, depending functions changed, bugs fixed.

LightningGun →fire changed
Other weapons still need to be edited

Location:
code/branches/gameimmersion/src/modules/weapons/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc

    r8183 r8386  
    4848        this->bDestroy_ = false;
    4949        this->owner_ = 0;
    50         this->damage_ = 15;
     50        this->damage_ = 115;
     51///////////////////me
     52        this->healthdamage_ = 0;
     53        this->shielddamage_ = 0;
     54///////////////////end me
    5155
    5256        // Get notification about collisions
     
    139143            if (victim)
    140144            {
    141                 victim->hit(this->owner_, contactPoint, this->damage_);
     145                victim->hit(this->owner_, contactPoint, this->damage_, this->healthdamage_, this->shielddamage_);
    142146                victim->startReloadCountdown();
    143147            }
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.h

    r5929 r8386  
    5050
    5151            inline void setDamage(float damage)
    52                 { this->damage_ = damage; }
     52                { this->damage_ = damage;  COUT(3) << "DAMAGE-SET-FUNKTION WIRD AUFGERUFEN" << endl; }
    5353            inline float getDamage() const
    5454                { return this->damage_; }
     
    5858                { return this->owner_; }
    5959
     60////////////////////me
     61
     62            inline void setHealthDamage(float healthdamage)
     63                { this->healthdamage_ = healthdamage; }
     64            inline float getHealthDamage() const
     65                { return this->healthdamage_; }
     66
     67            inline void setShieldDamage(float shielddamage)
     68                { this->shielddamage_ = shielddamage; COUT(3) << "SHIELDDAMAGE SET TO " << shielddamage << endl; } //ShieldDamage wird korrekt gesettet vom XML-File
     69            inline float getShieldDamage() const
     70                { return this->shielddamage_; }
     71
     72///////////////////end me
     73
     74
    6075        private:
    6176            WeakPtr<Pawn> owner_;
    6277            float lifetime_;
    6378            float damage_;
     79///////me
     80            float healthdamage_;
     81            float shielddamage_;
     82///////end me
    6483            bool bDestroy_;
    6584            Timer destroyTimer_;
Note: See TracChangeset for help on using the changeset viewer.