summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-06-25 16:40:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-25 16:40:35 (GMT)
commit6c3093cabf7cb16cf95eba2b7ea5bbb5ed33c863 (patch)
treead3285638b0b25d1a7b0778c4ad2ca2466ef1b20 /src
parentf5bbc13384308424f3b034547928fd98fa4754c4 (diff)
downloadpowder-6c3093cabf7cb16cf95eba2b7ea5bbb5ed33c863.zip
powder-6c3093cabf7cb16cf95eba2b7ea5bbb5ed33c863.tar.gz
Hot air rises [Experimental]
Diffstat (limited to 'src')
-rw-r--r--src/air.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/air.c b/src/air.c
index c65e1a0..5f45662 100644
--- a/src/air.c
+++ b/src/air.c
@@ -108,6 +108,12 @@ void update_airh(void)
dh += AIR_VADV*(1.0f-tx)*ty*hv[j+1][i];
dh += AIR_VADV*tx*ty*hv[j+1][i+1];
}
+ if(!gravityMode){ //Vertical gravity only for the time being
+ float airdiff = dh-hv[y][x];
+ pv[y][x] += airdiff/5000.0f;
+ if(airdiff>0)
+ vy[y][x] -= airdiff/5000.0f;
+ }
ohv[y][x] = dh;
}
}