mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-29 12:40:01 +01:00
Make TESC create LIGH with same deco color (#901)
This commit is contained in:
parent
66a09ababd
commit
b711b2935b
@ -1,5 +1,7 @@
|
||||
#include "simulation/ElementCommon.h"
|
||||
|
||||
#include "graphics/Pixel.h"
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
static void create(ELEMENT_CREATE_FUNC_ARGS);
|
||||
@ -195,6 +197,7 @@ static bool create_LIGH(Simulation * sim, int x, int y, int c, float temp, int l
|
||||
{
|
||||
sim->parts[p].temp = float(temp);
|
||||
sim->parts[p].tmp = tmp;
|
||||
sim->parts[p].dcolour = sim->parts[i].dcolour;
|
||||
if (last)
|
||||
{
|
||||
int nextSegmentLife = (int)(life/1.5 - sim->rng.between(0, 1));
|
||||
@ -299,7 +302,7 @@ static int graphics(GRAPHICS_FUNC_ARGS)
|
||||
*firer = *colr = 235;
|
||||
*fireg = *colg = 245;
|
||||
*fireb = *colb = 255;
|
||||
*pixel_mode |= PMODE_GLOW | FIRE_ADD;
|
||||
*pixel_mode |= PMODE_GLOW | FIRE_ADD | DECO_FIRE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,7 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
parts[p].temp=parts[p].life*parts[i].tmp/2.5;
|
||||
parts[p].tmp2=1;
|
||||
parts[p].tmp=int(atan2(-ry, (float)rx)/TPT_PI_FLT*360);
|
||||
parts[p].dcolour = parts[i].dcolour;
|
||||
parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling
|
||||
if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user