Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2010, 7:24:24 PM (13 years ago)
Author:
dafrick
Message:

Merging presentation2 branch back to trunk.

Location:
code/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/objects/ForceField.cc

    r7677 r7801  
    6060        this->setLength(2000);
    6161        this->mode_ = forceFieldMode::tube;
     62       
     63        this->registerVariables();
    6264    }
    6365
     
    8385        XMLPortParam(ForceField, "mode", setMode, getMode, xmlelement, mode);
    8486    }
     87   
     88    void ForceField::registerVariables()
     89    {
     90        registerVariable(this->velocity_, VariableDirection::ToClient);
     91        registerVariable(this->radius_, VariableDirection::ToClient);
     92        registerVariable(this->halfLength_, VariableDirection::ToClient);
     93        registerVariable(this->mode_, VariableDirection::ToClient);
     94    }
     95
    8596
    8697    /**
  • code/trunk/src/modules/objects/ForceField.h

    r7678 r7801  
    8888
    8989            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a ForceField object through XML.
     90            void registerVariables(); //!< Registers the variables that should get synchronised over the network
    9091            virtual void tick(float dt); //!< A method that is called every tick.
     92           
    9193
    9294            /**
     
    141143            float radius_; //!< The radius of the ForceField.
    142144            float halfLength_; //!< Half of the length of the ForceField.
    143             forceFieldMode::Value mode_; //!< The mode of the ForceField.
     145            int mode_; //!< The mode of the ForceField.
    144146  };
    145147}
  • code/trunk/src/modules/overlays/hud/HUDBar.cc

    r7401 r7801  
    8585        this->bar_->setMaterialName(materialname);
    8686
    87         this->value_ = 1.0f;  // initielize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
     87        this->value_ = 1.0f;  // initialize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
    8888        this->setAutoColour(true);
    8989        this->setValue(0.0f); // <--
     
    161161        if (this->right2Left_)
    162162        {
    163             // backward casew
     163            // backward case
    164164            this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
    165165            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
  • code/trunk/src/modules/overlays/hud/HUDNavigation.cc

    r7401 r7801  
    2424 *   Co-authors:
    2525 *      Reto Grieder
     26 *      Oliver Scheuss
    2627 *
    2728 */
     
    410411    }
    411412}
    412 }
     413
     414}
  • code/trunk/src/modules/pickup/PickupManager.cc

    r7549 r7801  
    6161    /*static*/ const std::string PickupManager::guiName_s = "PickupInventory";
    6262
    63     // Register static newtork functions that are used to communicate changes to pickups over the network, such that the PickupInventory can display the information about the pickups properly.
     63    // Register static network functions that are used to communicate changes to pickups over the network, such that the PickupInventory can display the information about the pickups properly.
    6464    registerStaticNetworkFunction(PickupManager::pickupChangedUsedNetwork);
    6565    registerStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork);
  • code/trunk/src/modules/pickup/PickupSpawner.cc

    r7549 r7801  
    120120    PickupSpawner::~PickupSpawner()
    121121    {
    122         if(this->selfDestruct_ && this->pickup_ != NULL)
     122        if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != NULL)
    123123            this->pickup_->destroy();
    124124    }
     
    317317            assert(pickup);
    318318            assert(target);
    319             assert(pickup->pickup(target));
     319            bool pickedUp = pickup->pickup(target);
     320            assert(pickedUp);
     321            pickedUp = false; // To avoid compiler warning.
    320322
    321323            this->decrementSpawnsRemaining();
  • code/trunk/src/modules/weapons/MuzzleFlash.cc

    r7284 r7801  
    4242        this->setScale(0.1f);
    4343
    44         this->delayTimer_.setTimer(0.1f, false, createExecutor(createFunctor(&MuzzleFlash::destroy, this)));
     44        if( GameMode::isMaster() )
     45          this->delayTimer_.setTimer(0.1f, false, createExecutor(createFunctor(&MuzzleFlash::destroy, this)));
    4546    }
    4647}
Note: See TracChangeset for help on using the changeset viewer.