don't send scenario index; it's always zero

This commit is contained in:
Darren Ranalli 2004-11-18 00:02:37 +00:00
parent 0b34d0deb6
commit d0101e74ef
2 changed files with 15 additions and 1 deletions

View File

@ -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()

View File

@ -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