mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
preserve token hash value even after invalidation
This commit is contained in:
parent
823340c46c
commit
9b78bad94d
@ -9,6 +9,7 @@ class InputStateToken:
|
||||
Inval = 'invalidatedToken'
|
||||
def __init__(self, inputState):
|
||||
self._id = InputStateToken._SerialGen.next()
|
||||
self._hash = self._id
|
||||
self._inputState = inputState
|
||||
def release(self):
|
||||
# subclasses will override
|
||||
@ -18,7 +19,7 @@ class InputStateToken:
|
||||
def invalidate(self):
|
||||
self._id = InputStateToken.Inval
|
||||
def __hash__(self):
|
||||
return self._id
|
||||
return self._hash
|
||||
|
||||
class InputStateWatchToken(InputStateToken, DirectObject.DirectObject):
|
||||
def release(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user