Changeset 2991
- Timestamp:
- May 19, 2009, 10:04:39 PM (16 years ago)
- Location:
- code/branches/netp3/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp3/src/network/synchronisable/SynchronisableVariable.cc
r2990 r2991 34 34 uint8_t SynchronisableVariableBase::state_ = 0; 35 35 36 36 37 } //namespace -
code/branches/netp3/src/network/synchronisable/SynchronisableVariable.h
r2990 r2991 38 38 #include "core/Core.h" 39 39 #include "core/CoreIncludes.h" 40 #include "core/GameMode.h" 40 41 #include "network/synchronisable/NetworkCallback.h" 41 42 #include "network/synchronisable/NetworkCallbackManager.h" … … 64 65 virtual ~SynchronisableVariableBase() {} 65 66 protected: 66 static void setState();67 67 static uint8_t state_; 68 68 }; … … 112 112 variable_( variable ), mode_( syncDirection ), callback_( cb ) 113 113 { 114 setState(); 114 if ( state_ == 0x0 ) 115 { 116 state_ = GameMode::isMaster() ? 0x1 : 0x2; // set the appropriate mode here 117 } 115 118 } 116 119 … … 160 163 } 161 164 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);*/222 165 223 166 -
code/branches/netp3/src/orxonox/objects/CMakeLists.txt
r2826 r2991 10 10 Teamcolourable.cc 11 11 Tickable.cc 12 Test.cc13 12 Scene.cc 14 13 Script.cc -
code/branches/netp3/src/orxonox/objects/controllers/AIController.cc
r2990 r2991 101 101 void AIController::tick(float dt) 102 102 { 103 if( Core::isMaster())103 if(GameMode::isMaster()) 104 104 { 105 105 if (!this->isActive()) -
code/branches/netp3/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2990 r2991 132 132 // this->firehack_ = 0x0; 133 133 134 if ( Core::isMaster())134 if (GameMode::isMaster()) 135 135 if (this->health_ <= 0) 136 136 this->death(); … … 263 263 void Pawn::doFire(uint8_t fireMode) 264 264 { 265 if( Core::isMaster())265 if(GameMode::isMaster()) 266 266 { 267 267 if (this->weaponSystem_)
Note: See TracChangeset
for help on using the changeset viewer.