mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 19:51:45 +02:00
Some fixes for stick mans.
This commit is contained in:
@@ -192,8 +192,10 @@ int update_STKM(UPDATE_FUNC_ARGS) {
|
|||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
if (!r || (r>>8)>=NPART)
|
if (!r || (r>>8)>=NPART)
|
||||||
r = photons[y+ry][x+rx];
|
r = photons[y+ry][x+rx];
|
||||||
if (!r || (r>>8)>=NPART)
|
|
||||||
|
if ((!r || (r>>8)>=NPART) && !bmap[(y+ry)/CELL][(x+rx)/CELL])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
|
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
|
||||||
{
|
{
|
||||||
player[2] = r&0xFF; //Current element
|
player[2] = r&0xFF; //Current element
|
||||||
|
@@ -192,8 +192,10 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
|
|||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
if (!r || (r>>8)>=NPART)
|
if (!r || (r>>8)>=NPART)
|
||||||
r = photons[y+ry][x+rx];
|
r = photons[y+ry][x+rx];
|
||||||
if (!r || (r>>8)>=NPART)
|
|
||||||
|
if ((!r || (r>>8)>=NPART) && !bmap[(y+ry)/CELL][(x+rx)/CELL])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
|
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
|
||||||
{
|
{
|
||||||
player2[2] = r&0xFF; //Current element
|
player2[2] = r&0xFF; //Current element
|
||||||
@@ -304,7 +306,7 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
|
|||||||
r = pmap[(int)(player2[8]+ry)][(int)(player2[7]+0.5)]; //This is to make coding more pleasant :-)
|
r = pmap[(int)(player2[8]+ry)][(int)(player2[7]+0.5)]; //This is to make coding more pleasant :-)
|
||||||
|
|
||||||
//For left leg
|
//For left leg
|
||||||
if (r && (r&0xFF)!=PT_STKM)
|
if (r && (r&0xFF)!=PT_STKM2)
|
||||||
{
|
{
|
||||||
if ((r&0xFF)<PT_NUM && (ptypes[r&0xFF].state == ST_LIQUID || (r&0xFF) == PT_LNTG)) //Liquid checks
|
if ((r&0xFF)<PT_NUM && (ptypes[r&0xFF].state == ST_LIQUID || (r&0xFF) == PT_LNTG)) //Liquid checks
|
||||||
{
|
{
|
||||||
@@ -329,7 +331,7 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
|
|||||||
r = pmap[(int)(player2[16]+ry)][(int)(player2[15]+0.5)];
|
r = pmap[(int)(player2[16]+ry)][(int)(player2[15]+0.5)];
|
||||||
|
|
||||||
//For right leg
|
//For right leg
|
||||||
if (r && (r&0xFF)!=PT_STKM)
|
if (r && (r&0xFF)!=PT_STKM2)
|
||||||
{
|
{
|
||||||
if ((r&0xFF)<PT_NUM && (ptypes[r&0xFF].state == ST_LIQUID || (r&0xFF) == PT_LNTG))
|
if ((r&0xFF)<PT_NUM && (ptypes[r&0xFF].state == ST_LIQUID || (r&0xFF) == PT_LNTG))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user