Customize BRAY collision life (#712)
This commit is contained in:
parent
94353a9a3b
commit
0959354178
@ -47,6 +47,7 @@ void Element::Element_ARAY()
|
|||||||
|
|
||||||
static int update(UPDATE_FUNC_ARGS)
|
static int update(UPDATE_FUNC_ARGS)
|
||||||
{
|
{
|
||||||
|
int long_bray_life = parts[i].life > 0 ? parts[i].life : 1020;
|
||||||
for (int rx = -1; rx <= 1; rx++)
|
for (int rx = -1; rx <= 1; rx++)
|
||||||
{
|
{
|
||||||
for (int ry = -1; ry <= 1; ry++)
|
for (int ry = -1; ry <= 1; ry++)
|
||||||
@ -99,7 +100,7 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
case 0:
|
case 0:
|
||||||
if (nyy != 0 || nxx !=0)
|
if (nyy != 0 || nxx !=0)
|
||||||
{
|
{
|
||||||
parts[r].life = 1020; // makes it last a while
|
parts[r].life = long_bray_life; // makes it last a while
|
||||||
parts[r].tmp = 1;
|
parts[r].tmp = 1;
|
||||||
if (!parts[r].ctype) // and colors it if it isn't already
|
if (!parts[r].ctype) // and colors it if it isn't already
|
||||||
parts[r].ctype = colored;
|
parts[r].ctype = colored;
|
||||||
@ -111,7 +112,7 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
break;
|
break;
|
||||||
// long life, reset it
|
// long life, reset it
|
||||||
case 1:
|
case 1:
|
||||||
parts[r].life = 1020;
|
parts[r].life = long_bray_life;
|
||||||
//docontinue = 1;
|
//docontinue = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user