Let ARAY control the life of all normal BRAY it spawns

This commit is contained in:
Tamás Bálint Misius 2020-10-07 10:56:58 +02:00
parent 6052ef6179
commit 02468d0786
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -47,6 +47,7 @@ void Element::Element_ARAY()
static int update(UPDATE_FUNC_ARGS)
{
int short_bray_life = parts[i].life > 0 ? parts[i].life : 30;
int long_bray_life = parts[i].life > 0 ? parts[i].life : 1020;
for (int rx = -1; rx <= 1; rx++)
{
@ -83,7 +84,10 @@ static int update(UPDATE_FUNC_ARGS)
parts[nr].life = 2;
}
else
{
parts[nr].ctype = colored;
parts[nr].life = short_bray_life;
}
parts[nr].temp = parts[i].temp;
if (isBlackDeco)
parts[nr].dcolour = 0xFF000000;