From 51dc9103595a6cdeb1d700f9ce504681586b2634 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Fri, 1 Aug 2025 13:28:53 +0200 Subject: [PATCH] fastforward test in main --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2466406..f3b902b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -111,19 +111,21 @@ int main(int argc, char** argv) { renderer.AddRenderer(cam, w); renderer.AddRenderer(cam, w); - cam.SetCamPos({77, 5, 13}); + cam.SetCamPos({77, 10, 13}); cam.UpdatePerspective(display.GetAspectRatio()); - td::sim::RealTimeSimulation simulation(w, 500); + td::sim::RealTimeSimulation simulation(w, 50); display.OnKeyDown.Connect([&simulation](SDL_Keycode key) { + static int counter = 0; if (key == SDLK_A) { auto spawn = td::protocol::CommandPtr( std::make_shared(0, 0, td::Vec2fp{td::FpFloat(77), td::FpFloat(13)}, 0)); std::array steps{}; steps[0].push_back(spawn); - td::protocol::packets::LockStepsPacket packet{0, steps}; + td::protocol::packets::LockStepsPacket packet{counter * LOCKSTEP_BUFFER_SIZE * 3, steps}; simulation.HandlePacket(packet); + counter++; } });