fix occasional issue where deleting the particle RAYT is detecting would 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
This commit is contained in:
jacob1 2018-04-29 00:48:53 -04:00
parent 67132c9925
commit d2e0986bf6

View File

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