1

Topic: [QUESTION] cl_flow ?

Does anyone know what the cl_flow setting does? I tried google, forum search and I even took a peek at the source, which unfortunately doesn't provide much information about the flow component (no comments whatsoever).

Thanks!

2

Re: [QUESTION] cl_flow ?

icemaze wrote:

Does anyone know what the cl_flow setting does? I tried google, forum search and I even took a peek at the source, which unfortunately doesn't provide much information about the flow component (no comments whatsoever).

Thanks!

Hey This is the most I could find, by using Google. TeeWorld's Docs - Client Settings.

http://grab.by/QK4

Wanna know more about me?: Google Profile

3

Re: [QUESTION] cl_flow ?

Coil wrote:

Hey This is the most I could find, by using Google.

Exactly: not incredibly informative, is it? I tried enabling it but I couldn't notice any difference. Either it's something subtle, or I'm half-blind.

4 (edited by Lanta 2009-11-28 19:11:07)

Re: [QUESTION] cl_flow ?

gc_flow.cpp
I've analysed a bit the code.

void flow_update()
{
    if(!config.cl_flow)
        return;
       
    for(int y = 0; y < height; y++)
        for(int x = 0; x < width; x++)
            cells[y*width+x].vel *= 0.85f;
}

void flow_dbg_render()
{
    if(!config.cl_flow)
        return;

    gfx_texture_set(-1);
    gfx_lines_begin();
    for(int y = 0; y < height; y++)
        for(int x = 0; x < width; x++)
        {
            vec2 pos(x*spacing, y*spacing);
            vec2 vel = cells[y*width+x].vel * 0.01f;
            gfx_lines_draw(pos.x, pos.y, pos.x+vel.x, pos.y+vel.y);
        }
       
    gfx_lines_end();
}

vec2 flow_get(vec2 pos)
{
    if(!config.cl_flow)
        return vec2(0,0);
   
    int x = (int)(pos.x / spacing);
    int y = (int)(pos.y / spacing);
    if(x < 0 || y < 0 || x >= width || y >= height)
        return vec2(0,0);
   
    return cells[y*width+x].vel;
}

Seems like with the command cl_flow 1 the client calculate every refresh the velocity in a pyxel (x,y point). I don't know what it does, but from the code it seems to make the movements more smooth.

Support Staff - ESL.eu Teeworlds Admin

5

Re: [QUESTION] cl_flow ?

Lanta wrote:

Seems like with the command cl_flow 1 the client calculate every refresh the velocity in a pyxel (x,y point). I don't know what it does, but from the code it seems to make the movements more smooth.

Thanks! Your code-fu is strong... wink

6

Re: [QUESTION] cl_flow ?

icemaze wrote:
Lanta wrote:

Seems like with the command cl_flow 1 the client calculate every refresh the velocity in a pyxel (x,y point). I don't know what it does, but from the code it seems to make the movements more smooth.

Thanks! Your code-fu is strong... wink

I don't know if it really does that... maybe we'll wait for the anwer of a dev. It's better xD

Support Staff - ESL.eu Teeworlds Admin

7

Re: [QUESTION] cl_flow ?

It was for a fake simulation of airflow so smoke etc moved with the tees when they moved through it. Bullets ripping through the smoke etc.

http://shrine.teeworlds.com/old_movies/teewars8.ogm

Old movie of the experiment. The code is not optimized etc so it should be left disabled.

8

Re: [QUESTION] cl_flow ?

Yes xD it looks very well with the smoke and the wall when you hit it smile