Fixed WHOL and BHOL bug.
This commit is contained in:
parent
5960855c32
commit
854f10924d
4
powder.c
4
powder.c
@ -2107,13 +2107,13 @@ void update_particles_i(pixel *vid, int start, int inc){
|
|||||||
set_emap((int)(player[15]+0.5)/CELL, (int)(player[16]+0.5)/CELL);
|
set_emap((int)(player[15]+0.5)/CELL, (int)(player[16]+0.5)/CELL);
|
||||||
|
|
||||||
//Searching for particles near head
|
//Searching for particles near head
|
||||||
//r = 10;
|
|
||||||
for(nx = -2; nx <= 2; nx++)
|
for(nx = -2; nx <= 2; nx++)
|
||||||
for(ny = 0; ny>=-2; ny--)
|
for(ny = 0; ny>=-2; ny--)
|
||||||
{
|
{
|
||||||
if(!pmap[ny+y][nx+x] || (pmap[ny+y][nx+x]>>8)>=NPART)
|
if(!pmap[ny+y][nx+x] || (pmap[ny+y][nx+x]>>8)>=NPART)
|
||||||
continue;
|
continue;
|
||||||
if((pstates[pmap[ny+y][nx+x]&0xFF].state != ST_SOLID && (pmap[ny+y][nx+x]&0xFF)!=PT_STKM)
|
if((pstates[pmap[ny+y][nx+x]&0xFF].state != ST_SOLID && (pmap[ny+y][nx+x]&0xFF)!=PT_STKM
|
||||||
|
&& (pmap[ny+y][nx+x]&0xFF)!=PT_WHOL && (pmap[ny+y][nx+x]&0xFF)!=PT_BHOL)
|
||||||
|| (pmap[ny+y][nx+x]&0xFF) == PT_LNTG)
|
|| (pmap[ny+y][nx+x]&0xFF) == PT_LNTG)
|
||||||
{
|
{
|
||||||
player[2] = pmap[ny+y][nx+x]&0xFF; //Current element
|
player[2] = pmap[ny+y][nx+x]&0xFF; //Current element
|
||||||
|
Reference in New Issue
Block a user