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++; } });