From 5960855c328f09538bc04d95c11f1e16b1a3af8e Mon Sep 17 00:00:00 2001 From: savask Date: Sat, 14 Aug 2010 00:48:09 +0800 Subject: [PATCH] Fixed bugs with LN2. Now cold (-30) harms stick man. --- powder.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/powder.c b/powder.c index 4d49b41b8..c003ccd83 100755 --- a/powder.c +++ b/powder.c @@ -2042,7 +2042,8 @@ void update_particles_i(pixel *vid, int start, int inc){ //Go left if (((int)(player[0])&0x01) == 0x01) { - if (pstates[pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF].state != ST_LIQUID) + if (pstates[pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF].state != ST_LIQUID + && (pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF) != PT_LNTG) { if (pmap[(int)(player[8]-1)][(int)(player[7])]) { @@ -2071,7 +2072,8 @@ void update_particles_i(pixel *vid, int start, int inc){ //Go right if (((int)(player[0])&0x02) == 0x02) { - if (pstates[pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF].state != ST_LIQUID) + if (pstates[pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF].state != ST_LIQUID + && (pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF) != PT_LNTG) { if (pmap[(int)(player[8]-1)][(int)(player[7])]) { @@ -2111,13 +2113,10 @@ void update_particles_i(pixel *vid, int start, int inc){ { if(!pmap[ny+y][nx+x] || (pmap[ny+y][nx+x]>>8)>=NPART) continue; - if(pmap[ny+y][nx+x] && (pmap[ny+y][nx+x]&0xFF)!=0xFF - && pstates[pmap[ny+y][nx+x]&0xFF].state != ST_SOLID - //&& (abs(nx-x)+abs(ny-y))>8); } + if((pmap[ny+y][nx+x]&0xFF) == PT_NEUT) { parts[i].life -= (102-parts[i].life)/2; @@ -2203,7 +2203,7 @@ void update_particles_i(pixel *vid, int start, int inc){ //For left leg if (r && (r&0xFF)!=PT_STKM) { - if(pstates[r&0xFF].state == ST_LIQUID || pstates[r&0xFF].state == ST_GAS) //Liquid checks + if(pstates[r&0xFF].state == ST_LIQUID || pstates[r&0xFF].state == ST_GAS || (r&0xFF)==PT_LNTG) //Liquid checks { if(parts[i].y<(player[8]-10)) parts[i].vy = 1; @@ -2225,7 +2225,7 @@ void update_particles_i(pixel *vid, int start, int inc){ //For right leg if (r && (r&0xFF)!=PT_STKM) { - if(pstates[r&0xFF].state == ST_LIQUID || pstates[r&0xFF].state == ST_GAS) + if(pstates[r&0xFF].state == ST_LIQUID || pstates[r&0xFF].state == ST_GAS || (r&0xFF)==PT_LNTG) { if(parts[i].y<(player[16]-10)) parts[i].vy = 1; @@ -2271,11 +2271,11 @@ void update_particles_i(pixel *vid, int start, int inc){ parts[i].life -= (int)(rand()/1000)+38; } - if (r>0 && (r>>8)0 && (r>>8)>8].temp>=50) + if(parts[r>>8].temp>=50 || parts[r>>8].temp<=-30) { - parts[i].life -= 5; + parts[i].life -= 2; player[16] -= 1; } } @@ -2292,11 +2292,11 @@ void update_particles_i(pixel *vid, int start, int inc){ parts[i].life -= (int)(rand()/1000)+38; } - if(r>0 && (r>>8)0 && (r>>8)>8].temp>=50) + if(parts[r>>8].temp>=50 || parts[r>>8].temp<=-30) { - parts[i].life -= 5; + parts[i].life -= 2; player[8] -= 1; } }