From 85e2516a4277d17250e8e2d80c9271543360bff4 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 1 Oct 2016 00:16:50 -0400 Subject: [PATCH] missed movement code fixes from my mod? b7ef4c8f2b95 --- src/simulation/Simulation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d25c0ed4da..61014fdaab 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -4097,8 +4097,8 @@ void Simulation::UpdateParticles(int start, int end) fin_y = (int)(fin_yf+0.5f); if (edgeMode == 2) { - bool x_ok = (fin_x >= CELL && fin_x < XRES-CELL); - bool y_ok = (fin_y >= CELL && fin_y < YRES-CELL); + bool x_ok = (fin_xf >= CELL-.5f && fin_xf < XRES-CELL-.5f); + bool y_ok = (fin_yf >= CELL-.5f && fin_yf < YRES-CELL-.5f); if (!x_ok) fin_xf = remainder_p(fin_xf-CELL+.5f, XRES-CELL*2.0f)+CELL-.5f; if (!y_ok) @@ -4186,8 +4186,8 @@ void Simulation::UpdateParticles(int start, int end) if (stickman) for (int i = 0; i < 16; i+=2) { - stickman->legs[i] += (nx-oldnx)+.5f; - stickman->legs[i+1] += (ny-oldny)+.5f; + stickman->legs[i] += (nx-oldnx); + stickman->legs[i+1] += (ny-oldny); stickman->accs[i/2] *= .95f; } parts[i].vy *= .95f;