diff options
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c index 4d4787c..7747f78 100644 --- a/src/powder.c +++ b/src/powder.c @@ -929,6 +929,17 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a parts[i].tmp = grule[v+1][9] - 1; parts[i].ctype = v; } + if (t==PT_TRON) + { + int rr,rg,rb; + int randhue = rand()%360; + int randomdir = rand()%4; + HSV_to_RGB(randhue,255,255,&rr,&rg,&rb); + parts[i].dcolour = 255<<24 | rr<<16 | rg<<8 | rb; + parts[i].tmp = 1|(randomdir<<2);//set as a head and a direction + parts[i].tmp2 = 4;//tail + parts[i].life = 5; + } if (t==PT_DEUT) parts[i].life = 10; |
