Permalink
Browse files

fix occasional issue where deleting the particle RAYT is detecting wo…

…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 d2e0986bf6c2d05b8ce4909fbd1e5ee0a32d1c47
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/simulation/elements/RAYT.cpp
@@ -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.

1 comment on commit d2e0986

@moonheart08

This comment has been minimized.

Contributor

moonheart08 commented on d2e0986 Apr 30, 2018

Oops.

Please sign in to comment.