Skip to content

Commit

Permalink
fix occasional issue where deleting the particle RAYT is detecting wo…
Browse files Browse the repository at this point in the history
…uld delete the particle it is sparking instead

only happened when unpaused and only if the spark was in a certain state. part_change_type was called with the wrong coordinates, which confused pmap and put the sparked particle on top of pmap in the detected particle for a frame
  • Loading branch information
jacob1 committed Apr 29, 2018
1 parent 67132c9 commit d2e0986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/elements/RAYT.cpp
Expand Up @@ -130,7 +130,7 @@ int Element_RAYT::update(UPDATE_FUNC_ARGS)
{
parts[ID(r)].life = 4;
parts[ID(r)].ctype = TYP(r);
sim->part_change_type(ID(r), xCurrent, yCurrent, PT_SPRK);
sim->part_change_type(ID(r), x + rx, y + ry, PT_SPRK);
break;
}
// room for more conditions here.
Expand Down

1 comment on commit d2e0986

@moonheart08
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

Please sign in to comment.