mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
test for greg
This commit is contained in:
parent
bb0c57bcd8
commit
866645f18c
@ -311,11 +311,14 @@ class ClockDelta(DirectObject.DirectObject):
|
||||
Preserves the lower NetworkTimeBits of the networkTime value,
|
||||
and extends the sign bit all the way up.
|
||||
"""
|
||||
if networkTime < 0:
|
||||
# flip the sign, mask it as if it were positive, flip the sign back:
|
||||
r = (networkTime * -1 & NetworkTimeSignedMask) * -1
|
||||
if 1:
|
||||
r = ((networkTime & NetworkTimeMask) << NetworkTimeTopBits) >> NetworkTimeTopBits
|
||||
else:
|
||||
r = networkTime & NetworkTimeSignedMask
|
||||
if networkTime < 0:
|
||||
# flip the sign, mask it as if it were positive, flip the sign back:
|
||||
r = (networkTime * -1 & NetworkTimeSignedMask) * -1
|
||||
else:
|
||||
r = networkTime & NetworkTimeSignedMask
|
||||
assert -32768 <= r <= 32767
|
||||
return r
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user