Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 2:53:00 PM (5 years ago)
Author:
pomselj
Message:

Projectiles survive infinitely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.cc

    r12376 r12378  
    8585    bool BasicProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs)
    8686    {
    87         //orxout() << "OMG A COLLISION" << endl;
    8887        if (!this->bDestroy_ && GameMode::isMaster())
    8988        {
     
    9392            if (getDestroyAfterCollision())
    9493            {
     94                orxout() << "Destroy that stuff" << endl;
    9595                this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else.
    9696                                        // The projectile is destroyed by its tick()-function (in the following tick).
     
    173173    void BasicProjectile::destroyCheck(void)
    174174    {
    175         if(GameMode::isMaster() && this->bDestroy_)
     175        if(GameMode::isMaster() && this->bDestroy_) {
     176            orxout() << "Set true, smhow" << endl;
    176177            this->destroy();
     178        }
    177179    }
    178180
     
    183185    void BasicProjectile::destroyObject(void)
    184186    {
    185         if(GameMode::isMaster())
     187        if(GameMode::isMaster()) {
     188            orxout() << "Deleted myself" << endl;
    186189            this->destroy();
     190        }
    187191    }
    188192}
Note: See TracChangeset for help on using the changeset viewer.