- Duke: New setup for blood splatters against walls, taking full account of the float precision.

This commit is contained in:
Mitchell Richters 2022-10-23 11:33:20 +11:00 committed by Christoph Oelckers
parent 2fbee8faf5
commit f149410750

View file

@ -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: