Fix crash on SPRK(ctype=0) being killed by PROT (#344)
This commit is contained in:
parent
ef9ef5bbce
commit
4aa58d6c0c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user