mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
store timeManager
This commit is contained in:
parent
15e2d85115
commit
c279dedce1
@ -63,6 +63,9 @@ class ClientRepositoryBase(ConnectionRepository):
|
||||
# other.
|
||||
self.relatedObjectMgr = RelatedObjectMgr.RelatedObjectMgr(self)
|
||||
|
||||
# This will be filled in when a TimeManager is created.
|
||||
self.timeManager = None
|
||||
|
||||
# Keep track of how recently we last sent a heartbeat message.
|
||||
# We want to keep these coming at heartbeatInterval seconds.
|
||||
self.heartbeatInterval = base.config.GetDouble('heartbeat-interval', 10)
|
||||
|
@ -70,6 +70,7 @@ class TimeManager(DistributedObject.DistributedObject):
|
||||
|
||||
def announceGenerate(self):
|
||||
DistributedObject.DistributedObject.announceGenerate(self)
|
||||
self.cr.timeManager = self
|
||||
self.synchronize("TimeManager.announceGenerate")
|
||||
|
||||
def disable(self):
|
||||
@ -80,6 +81,8 @@ class TimeManager(DistributedObject.DistributedObject):
|
||||
self.ignore('clock_error')
|
||||
self.stopTask()
|
||||
taskMgr.remove('frameRateMonitor')
|
||||
if self.cr.timeManager is self:
|
||||
self.cr.timeManager = None
|
||||
DistributedObject.DistributedObject.disable(self)
|
||||
|
||||
def delete(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user