Browse Source

oops, shouldn't double int8array length

David Rose 24 years ago
parent
commit
f23b139f06

+ 2 - 2
direct/src/extensions/Datagram-extensions.py

@@ -25,7 +25,7 @@
         elif subatomicType == STBlob:
             self.addString(arg)
         elif subatomicType == STInt8array:
-            self.addUint8(len(arg) << 1)
+            self.addUint8(len(arg))
             for i in arg:
                 self.addInt8(int(i*divisor))
         elif subatomicType == STInt16array:
@@ -37,7 +37,7 @@
             for i in arg:
                 self.addInt32(int(i*divisor))
         elif subatomicType == STUint8array:
-            self.addUint8(len(arg) << 1)
+            self.addUint8(len(arg))
             for i in arg:
                 self.addUint8(int(i*divisor))
         elif subatomicType == STUint16array:

+ 2 - 2
direct/src/extensions/DatagramIterator-extensions.py

@@ -27,7 +27,7 @@
             elif subatomicType == STBlob:
                 retVal = self.getString()
             elif subatomicType == STInt8array:
-                len = self.getUint8() >> 1
+                len = self.getUint8()
                 retVal = []
                 for i in range(len):
                     retVal.append(self.getInt8())
@@ -47,7 +47,7 @@
                 for i in range(len):
                     retVal.append(self.getUint8())
             elif subatomicType == STUint16array:
-                len = self.getUint16() >> 1
+                len = self.getUint16()
                 retVal = []
                 for i in range(len):
                     retVal.append(self.getUint16())

+ 8 - 8
direct/src/showbase/ppython

@@ -1,12 +1,19 @@
 #! /bin/sh
 
+# -w will run with WireGL.
+wgl=
+if [ x"$1" = x"-w" ]; then
+  shift 1
+  wgl=wgl
+fi
+
 # Linux case
 if [ -z "$PANDA_ROOT" ]; then
   # Convert semicolons back to colons
   PYTHONPATH=`echo $PYTHONPATH | sed 'y/;/:/'`
   export PYTHONPATH
   # Run unbuffered output, with any options passed in
-  exec python -u $*
+  exec $wgl python -u $*
   exit 1
 fi
 
@@ -47,13 +54,6 @@ fi
 HOME=`cygpath -w $HOME`
 export HOME
 
-# -w will run with WireGL.
-wgl=
-if [ x"$1" = x"-w" ]; then
-  shift 1
-  wgl=wgl
-fi
-
 if [ x"$1" = x"-msdev" ]; then
   # used for local machine debugging of vc dlls called by python
   shift 1