Skip to content

Commit

Permalink
fix osr
Browse files Browse the repository at this point in the history
  • Loading branch information
forteus19 committed Oct 29, 2023
1 parent 817f655 commit bed33cd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bot/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ impl Macro {
cursor.set_position(cursor.position() + str_len);
}

cursor.set_position(cursor.position() + 20); // skip 8 bytes
cursor.set_position(cursor.position() + 19);
let mods = cursor.read_i32::<LittleEndian>()?;
let speed;
if mods & (1 << 6) != 0 {
Expand Down Expand Up @@ -647,10 +647,14 @@ impl Macro {
let params = entry.split('|');
let vec_params = params.collect::<Vec<&str>>();
let delta_time = vec_params[0].parse::<i64>()?;
if delta_time == -12345 {
// -12345 is reserved for the rng seed of the replay
continue;
}
current_time += delta_time;
let time = (current_time as f32 * speed) / self.fps;
let time = current_time as f32 / self.fps / speed;

let keys = vec_params[1].parse::<i32>()?;
let keys = vec_params[3].parse::<i32>()?;

if keys & (1 << 0) != 0 {
// m1
Expand Down

0 comments on commit bed33cd

Please sign in to comment.