Skip to content

Commit a34738e

Browse files
committed
bug fixes
1 parent b7dd0d4 commit a34738e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/core/state.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ void State::write_to_game(Reporter& r, const StateConfig& config, bool hold) con
205205
r.report("CamTilt", raw_ptr::camera_tilt().set(m_camera_tilt));
206206

207207
// extras
208-
r.report("RdBombCD", raw_ptr::round_bomb_cooldown().set(0.0F));
209-
r.report("SqBombCD", raw_ptr::square_bomb_cooldown().set(0.0F));
208+
r.report("RdBombCD", raw_ptr::round_bomb_cooldown().set(360.0F));
209+
r.report("SqBombCD", raw_ptr::square_bomb_cooldown().set(360.0F));
210210
r.report("StasisCD", raw_ptr::stasis_cooldown().set(0.0F));
211211

212212
auto* proc_mgr = ksys::act::BaseProcMgr::instance();

src/core/worker.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ void Worker::do_work() {
6666
Reporter reporter;
6767
get_last_restored_state().write_to_game(reporter, m_config, true);
6868
// we don't report here to reduce spam
69+
// restore every 2 frames so the game has a chance to update
70+
nn::os::YieldThread();
71+
nn::os::SleepThread(nn::TimeSpan::FromNanoSeconds(60 * 1000 * 1000));
6972
}
7073
break;
7174
case Command::RestoreDone:
@@ -249,8 +252,8 @@ void Worker::welcome() {
249252
return;
250253
}
251254
if (m_pos_diff_ticks > 0) {
255+
// y is not checked because of elevator cutscene
252256
if (std::abs(new_pos[0] - m_player_pos[0]) < 0.0001F ||
253-
std::abs(new_pos[1] - m_player_pos[1]) < 0.0001F ||
254257
std::abs(new_pos[2] - m_player_pos[2]) < 0.0001F) {
255258
m_pos_diff_ticks = 0;
256259
return;

0 commit comments

Comments
 (0)