mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
increasing interestSettled event wait from 3 to 5 frames
This commit is contained in:
parent
b9e7875e96
commit
bee9436134
@ -158,9 +158,9 @@ class DoInterestManager(DirectObject.DirectObject):
|
|||||||
"""
|
"""
|
||||||
Look into a (set of) zone(s).
|
Look into a (set of) zone(s).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
assert DoInterestManager.notify.debugCall()
|
assert DoInterestManager.notify.debugCall()
|
||||||
handle = self._getNextHandle()
|
handle = self._getNextHandle()
|
||||||
|
# print 'base.cr.addInterest(',description,',',handle,'):',globalClock.getFrameCount()
|
||||||
if self._noNewInterests:
|
if self._noNewInterests:
|
||||||
DoInterestManager.notify.warning(
|
DoInterestManager.notify.warning(
|
||||||
"addInterest: addingInterests on delete: %s" % (handle))
|
"addInterest: addingInterests on delete: %s" % (handle))
|
||||||
@ -232,6 +232,8 @@ class DoInterestManager(DirectObject.DirectObject):
|
|||||||
"""
|
"""
|
||||||
Stop looking in a (set of) zone(s)
|
Stop looking in a (set of) zone(s)
|
||||||
"""
|
"""
|
||||||
|
# print 'base.cr.removeInterest(',handle,'):',globalClock.getFrameCount()
|
||||||
|
|
||||||
assert DoInterestManager.notify.debugCall()
|
assert DoInterestManager.notify.debugCall()
|
||||||
assert isinstance(handle, InterestHandle)
|
assert isinstance(handle, InterestHandle)
|
||||||
existed = False
|
existed = False
|
||||||
@ -537,12 +539,13 @@ class DoInterestManager(DirectObject.DirectObject):
|
|||||||
self._completeDelayedCallback.destroy()
|
self._completeDelayedCallback.destroy()
|
||||||
self._completeDelayedCallback = None
|
self._completeDelayedCallback = None
|
||||||
|
|
||||||
def queueAllInterestsCompleteEvent(self, frames=3):
|
def queueAllInterestsCompleteEvent(self, frames=5):
|
||||||
# wait for N frames, if no new interests, send out all-done event
|
# wait for N frames, if no new interests, send out all-done event
|
||||||
# calling this is OK even if there are no pending interest completes
|
# calling this is OK even if there are no pending interest completes
|
||||||
def checkMoreInterests():
|
def checkMoreInterests():
|
||||||
# if there are new interests, cancel this delayed callback, another
|
# if there are new interests, cancel this delayed callback, another
|
||||||
# will automatically be scheduled when all interests complete
|
# will automatically be scheduled when all interests complete
|
||||||
|
# print 'checkMoreInterests(',self._completeEventCount.num,'):',globalClock.getFrameCount()
|
||||||
return self._completeEventCount.num > 0
|
return self._completeEventCount.num > 0
|
||||||
def sendEvent():
|
def sendEvent():
|
||||||
messenger.send(self.getAllInterestsCompleteEvent())
|
messenger.send(self.getAllInterestsCompleteEvent())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user