Browse Source

Additional needed files to fix POTCO-5271

Justin Butler 17 years ago
parent
commit
bdd673f062

+ 7 - 2
direct/src/distributed/DistributedSmoothNodeAI.py

@@ -99,6 +99,11 @@ class DistributedSmoothNodeAI(DistributedNodeAI.DistributedNodeAI,
     def getComponentR(self):
         return self.getR()
     def getComponentL(self):
-        pass
+        if (self.zoneId):
+            return self.zoneId
+        else:
+            # we can't send None over the wire which self.zoneId can sometimes be
+            return 0
     def getComponentT(self):
-        pass
+        return 0
+

+ 8 - 2
direct/src/distributed/cDistributedSmoothNodeBase.cxx

@@ -78,8 +78,9 @@ initialize(const NodePath &node_path, DCClass *dclass, CHANNEL_TYPE do_id) {
 ////////////////////////////////////////////////////////////////////
 void CDistributedSmoothNodeBase::
 send_everything() {
-  d_setSmPosHpr(_store_xyz[0], _store_xyz[1], _store_xyz[2], 
-                _store_hpr[0], _store_hpr[1], _store_hpr[2]);
+  _currL[0] = _currL[1];
+  d_setSmPosHprL(_store_xyz[0], _store_xyz[1], _store_xyz[2], 
+                 _store_hpr[0], _store_hpr[1], _store_hpr[2], _currL[0]);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -370,3 +371,8 @@ set_curr_l(PN_uint64 l) {
   _currL[1] = l;
 }
 
+void CDistributedSmoothNodeBase::
+print_curr_l() {
+  cout << "printCurrL: sent l: " << _currL[1] << " last set l: " << _currL[0] << "\n";
+}
+

+ 1 - 0
direct/src/distributed/cDistributedSmoothNodeBase.h

@@ -55,6 +55,7 @@ PUBLISHED:
   void broadcast_pos_hpr_xy();
 
   void set_curr_l(PN_uint64 l);
+  void print_curr_l();
 
 private:
   INLINE static bool only_changed(int flags, int compare);