what code to use?

  • sillu129
    19th Dec 2010 Member 0 Permalink
    what code i have to use to make thing burn so that there will be more fire particles
    i use this code right now but i want more flames else if

    (t==PT_THRS)
    {
    for(nx=-2; nx<3; nx++)
    for(ny=-2; ny<3; ny++)
    if(x+nx>=0 && y+ny>0 && x+nx<XRES && y+ny<YRES && (nx || ny))
    {
    r = pmap[y+ny][x+nx];
    if((r>>8)>=NPART || !r)
    continue;
    if(((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA))
    {
    if(1>(rand()%100)) {
    t = parts[i].type = PT_FIRE;
    parts[i].ctype = PT_SMKE;
    pt = parts[i].temp = 1500.0f;
    pv[y/CELL][x/CELL] += 20000.0f;
    } else {
    t = parts[i].type = PT_SMKE;
    parts[i].life = 400;
    parts[i].ctype = PT_SMKE;
    pt = parts[i].temp = 1500.0f;
    parts[i].tmp = 420;
    }
    }
    //if(t==PT_LO2 && (r&0xFF)==PT_O2 && 15>(rand()%10))
    //t = parts[i].type = PT_O2;
    }
    }