mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
renamed some funcs to comply with standards
This commit is contained in:
parent
d40eb90d62
commit
9d44c1a374
@ -57,7 +57,7 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
## Top level Interest Manager
|
## Top level Interest Manager
|
||||||
##
|
##
|
||||||
self.__interest_id_assign = 1
|
self.__interest_id_assign = 1
|
||||||
self.__interesthash = {}
|
self.__interests = {}
|
||||||
|
|
||||||
|
|
||||||
def abruptCleanup(self):
|
def abruptCleanup(self):
|
||||||
@ -636,61 +636,57 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||||||
# If we're processing a lot of datagrams within one frame, we
|
# If we're processing a lot of datagrams within one frame, we
|
||||||
# may forget to send heartbeats. Keep them coming!
|
# may forget to send heartbeats. Keep them coming!
|
||||||
self.considerHeartbeat()
|
self.considerHeartbeat()
|
||||||
|
|
||||||
if wantOtpServer:
|
if wantOtpServer:
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
## interest managment
|
## interest managment
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
def InterestAdd(self, parentId, zoneId, Description):
|
def addInterest(self, parentId, zoneId, description):
|
||||||
"""
|
"""
|
||||||
Part of the new otp-server code.
|
Part of the new otp-server code.
|
||||||
"""
|
"""
|
||||||
self.__interest_id_assign += 1
|
self.__interest_id_assign += 1
|
||||||
self.__interesthash[self.__interest_id_assign] = Description
|
self.__interests[self.__interest_id_assign] = description
|
||||||
contextId = self.__interest_id_assign
|
contextId = self.__interest_id_assign
|
||||||
self.__sendAddInterest(contextId, parentId, zoneId)
|
self.__sendAddInterest(contextId, parentId, zoneId)
|
||||||
self.DumpInterests()
|
self.printInterests()
|
||||||
return contextId
|
return contextId
|
||||||
|
|
||||||
def InterestRemove(self, contextId):
|
def removeInterest(self, contextId):
|
||||||
"""
|
"""
|
||||||
Part of the new otp-server code.
|
Part of the new otp-server code.
|
||||||
"""
|
"""
|
||||||
answer = 0
|
answer = 0
|
||||||
if self.__interesthash.has_key(contextId):
|
if self.__interests.has_key(contextId):
|
||||||
self.__sendRemoveInterest(contextId)
|
self.__sendRemoveInterest(contextId)
|
||||||
del self.__interesthash[contextId]
|
del self.__interests[contextId]
|
||||||
answer = 1
|
answer = 1
|
||||||
|
self.printInterests()
|
||||||
self.DumpInterests()
|
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
|
def alterInterest(self, contextId, parentId, zoneId, description):
|
||||||
def InterestAlter(self, contextId, parentId, zoneId, Description):
|
|
||||||
"""
|
"""
|
||||||
Part of the new otp-server code.
|
Part of the new otp-server code.
|
||||||
Removes old and adds new..
|
Removes old and adds new..
|
||||||
"""
|
"""
|
||||||
answer = 0
|
answer = 0
|
||||||
if self.__interesthash.has_key(contextId):
|
if self.__interests.has_key(contextId):
|
||||||
self.__interesthash[contextId] = Description
|
self.__interests[contextId] = description
|
||||||
self.__sendAlterInterest(contextId, parentId, zoneId)
|
self.__sendAlterInterest(contextId, parentId, zoneId)
|
||||||
answer = 1
|
answer = 1
|
||||||
|
self.printInterests()
|
||||||
self.DumpInterests()
|
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
def DumpInterests(self):
|
def printInterests(self):
|
||||||
"""
|
"""
|
||||||
Part of the new otp-server code.
|
Part of the new otp-server code.
|
||||||
"""
|
"""
|
||||||
print "*********************** Interest Sets **************"
|
print "*********************** Interest Sets **************"
|
||||||
for i in self.__interesthash.keys():
|
for i in self.__interests.keys():
|
||||||
print "Interest ID:%s, Description=%s"%(i,self.__interesthash[i])
|
print "Interest ID:%s, Description=%s"%(i,self.__interests[i])
|
||||||
print "****************************************************"
|
print "****************************************************"
|
||||||
|
|
||||||
|
|
||||||
def __sendAddInterest(self, contextId, parentId, zoneId):
|
def __sendAddInterest(self, contextId, parentId, zoneId):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user