mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
field query response; formatting
This commit is contained in:
parent
82fa7ab1e4
commit
20f4cf63c0
@ -456,7 +456,7 @@ class ClientRepository(ConnectionRepository):
|
|||||||
# Find the DO
|
# Find the DO
|
||||||
|
|
||||||
do = self.doId2do.get(doId)
|
do = self.doId2do.get(doId)
|
||||||
if (do != None):
|
if do is not None:
|
||||||
# Let the dclass finish the job
|
# Let the dclass finish the job
|
||||||
do.dclass.receiveUpdate(do, di)
|
do.dclass.receiveUpdate(do, di)
|
||||||
else:
|
else:
|
||||||
@ -537,6 +537,8 @@ class ClientRepository(ConnectionRepository):
|
|||||||
self.handleGenerateWithRequiredOther(di)
|
self.handleGenerateWithRequiredOther(di)
|
||||||
elif msgType == CLIENT_DONE_INTEREST_RESP:
|
elif msgType == CLIENT_DONE_INTEREST_RESP:
|
||||||
self.handleInterestDoneMessage(di)
|
self.handleInterestDoneMessage(di)
|
||||||
|
elif msgType == CLIENT_QUERY_ONE_FIELD_RESP:
|
||||||
|
self.handleQueryOneFieldResp(di)
|
||||||
elif msgType == CLIENT_OBJECT_LOCATION:
|
elif msgType == CLIENT_OBJECT_LOCATION:
|
||||||
self.handleObjectLocation(di)
|
self.handleObjectLocation(di)
|
||||||
else:
|
else:
|
||||||
@ -576,20 +578,21 @@ class ClientRepository(ConnectionRepository):
|
|||||||
" game state: " +
|
" game state: " +
|
||||||
currentGameStateName)
|
currentGameStateName)
|
||||||
|
|
||||||
|
|
||||||
def createWithRequired(self, className, zoneId = 0, optionalFields=None):
|
def createWithRequired(self, className, zoneId = 0, optionalFields=None):
|
||||||
# This method is only used in conjunction with the CMU LAN
|
# This method is only used in conjunction with the CMU LAN
|
||||||
# server.
|
# server.
|
||||||
|
|
||||||
if (self.DOIDnext >= self.DOIDlast):
|
if self.DOIDnext >= self.DOIDlast:
|
||||||
self.notify.error("Cannot allocate a distributed object ID: all IDs used up.")
|
self.notify.error(
|
||||||
|
"Cannot allocate a distributed object ID: all IDs used up.")
|
||||||
return None
|
return None
|
||||||
id = self.DOIDnext
|
id = self.DOIDnext
|
||||||
self.DOIDnext = self.DOIDnext + 1
|
self.DOIDnext = self.DOIDnext + 1
|
||||||
dclass = self.dclassesByName[className]
|
dclass = self.dclassesByName[className]
|
||||||
classDef = dclass.getClassDef()
|
classDef = dclass.getClassDef()
|
||||||
if classDef == None:
|
if classDef == None:
|
||||||
self.notify.error("Could not create an undefined %s object." % (dclass.getName()))
|
self.notify.error("Could not create an undefined %s object." % (
|
||||||
|
dclass.getName()))
|
||||||
obj = classDef(self)
|
obj = classDef(self)
|
||||||
obj.dclass = dclass
|
obj.dclass = dclass
|
||||||
obj.zone = zoneId
|
obj.zone = zoneId
|
||||||
@ -668,7 +671,8 @@ class ClientRepository(ConnectionRepository):
|
|||||||
return doDict
|
return doDict
|
||||||
|
|
||||||
if wantOtpServer:
|
if wantOtpServer:
|
||||||
def sendEmulateSetZone(self, zoneId, visibleZoneList=None, parentIdin=None, event=None):
|
def sendEmulateSetZone(self, zoneId, visibleZoneList=None,
|
||||||
|
parentIdin=None, event=None):
|
||||||
"""
|
"""
|
||||||
This Will Move The avatar and set an interest to that location ..
|
This Will Move The avatar and set an interest to that location ..
|
||||||
"""
|
"""
|
||||||
@ -686,9 +690,11 @@ class ClientRepository(ConnectionRepository):
|
|||||||
InterestZones = visibleZoneList
|
InterestZones = visibleZoneList
|
||||||
|
|
||||||
if(self.old_setzone_interest_handle == None):
|
if(self.old_setzone_interest_handle == None):
|
||||||
self.old_setzone_interest_handle = self.addInterest(parentId, InterestZones, "OldSetZone Imulator", event)
|
self.old_setzone_interest_handle = self.addInterest(
|
||||||
|
parentId, InterestZones, "OldSetZone Imulator", event)
|
||||||
else:
|
else:
|
||||||
self.alterInterest(self.old_setzone_interest_handle,parentId, InterestZones, "OldSetZone Imulator", event)
|
self.alterInterest(self.old_setzone_interest_handle,
|
||||||
|
parentId, InterestZones, "OldSetZone Imulator", event)
|
||||||
|
|
||||||
def sendEmulateSetZoneOff(self):
|
def sendEmulateSetZoneOff(self):
|
||||||
MyAvID = base.localAvatar.doId
|
MyAvID = base.localAvatar.doId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user