Fix crash on SPRK(ctype=0) being killed by PROT (#344)

This commit is contained in:
Tamás Bálint Misius 2016-10-07 15:37:25 +02:00 committed by jacob1
parent ef9ef5bbce
commit 4aa58d6c0c

View File

@ -57,7 +57,7 @@ int Element_PROT::update(UPDATE_FUNC_ARGS)
{
//remove active sparks
int sparked = parts[under>>8].ctype;
if (sparked >= 0 && sparked < PT_NUM && sim->elements[sparked].Enabled)
if (sparked > 0 && sparked < PT_NUM && sim->elements[sparked].Enabled)
{
sim->part_change_type(under>>8, x, y, sparked);
parts[under>>8].life = 44 + parts[under>>8].life;