From ade049b29d87d279f0b9e29f98fa3c9edc628439 Mon Sep 17 00:00:00 2001 From: WiseDev <83840010+wisedevik@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:47:34 +0300 Subject: [PATCH] write the tick the client writes the leading vint of the game mode is not a field of its own. the client loads it straight out of LogicTime at gameMode+0x60 and then encodes LogicTime immediately after, so the same number goes out twice and the two cannot drift. we kept a separate server_tick that the session never advanced, so it stayed at zero while the clock ran - a divergence in the checksum that had nothing to do with the simulation. the field is gone and the tick comes from LogicTime. --- crates/logic/src/battle/logic_game_mode.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/logic/src/battle/logic_game_mode.rs b/crates/logic/src/battle/logic_game_mode.rs index facac68..effece9 100644 --- a/crates/logic/src/battle/logic_game_mode.rs +++ b/crates/logic/src/battle/logic_game_mode.rs @@ -8,7 +8,6 @@ pub const SECTION_BATTLE: i32 = 11; pub const SECTION_TUTORIAL: i32 = 12; #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct LogicGameMode { - pub server_tick: i32, pub time: LogicTime, pub random: LogicRandom, pub random_seed: i32, @@ -25,7 +24,7 @@ impl LogicGameMode { } impl LogicGameMode { pub fn write(&self, writer: &mut ByteStreamWriter, with_commands: bool) -> Result<()> { - writer.write_vint(self.server_tick); + writer.write_vint(self.time.tick); writer.write_checksum_checkpoint(); writer.write_vint(SECTION_BATTLE); self.time.encode(writer)?;