diff --git a/direct/src/extensions/Datagram-extensions.py b/direct/src/extensions/Datagram-extensions.py index bed5702568..b5b24336f2 100644 --- a/direct/src/extensions/Datagram-extensions.py +++ b/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: diff --git a/direct/src/extensions/DatagramIterator-extensions.py b/direct/src/extensions/DatagramIterator-extensions.py index a48df591b7..f6aac940f5 100644 --- a/direct/src/extensions/DatagramIterator-extensions.py +++ b/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()) diff --git a/direct/src/showbase/ppython b/direct/src/showbase/ppython index f377adf3e0..88a5d2181a 100755 --- a/direct/src/showbase/ppython +++ b/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