Changeset 1021 for code/trunk/src/orxonox/objects/weapon
- Timestamp:
- Apr 10, 2008, 5:03:34 PM (17 years ago)
- Location:
- code/trunk/src/orxonox/objects/weapon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc
r871 r1021 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/trunk/src/orxonox/objects/weapon/AmmunitionDump.h
r871 r1021 60 60 protected: 61 61 inline bool create() { return true; } 62 void registerAllVariables(); 62 63 63 64 int numberOfAmmos_; -
code/trunk/src/orxonox/objects/weapon/BulletManager.cc
r871 r1021 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/trunk/src/orxonox/objects/weapon/BulletManager.h
r871 r1021 39 39 #include "util/tinyxml/tinyxml.h" 40 40 #include "core/BaseObject.h" 41 #include " ../Tickable.h"41 #include "core/Tickable.h" 42 42 43 43 namespace orxonox { … … 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.