Changeset 927 for code/branches/network/src/orxonox/objects/weapon
- Timestamp:
- Mar 26, 2008, 5:02:14 PM (17 years ago)
- Location:
- code/branches/network/src/orxonox/objects/weapon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.cc
r871 r927 45 45 { 46 46 RegisterObject(AmmunitionDump); 47 registerAllVariables(); 47 48 48 49 for (int i = 0; i < numberOfAmmos_; i++) … … 114 115 return stock_[id]; 115 116 } 117 118 void AmmunitionDump::registerAllVariables(){ 119 registerVar( &numberOfAmmos_, sizeof(int), network::DATA); 120 121 for (int i = 0; i < numberOfAmmos_; i++) 122 { 123 registerVar(&stock_[i], sizeof(int), network::DATA); 124 registerVar(&capacity_[i], sizeof(int), network::DATA); 125 } 126 } 116 127 } -
code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.h
r871 r927 60 60 protected: 61 61 inline bool create() { return true; } 62 void registerAllVariables(); 62 63 63 64 int numberOfAmmos_; -
code/branches/network/src/orxonox/objects/weapon/BulletManager.cc
r871 r927 39 39 { 40 40 RegisterObject(BulletManager); 41 registerAllVariables(); 41 42 bullets_ = new Bullet*[bulletsSize_]; 42 43 } … … 103 104 } 104 105 106 void BulletManager::registerAllVariables(){ 107 registerVar(&bulletsSize_, sizeof(int), network::DATA); 108 registerVar(&bulletsIndex_, sizeof(int), network::DATA); 109 // TODO we got a problem here: 110 // there is no possibility (so far) to synchronise pointers to objects 111 } 112 105 113 } -
code/branches/network/src/orxonox/objects/weapon/BulletManager.h
r917 r927 60 60 protected: 61 61 inline bool create() { return true; } 62 void registerAllVariables(); 62 63 63 64 // Bullet array
Note: See TracChangeset
for help on using the changeset viewer.