parameters: (self)
docstring: Disengage and exit the telescope mode
docstring_summary: Disengage and exit the telescope mode
docstring_tokens: Disengage and exit the telescope mode
function: def IQuitTelescope(self):
          "Disengage and exit the telescope mode"
          global LocalAvatar
          global boolScopeOperator
          # exit everything
          if Vignette.value and Vignette.value != "":
              PtHideDialog(Vignette.value)
          virtCam = ptCamera()
          virtCam.restore(Camera.sceneobject.getKey())
          virtCam.refreshFOV()
          # exit behavior...which is in the next stage
          # ... but just gotoStage the last stage by number because of a bug in the SDL send state
          Behavior.gotoStage(LocalAvatar,2)
          #Behavior.nextStage(LocalAvatar)
          #disable the Control key events
          PtDisableControlKeyEvents(self.key)
          # re-enable the telescope for someone else to use
          boolScopeOperator = 0
          self.SDL["boolOperated"] = (0,)
          self.SDL["OperatorID"] = (-1,)
          #Re-enable first person camera
          virtCam.enableFirstPersonOverride()
          PtAtTimeCallback(self.key,kTimerDisengageTime,kTimerDisengage) # wait for player to finish exit one-shot, then reenable clickable
          PtDebugPrint("tldnVaporScope.IQuitTelescope:\tdelaying clickable reenable")
function_tokens: def IQuitTelescope ( self ) : global LocalAvatar global boolScopeOperator # exit everything if Vignette . value and Vignette . value != "" : PtHideDialog ( Vignette . value ) virtCam = ptCamera ( ) virtCam . restore ( Camera . sceneobject . getKey ( ) ) virtCam . refreshFOV ( ) # exit behavior...which is in the next stage # ... but just gotoStage the last stage by number because of a bug in the SDL send state Behavior . gotoStage ( LocalAvatar , 2 ) #Behavior.nextStage(LocalAvatar) #disable the Control key events PtDisableControlKeyEvents ( self . key ) # re-enable the telescope for someone else to use boolScopeOperator = 0 self . SDL [ "boolOperated" ] = ( 0 , ) self . SDL [ "OperatorID" ] = ( - 1 , ) #Re-enable first person camera virtCam . enableFirstPersonOverride ( ) PtAtTimeCallback ( self . key , kTimerDisengageTime , kTimerDisengage ) # wait for player to finish exit one-shot, then reenable clickable PtDebugPrint ( "tldnVaporScope.IQuitTelescope:\tdelaying clickable reenable" )