fix gravity
This commit is contained in:
parent
ddfcb7c9f6
commit
98835f2259
3
powder.c
3
powder.c
@ -1531,7 +1531,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL];
|
||||
} else {
|
||||
parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL];
|
||||
if(gravityd == 1)
|
||||
if(gravityd == 1) //gravity control stuff
|
||||
{
|
||||
parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity;
|
||||
parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL] - ptypes[t].gravity;
|
||||
@ -1552,6 +1552,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
if(gravityd == 5)
|
||||
{
|
||||
parts[i].vx += ptypes[t].advection*vy[y/CELL][x/CELL];
|
||||
parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL];
|
||||
}
|
||||
if(gravityd == 6)
|
||||
{
|
||||
|
Reference in New Issue
Block a user