Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2991 for code/branches


Ignore:
Timestamp:
May 19, 2009, 10:04:39 PM (16 years ago)
Author:
scheusso
Message:

forgot some things

Location:
code/branches/netp3/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp3/src/network/synchronisable/SynchronisableVariable.cc

    r2990 r2991  
    3434uint8_t SynchronisableVariableBase::state_ = 0;
    3535
     36
    3637} //namespace
  • code/branches/netp3/src/network/synchronisable/SynchronisableVariable.h

    r2990 r2991  
    3838#include "core/Core.h"
    3939#include "core/CoreIncludes.h"
     40#include "core/GameMode.h"
    4041#include "network/synchronisable/NetworkCallback.h"
    4142#include "network/synchronisable/NetworkCallbackManager.h"
     
    6465      virtual ~SynchronisableVariableBase() {}
    6566    protected:
    66       static void setState();
    6767      static uint8_t state_;
    6868  };
     
    112112      variable_( variable ), mode_( syncDirection ), callback_( cb )
    113113  {
    114       setState();
     114    if ( state_ == 0x0 )
     115    {
     116      state_ = GameMode::isMaster() ? 0x1 : 0x2;  // set the appropriate mode here
     117    }
    115118  }
    116119 
     
    160163  }
    161164
    162   /*template <> _NetworkExport uint32_t SynchronisableVariable<const bool>::returnSize();
    163   template <> _NetworkExport void     SynchronisableVariable<const bool>::loadAndIncrease(uint8_t*& mem);
    164   template <> _NetworkExport void     SynchronisableVariable<const bool>::saveAndIncrease(uint8_t*& mem);
    165   template <> _NetworkExport bool     SynchronisableVariable<const bool>::checkEquality(uint8_t* mem);
    166   template <> _NetworkExport uint32_t SynchronisableVariable<const unsigned char>::returnSize();
    167   template <> _NetworkExport void     SynchronisableVariable<const unsigned char>::loadAndIncrease(uint8_t*& mem);
    168   template <> _NetworkExport void     SynchronisableVariable<const unsigned char>::saveAndIncrease(uint8_t*& mem);
    169   template <> _NetworkExport bool     SynchronisableVariable<const unsigned char>::checkEquality(uint8_t* mem);
    170   template <> _NetworkExport uint32_t SynchronisableVariable<const short>::returnSize();
    171   template <> _NetworkExport void     SynchronisableVariable<const short>::loadAndIncrease(uint8_t*& mem);
    172   template <> _NetworkExport void     SynchronisableVariable<const short>::saveAndIncrease(uint8_t*& mem);
    173   template <> _NetworkExport bool     SynchronisableVariable<const short>::checkEquality(uint8_t* mem);
    174   template <> _NetworkExport uint32_t SynchronisableVariable<const unsigned short>::returnSize();
    175   template <> _NetworkExport void     SynchronisableVariable<const unsigned short>::loadAndIncrease(uint8_t*& mem);
    176   template <> _NetworkExport void     SynchronisableVariable<const unsigned short>::saveAndIncrease(uint8_t*& mem);
    177   template <> _NetworkExport bool     SynchronisableVariable<const unsigned short>::checkEquality(uint8_t* mem);
    178   template <> _NetworkExport uint32_t SynchronisableVariable<const int>::returnSize();
    179   template <> _NetworkExport void     SynchronisableVariable<const int>::loadAndIncrease(uint8_t*& mem);
    180   template <> _NetworkExport void     SynchronisableVariable<const int>::saveAndIncrease(uint8_t*& mem);
    181   template <> _NetworkExport bool     SynchronisableVariable<const int>::checkEquality(uint8_t* mem);
    182   template <> _NetworkExport uint32_t SynchronisableVariable<const unsigned int>::returnSize();
    183   template <> _NetworkExport void     SynchronisableVariable<const unsigned int>::loadAndIncrease(uint8_t*& mem);
    184   template <> _NetworkExport void     SynchronisableVariable<const unsigned int>::saveAndIncrease(uint8_t*& mem);
    185   template <> _NetworkExport bool     SynchronisableVariable<const unsigned int>::checkEquality(uint8_t* mem);
    186   template <> _NetworkExport uint32_t SynchronisableVariable<const long>::returnSize();
    187   template <> _NetworkExport void     SynchronisableVariable<const long>::loadAndIncrease(uint8_t*& mem);
    188   template <> _NetworkExport void     SynchronisableVariable<const long>::saveAndIncrease(uint8_t*& mem);
    189   template <> _NetworkExport bool     SynchronisableVariable<const long>::checkEquality(uint8_t* mem);
    190   template <> _NetworkExport uint32_t SynchronisableVariable<const unsigned long>::returnSize();
    191   template <> _NetworkExport void     SynchronisableVariable<const unsigned long>::loadAndIncrease(uint8_t*& mem);
    192   template <> _NetworkExport void     SynchronisableVariable<const unsigned long>::saveAndIncrease(uint8_t*& mem);
    193   template <> _NetworkExport bool     SynchronisableVariable<const unsigned long>::checkEquality(uint8_t* mem);
    194   template <> _NetworkExport uint32_t SynchronisableVariable<const long long>::returnSize();
    195   template <> _NetworkExport void     SynchronisableVariable<const long long>::loadAndIncrease(uint8_t*& mem);
    196   template <> _NetworkExport void     SynchronisableVariable<const long long>::saveAndIncrease(uint8_t*& mem);
    197   template <> _NetworkExport bool     SynchronisableVariable<const long long>::checkEquality(uint8_t* mem);
    198   template <> _NetworkExport uint32_t SynchronisableVariable<const unsigned long long>::returnSize();
    199   template <> _NetworkExport void     SynchronisableVariable<const unsigned long long>::loadAndIncrease(uint8_t*& mem);
    200   template <> _NetworkExport void     SynchronisableVariable<const unsigned long long>::saveAndIncrease(uint8_t*& mem);
    201   template <> _NetworkExport bool     SynchronisableVariable<const unsigned long long>::checkEquality(uint8_t* mem);
    202   template <> _NetworkExport uint32_t SynchronisableVariable<const float>::returnSize();
    203   template <> _NetworkExport void     SynchronisableVariable<const float>::loadAndIncrease(uint8_t*& mem);
    204   template <> _NetworkExport void     SynchronisableVariable<const float>::saveAndIncrease(uint8_t*& mem);
    205   template <> _NetworkExport bool     SynchronisableVariable<const float>::checkEquality(uint8_t* mem);
    206   template <> _NetworkExport uint32_t SynchronisableVariable<const double>::returnSize();
    207   template <> _NetworkExport void     SynchronisableVariable<const double>::loadAndIncrease(uint8_t*& mem);
    208   template <> _NetworkExport void     SynchronisableVariable<const double>::saveAndIncrease(uint8_t*& mem);
    209   template <> _NetworkExport bool     SynchronisableVariable<const double>::checkEquality(uint8_t* mem);
    210   template <> _NetworkExport uint32_t SynchronisableVariable<const long double>::returnSize();
    211   template <> _NetworkExport void     SynchronisableVariable<const long double>::loadAndIncrease(uint8_t*& mem);
    212   template <> _NetworkExport void     SynchronisableVariable<const long double>::saveAndIncrease(uint8_t*& mem);
    213   template <> _NetworkExport bool     SynchronisableVariable<const long double>::checkEquality(uint8_t* mem);
    214   template <> _NetworkExport uint32_t SynchronisableVariable<const std::string>::returnSize();
    215   template <> _NetworkExport void     SynchronisableVariable<const std::string>::loadAndIncrease(uint8_t*& mem);
    216   template <> _NetworkExport void     SynchronisableVariable<const std::string>::saveAndIncrease(uint8_t*& mem);
    217   template <> _NetworkExport bool     SynchronisableVariable<const std::string>::checkEquality(uint8_t* mem);
    218   template <> _NetworkExport uint32_t SynchronisableVariable<const Degree>::returnSize();
    219   template <> _NetworkExport void     SynchronisableVariable<const Degree>::loadAndIncrease(uint8_t*& mem);
    220   template <> _NetworkExport void     SynchronisableVariable<const Degree>::saveAndIncrease(uint8_t*& mem);
    221   template <> _NetworkExport bool     SynchronisableVariable<const Degree>::checkEquality(uint8_t* mem);*/
    222165
    223166
  • code/branches/netp3/src/orxonox/objects/CMakeLists.txt

    r2826 r2991  
    1010  Teamcolourable.cc
    1111  Tickable.cc
    12   Test.cc
    1312  Scene.cc
    1413  Script.cc
  • code/branches/netp3/src/orxonox/objects/controllers/AIController.cc

    r2990 r2991  
    101101    void AIController::tick(float dt)
    102102    {
    103         if(Core::isMaster())
     103        if(GameMode::isMaster())
    104104        {
    105105            if (!this->isActive())
  • code/branches/netp3/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2990 r2991  
    132132//         this->firehack_ = 0x0;
    133133
    134         if (Core::isMaster())
     134        if (GameMode::isMaster())
    135135          if (this->health_ <= 0)
    136136            this->death();
     
    263263    void Pawn::doFire(uint8_t fireMode)
    264264    {
    265         if(Core::isMaster())
     265        if(GameMode::isMaster())
    266266        {
    267267            if (this->weaponSystem_)
Note: See TracChangeset for help on using the changeset viewer.