HETR and COLR

  • Videogamer555
    18th May 2012 Member 2 Permalink
    My mod is going to have heater and cooloer elements. They are fixed temp elements that force anything in contact with them to 9999k and 0k respectively. Also various "states of matter" forms will exist including solid, powder, liquid and gas.
    The heater ones are gonna be great for WMD, LOL!

    The main code for these are for heater:int update_HETR(UPDATE_FUNC_ARGS) {
    int xr, yr, r;
    for (yr=-1;yr<2;yr++){
    for (xr=-1;xr<2;xr++){
    r=pmap[y+yr][x+xr];
    if (r){
    parts[r>>8].temp=9999.0f;
    }
    }
    }
    return 0;
    }


    and for cooler:int update_COLR(UPDATE_FUNC_ARGS) {
    int xr, yr, r;
    for (yr=-1;yr<2;yr++){
    for (xr=-1;xr<2;xr++){
    r=pmap[y+yr][x+xr];
    if (r){
    parts[r>>8].temp=0.0f;
    }
    }
    }
    return 0;
    }
  • yangbowen1
    18th May 2012 Member 0 Permalink
    Why not make a single particle HETR and it force anything in contact with them to its temperature, and make HETR an insluator like WIFI?Like this:

    int update_HETR(UPDATE_FUNC_ARGS) {
    int xr, yr, r;
    for (yr=-1;yr<2;yr++){
    for (xr=-1;xr<2;xr++){
    r=pmap[y+yr][x+xr];
    if (r){
    parts[r>>8].temp=parts[i].temp;
    }
    }
    }
    return 0;
    }
  • vanquish349
    18th May 2012 Member 2 Permalink
    @Videogamer555 (View Post)
    and why are you telling us this? this shit is all in the wiki.
  • Fast-Driver
    18th May 2012 Member 1 Permalink
    @Videogamer555 (View Post)
    This is from the Wiki....
    @vanquish349 (View Post)
    Exactly.
  • tommig
    18th May 2012 Member 1 Permalink
    @Videogamer555 (View Post)
    Yeh, I made one in the first version of my mod. It's the tutorial element...
  • Videogamer555
    18th May 2012 Member 0 Permalink

    Fast-Driver:

    @Videogamer555 (View Post)
    This is from the Wiki....
    @vanquish349 (View Post)
    Exactly.

    My version is different and is shorter code that has the same effect. Also I added cooler, not just heater. And I added multiple versions (including solid, and powder, etc). So mine is a better version than in the wiki.
  • vanquish349
    19th May 2012 Member 1 Permalink
    @Videogamer555 (View Post)
    so what the fuck is the difference, shorter doesn't mean better, states is fucking easy to change and temperature is easy as well.
  • me4502
    19th May 2012 Member 0 Permalink
    @Videogamer555 (View Post)
    Bravo... that is the hardest thing to do /sarcasm
  • Fast-Driver
    19th May 2012 Member 1 Permalink
    @vanquish349 (View Post)
    @me4502 (View Post)
    Although I agree, let's not argue. If that's what he wants, let him do it. If you don't like it, let it be.