mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
don't send scenario index; it's always zero
This commit is contained in:
parent
0b34d0deb6
commit
d0101e74ef
@ -63,6 +63,7 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
)
|
||||
self.zonesEnteredList = []
|
||||
self.fColorZones = 0
|
||||
self.scenarioIndex = 0
|
||||
|
||||
def generate(self):
|
||||
DistributedLevel.notify.debug('generate')
|
||||
@ -118,6 +119,15 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
DistributedLevel.notify.debug('setStartTimestamp: %s' % timestamp)
|
||||
self.startTime = globalClockDelta.networkToLocalTime(timestamp,bits=32)
|
||||
|
||||
# ugly hack: we treat a few DC fields as if they were required,
|
||||
# and use 'levelAnnounceGenerate()' in place of regular old
|
||||
# announceGenerate(). Note that we have to call
|
||||
# gotAllRequired() in the last 'faux-required' DC update
|
||||
# handler. If you add another field, move this to the last one.
|
||||
self.privGotAllRequired()
|
||||
|
||||
"""
|
||||
# this is no longer used
|
||||
def setScenarioIndex(self, scenarioIndex):
|
||||
self.scenarioIndex = scenarioIndex
|
||||
|
||||
@ -127,6 +137,7 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
# gotAllRequired() in the last 'faux-required' DC update
|
||||
# handler. If you add another field, move this to the last one.
|
||||
self.privGotAllRequired()
|
||||
"""
|
||||
|
||||
def privGotAllRequired(self):
|
||||
self.levelAnnounceGenerate()
|
||||
|
@ -40,7 +40,10 @@ class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI,
|
||||
|
||||
self.sendUpdate('setZoneIds', [self.zoneIds])
|
||||
self.sendUpdate('setStartTimestamp', [self.startTimestamp])
|
||||
self.sendUpdate('setScenarioIndex', [self.scenarioIndex])
|
||||
# this is no longer used
|
||||
#self.sendUpdate('setScenarioIndex', [self.scenarioIndex])
|
||||
if __dev__:
|
||||
assert self.scenarioIndex == 0
|
||||
|
||||
def getLevelZoneId(self):
|
||||
"""no entities should be generated in the level's zone; it causes
|
||||
|
Loading…
x
Reference in New Issue
Block a user