From 6c3093cabf7cb16cf95eba2b7ea5bbb5ed33c863 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 25 Jun 2011 17:40:35 +0100 Subject: [PATCH] Hot air rises [Experimental] --- src/air.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/air.c b/src/air.c index c65e1a0c4..5f45662be 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; } }