From f1494107505b0e7f93d90d12d27c858f9eed58f2 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 23 Oct 2022 11:33:20 +1100 Subject: [PATCH] - Duke: New setup for blood splatters against walls, taking full account of the float precision. --- source/games/duke/src/actors_d.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 7ac372291..d84414357 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3002,10 +3002,15 @@ void moveexplosions_d(void) // STATNUM 5 case BLOODSPLAT3: case BLOODSPLAT4: - if (act->temp_data[0] == 7 * 26) continue; - act->spr.pos.Z += 1 / 16. + krandf(1 / 16.); - act->temp_data[0]++; - if ((act->temp_data[0] % 9) == 0) act->spr.scale.Y += (REPEAT_SCALE); + if (act->temp_data[0] < 7 * 26) + { + auto offset = krandf(1); + auto zadj = (1. / 16.); + auto sadj = (1. / 12.) * REPEAT_SCALE; + act->spr.pos.Z += zadj + offset * zadj; + act->spr.scale.Y += sadj + offset * sadj; + act->temp_data[0]++; + } continue; case NUKEBUTTON: