Stickman bottom edge fix (savask)
This commit is contained in:
parent
dbba90eb01
commit
8768223f46
23
powder.c
Executable file → Normal file
23
powder.c
Executable file → Normal file
@ -1115,7 +1115,9 @@ inline int create_part(int p, int x, int y, int t)
|
||||
parts[i].life = 100;
|
||||
parts[i].ctype = 0;
|
||||
parts[i].temp = ptypes[t].heat;
|
||||
player[2] = PT_DUST;
|
||||
|
||||
|
||||
|
||||
player[3] = x-1; //Setting legs positions
|
||||
player[4] = y+6;
|
||||
player[5] = x-1;
|
||||
@ -2465,7 +2467,8 @@ killed:
|
||||
{
|
||||
if(!pmap[ny+y][nx+x] || (pmap[ny+y][nx+x]>>8)>=NPART)
|
||||
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 || ptypes[pmap[ny+y][nx+x]&0xFF].falldown > 0) &&
|
||||
(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)
|
||||
{
|
||||
@ -2518,8 +2521,8 @@ killed:
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[r>>8].vy = 0;
|
||||
parts[r>>8].vx = (((((int)player[1])&0x02) == 0x02) - (((int)(player[1])&0x01) == 0x01))*random;
|
||||
parts[r>>8].vy = -(player[1] == 0)*random;
|
||||
parts[r>>8].vx = (player[1]!=0)*(((((int)player[1])&0x02) == 0x02) - (((int)(player[1])&0x01) == 0x01))*random;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2577,6 +2580,9 @@ killed:
|
||||
//Collision checks
|
||||
for(ny = -2-(int)parts[i].vy; ny<=0; ny++)
|
||||
{
|
||||
if ((int)(ny+player[8])>=YRES)
|
||||
continue;
|
||||
|
||||
r = pmap[(int)(player[8]+ny)][(int)(player[7]+0.5)]; //This is to make coding more pleasant :-)
|
||||
|
||||
//For left leg
|
||||
@ -2599,6 +2605,9 @@ killed:
|
||||
player[9] = player[7];
|
||||
}
|
||||
|
||||
if ((int)(ny+player[16])>=YRES)
|
||||
continue;
|
||||
|
||||
r = pmap[(int)(player[16]+ny)][(int)(player[15]+0.5)];
|
||||
|
||||
//For right leg
|
||||
@ -10860,6 +10869,12 @@ int main(int argc, char *argv[])
|
||||
drawtext(vid_buf, 16, 16, uitext, 32, 216, 255, 200);
|
||||
}
|
||||
sdl_blit(0, 0, XRES+BARSIZE, YRES+MENUSIZE, vid_buf, XRES+BARSIZE);
|
||||
|
||||
//Setting an element for the stick man
|
||||
if(ptypes[sr].falldown>0)
|
||||
player[2] = sr;
|
||||
else
|
||||
player[2] = PT_DUST;
|
||||
}
|
||||
|
||||
http_done();
|
||||
|
Loading…
Reference in New Issue
Block a user