Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2008, 9:11:12 AM (16 years ago)
Author:
landauf
Message:
  • GlobalShader in dedicated mode works again
  • Shooting as a client works
  • Fixed problem with NotificationQueue
Location:
code/branches/presentation/src/orxonox/objects
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/GlobalShader.cc

    r2485 r2501  
    4545        if (!this->getScene())
    4646            ThrowException(AbortLoading, "Can't create GlobalShader, no scene given.");
    47         if (!this->getScene()->getSceneManager())
    48             ThrowException(AbortLoading, "Can't create GlobalShader, no scene manager given.");
     47//        if (!this->getScene()->getSceneManager())
     48//            ThrowException(AbortLoading, "Can't create GlobalShader, no scene manager given.");
    4949
    50         this->shader_.setSceneManager(this->getScene()->getSceneManager());
     50        if (this->getScene()->getSceneManager())
     51            this->shader_.setSceneManager(this->getScene()->getSceneManager());
    5152
    5253        this->registerVariables();
  • code/branches/presentation/src/orxonox/objects/gametypes/Gametype.cc

    r2495 r2501  
    6969        this->addBots(this->numberOfBots_);
    7070
    71         setConfigValues();
    72 
    7371        // load the corresponding score board
    7472        if (Core::showsGraphics() && this->scoreboardTemplate_ != "")
  • code/branches/presentation/src/orxonox/objects/weaponSystem/Weapon.cc

    r2493 r2501  
    5050        this->magazineLoadingTime_ = 0;
    5151        this->bReloading_ = false;
     52
     53        this->setObjectMode(0x0);
    5254    }
    5355
  • code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc

    r2497 r2501  
    5454
    5555        // Get notification about collisions
    56         this->enableCollisionCallback();
    5756
    58         this->setCollisionType(Kinematic);
     57        if (Core::isMaster())
     58        {
     59            this->enableCollisionCallback();
    5960
    60         SphereCollisionShape* shape = new SphereCollisionShape(this);
    61         shape->setRadius(10);
    62         this->attachCollisionShape(shape);
     61            this->setCollisionType(Kinematic);
    6362
    64         if(Core::isMaster())
    65           this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
     63            SphereCollisionShape* shape = new SphereCollisionShape(this);
     64            shape->setRadius(10);
     65            this->attachCollisionShape(shape);
     66
     67            this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
     68        }
    6669    }
    6770
  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc

    r2497 r2501  
    545545        if (type != None && this->collisionType_ == None)
    546546        {
     547/*
    547548            // Check whether there was some scaling applied.
    548549            if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001))
     
    551552                return;
    552553            }
    553 
     554*/
    554555            // Create new rigid body
    555556            btRigidBody::btRigidBodyConstructionInfo bodyConstructionInfo(0, this, this->collisionShape_->getCollisionShape());
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2500 r2501  
    4949
    5050        PawnManager::touch();
    51         this->getPickUp().setPlayer(this);
    5251        this->bAlive_ = true;
    5352        this->fire_ = 0x0;
     53        this->firehack_ = 0x0;
    5454
    5555        this->health_ = 0;
     
    6060
    6161        this->spawnparticleduration_ = 3.0f;
     62
     63        this->getPickUp().setPlayer(this);
    6264
    6365        if (Core::isMaster())
     
    108110        registerVariable(this->health_,        variableDirection::toclient);
    109111        registerVariable(this->initialHealth_, variableDirection::toclient);
    110         registerVariable(this->fire_,          variableDirection::toclient);
     112        registerVariable(this->fire_,          variableDirection::toserver);
    111113    }
    112114
     
    124126                this->weaponSystem_->fire(WeaponMode::altFire2);
    125127        }
    126         this->fire_ = 0x0;
     128        this->fire_ = this->firehack_;
     129        this->firehack_ = 0x0;
    127130
    128131        if (this->health_ <= 0)
     
    225228    void Pawn::fire(WeaponMode::Enum fireMode)
    226229    {
    227         this->fire_ |= fireMode;
     230        this->firehack_ |= fireMode;
    228231    }
    229232
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.h

    r2500 r2501  
    116116            ShipEquipment pickUp;
    117117            bool bAlive_;
    118            
     118
    119119
    120120            float health_;
     
    126126            WeaponSystem* weaponSystem_;
    127127            unsigned int fire_;
     128            unsigned int firehack_;
    128129
    129130            std::string spawnparticlesource_;
Note: See TracChangeset for help on using the changeset viewer.