mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
context
This commit is contained in:
parent
3b59b1d592
commit
423c12dff8
@ -26,6 +26,8 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
ConnectionRepository.ConnectionRepository.__init__(self, base.config)
|
ConnectionRepository.ConnectionRepository.__init__(self, base.config)
|
||||||
|
|
||||||
|
self.context=100000
|
||||||
self.setClientDatagram(1)
|
self.setClientDatagram(1)
|
||||||
|
|
||||||
self.recorder = base.recorder
|
self.recorder = base.recorder
|
||||||
@ -134,6 +136,10 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
self.priorWorldPos = worldPos
|
self.priorWorldPos = worldPos
|
||||||
self.sendWorldPos(worldPos[0], worldPos[1])
|
self.sendWorldPos(worldPos[0], worldPos[1])
|
||||||
|
|
||||||
|
def allocateContext(self):
|
||||||
|
self.context+=1
|
||||||
|
return self.context
|
||||||
|
|
||||||
def setServerDelta(self, delta):
|
def setServerDelta(self, delta):
|
||||||
"""
|
"""
|
||||||
Indicates the approximate difference in seconds between the
|
Indicates the approximate difference in seconds between the
|
||||||
@ -633,7 +639,7 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
" login state: " +
|
" login state: " +
|
||||||
currentLoginStateName +
|
currentLoginStateName +
|
||||||
" game state: " +
|
" game state: " +
|
||||||
currentGameStateName)
|
currentGameStateName)
|
||||||
else:
|
else:
|
||||||
currentLoginState = self.loginFSM.getCurrentState()
|
currentLoginState = self.loginFSM.getCurrentState()
|
||||||
if currentLoginState:
|
if currentLoginState:
|
||||||
@ -808,8 +814,8 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
if self.notify.getDebug():
|
if self.notify.getDebug():
|
||||||
print "ClientRepository received datagram:"
|
print "ClientRepository received datagram:"
|
||||||
di.getDatagram().dumpHex(ostream)
|
di.getDatagram().dumpHex(ostream)
|
||||||
|
|
||||||
|
|
||||||
msgType = self.getMsgType()
|
msgType = self.getMsgType()
|
||||||
|
|
||||||
if not wantOtpServer:
|
if not wantOtpServer:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user