def setPlaybackSpeedIdx(self, value): if self.isTimeWarpInProgress: return else: self.__savedPlaybackSpeedIdx = self.__playbackSpeedIdx self.__playbackSpeedIdx = value newSpeed = self.__playbackSpeedModifiers[self.__playbackSpeedIdx] self.__enableInGameEffects(0.0 < newSpeed < 8.0) g_replayEvents.onMuteSound(newSpeed == 0.0) player = BigWorld.player() if newSpeed != self.__replayCtrl.playbackSpeed: if newSpeed == 0: if player.gunRotator is not None: self.__gunWasLockedBeforePause = player.gunRotator._VehicleGunRotator__isLocked player.gunRotator.lock(True) self.__showInfoMessage('replayPaused') isPaused = True else: if player.gunRotator is not None: player.gunRotator.lock(self.__gunWasLockedBeforePause) newSpeedStr = self.__playbackSpeedModifiersStr[ self.__playbackSpeedIdx] self.__showInfoMessage('replaySpeedChange', {'speed': newSpeedStr}) isPaused = False self.__replayCtrl.playbackSpeed = newSpeed g_replayEvents.onPause(isPaused) return
def setPlaybackSpeedIdx(self, value): if self.isTimeWarpInProgress: return else: self.__savedPlaybackSpeedIdx = self.__playbackSpeedIdx self.__playbackSpeedIdx = value newSpeed = self.__playbackSpeedModifiers[self.__playbackSpeedIdx] self.__enableInGameEffects(0.0 < newSpeed < 8.0) g_replayEvents.onMuteSound(newSpeed == 0.0) player = BigWorld.player() if newSpeed != self.__replayCtrl.playbackSpeed: if newSpeed == 0: if player.gunRotator is not None: self.__gunWasLockedBeforePause = player.gunRotator._VehicleGunRotator__isLocked player.gunRotator.lock(True) self.__showInfoMessage('replayPaused') isPaused = True else: if player.gunRotator is not None: player.gunRotator.lock(self.__gunWasLockedBeforePause) newSpeedStr = self.__playbackSpeedModifiersStr[self.__playbackSpeedIdx] self.__showInfoMessage('replaySpeedChange', {'speed': newSpeedStr}) isPaused = False self.__replayCtrl.playbackSpeed = newSpeed g_replayEvents.onPause(isPaused) return
def setPlaybackSpeedIdx(self, value, arenaLoaded=False): if self.isTimeWarpInProgress and not arenaLoaded: return self.__savedPlaybackSpeedIdx = self.__playbackSpeedIdx self.__playbackSpeedIdx = value newSpeed = self.__playbackSpeedModifiers[self.__playbackSpeedIdx] self.__enableInGameEffects(0.0 < newSpeed < 8.0 and not self.__forceEffectDisable) g_replayEvents.onMuteSound(newSpeed == 0.0 or self.__forceEffectDisable) player = BigWorld.player() if newSpeed != self.__replayCtrl.playbackSpeed: if newSpeed == 0: self.__gunWasLockedBeforePause = player.gunRotator._VehicleGunRotator__isLocked player.gunRotator.lock(True) self.__showInfoMessage('replayPaused') g_replayEvents.onPause(True) else: player.gunRotator.lock(self.__gunWasLockedBeforePause) newSpeedStr = self.__playbackSpeedModifiersStr[ self.__playbackSpeedIdx] self.__showInfoMessage('replaySpeedChange', {'speed': newSpeedStr}) g_replayEvents.onPause(False) self.__replayCtrl.playbackSpeed = newSpeed if self.__replayCtrl.playbackSpeed == 0: BigWorld.callback(0, self.__updateAim)
def setPlaybackSpeedIdx(self, value, arenaLoaded = False): if self.isTimeWarpInProgress and not arenaLoaded: return self.__savedPlaybackSpeedIdx = self.__playbackSpeedIdx self.__playbackSpeedIdx = value newSpeed = self.__playbackSpeedModifiers[self.__playbackSpeedIdx] self.__enableInGameEffects(0.0 < newSpeed < 8.0 and not self.__forceEffectDisable) g_replayEvents.onMuteSound(newSpeed == 0.0 or self.__forceEffectDisable) player = BigWorld.player() if newSpeed != self.__replayCtrl.playbackSpeed: if newSpeed == 0: self.__gunWasLockedBeforePause = player.gunRotator._VehicleGunRotator__isLocked player.gunRotator.lock(True) self.__showInfoMessage('replayPaused') g_replayEvents.onPause(True) else: player.gunRotator.lock(self.__gunWasLockedBeforePause) newSpeedStr = self.__playbackSpeedModifiersStr[self.__playbackSpeedIdx] self.__showInfoMessage('replaySpeedChange', {'speed': newSpeedStr}) g_replayEvents.onPause(False) self.__replayCtrl.playbackSpeed = newSpeed if self.__replayCtrl.playbackSpeed == 0: BigWorld.callback(0, self.__updateAim)