From 59037b66ecd14ee48f24254e6443e1b03f1bf22f Mon Sep 17 00:00:00 2001 From: Vishal Date: Sun, 24 Dec 2023 18:24:32 +0530 Subject: [PATCH] Add files via upload --- src/ballistica/scene_v1/support/scene_v1_app_mode.cc | 10 +++++++++- src/ballistica/scene_v1/support/scene_v1_app_mode.h | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/ballistica/scene_v1/support/scene_v1_app_mode.cc b/src/ballistica/scene_v1/support/scene_v1_app_mode.cc index 72cfdbd2..bfae4cec 100644 --- a/src/ballistica/scene_v1/support/scene_v1_app_mode.cc +++ b/src/ballistica/scene_v1/support/scene_v1_app_mode.cc @@ -1224,6 +1224,14 @@ void SceneV1AppMode::SetReplaySpeedExponent(int val) { replay_speed_mult_ = powf(2.0f, static_cast(replay_speed_exponent_)); } +void SceneV1AppMode::PauseReplay() { + replay_paused_ = true; +} + +void SceneV1AppMode::ResumeReplay() { + replay_paused_ = false; +} + void SceneV1AppMode::SetDebugSpeedExponent(int val) { debug_speed_exponent_ = val; debug_speed_mult_ = powf(2.0f, static_cast(debug_speed_exponent_)); @@ -1479,4 +1487,4 @@ void SceneV1AppMode::RunMainMenu() { } } -} // namespace ballistica::scene_v1 +} // namespace ballistica::scene_v1 \ No newline at end of file diff --git a/src/ballistica/scene_v1/support/scene_v1_app_mode.h b/src/ballistica/scene_v1/support/scene_v1_app_mode.h index a3310535..c375fab1 100644 --- a/src/ballistica/scene_v1/support/scene_v1_app_mode.h +++ b/src/ballistica/scene_v1/support/scene_v1_app_mode.h @@ -96,11 +96,14 @@ class SceneV1AppMode : public base::AppMode { auto debug_speed_mult() const -> float { return debug_speed_mult_; } auto replay_speed_exponent() const -> int { return replay_speed_exponent_; } auto replay_speed_mult() const -> float { return replay_speed_mult_; } + auto is_replay_paused() const -> bool { return replay_paused_; } void OnScreenSizeChange() override; auto kick_idle_players() const -> bool { return kick_idle_players_; } void LanguageChanged() override; void SetDebugSpeedExponent(int val); void SetReplaySpeedExponent(int val); + void PauseReplay(); + void ResumeReplay(); void set_admin_public_ids(const std::set& ids) { admin_public_ids_ = ids; } @@ -223,6 +226,7 @@ class SceneV1AppMode : public base::AppMode { bool game_roster_dirty_{}; bool kick_vote_in_progress_{}; bool kick_voting_enabled_{true}; + bool replay_paused_{false}; cJSON* game_roster_{}; millisecs_t last_game_roster_send_time_{}; @@ -264,4 +268,4 @@ class SceneV1AppMode : public base::AppMode { } // namespace ballistica::scene_v1 -#endif // BALLISTICA_SCENE_V1_SUPPORT_SCENE_V1_APP_MODE_H_ +#endif // BALLISTICA_SCENE_V1_SUPPORT_SCENE_V1_APP_MODE_H_ \ No newline at end of file