Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2011, 5:25:00 PM (13 years ago)
Author:
simonmie
Message:

New Shield effect added (from tibork), first working BasicProjectile class, changes in weapon classes to fit new BasicProjectile system, some spam messages in Pawn.cc removed

File:
1 edited

Legend:

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

    r8386 r8492  
    3636#include "worldentities/pawns/Pawn.h"
    3737#include "graphics/ParticleSpawner.h"
     38#include "BasicProjectile.h"
    3839
    3940namespace orxonox
     
    4142    CreateFactory(Projectile);
    4243
    43     Projectile::Projectile(BaseObject* creator) : MovableEntity(creator)
     44    Projectile::Projectile(BaseObject* creator) : MovableEntity(creator), BasicProjectile()
    4445    {
    4546        RegisterObject(Projectile);
    4647
    4748        this->setConfigValues();
    48         this->bDestroy_ = false;
     49//        this->bDestroy_ = false;
    4950        this->owner_ = 0;
    50         this->damage_ = 115;
     51//        this->damage_ = 115;
    5152///////////////////me
    52         this->healthdamage_ = 0;
    53         this->shielddamage_ = 0;
     53//        this->healthdamage_ = 0;
     54//        this->shielddamage_ = 0;
    5455///////////////////end me
    5556
     
    8889            return;
    8990
    90         if (this->bDestroy_)
     91        if (this->getBDestroy())
    9192            this->destroy(); // TODO: use a scheduler instead of deleting the object right here in tick()
    9293    }
     
    9899    }
    99100
     101    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     102    {
     103        return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->owner_,this);
     104    }
     105
    100106//////////////////////////me edit
    101     bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     107/*    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    102108    {
    103109        if (!this->bDestroy_ && GameMode::isMaster())
     
    150156    }
    151157//////////////////////////////////////////////////////////////////////end edit
    152 
     158*/
    153159    void Projectile::setOwner(Pawn* owner)
    154160    {
    155161        this->owner_ = owner;
    156162    }
     163
    157164}
Note: See TracChangeset for help on using the changeset viewer.