summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/stkm.c4
-rw-r--r--src/elements/stkm2.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/elements/stkm.c b/src/elements/stkm.c
index 9a8a1ff..8b19406 100644
--- a/src/elements/stkm.c
+++ b/src/elements/stkm.c
@@ -192,8 +192,10 @@ int update_STKM(UPDATE_FUNC_ARGS) {
r = pmap[y+ry][x+rx];
if (!r || (r>>8)>=NPART)
r = photons[y+ry][x+rx];
- if (!r || (r>>8)>=NPART)
+
+ if ((!r || (r>>8)>=NPART) && !bmap[(y+ry)/CELL][(x+rx)/CELL])
continue;
+
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
{
player[2] = r&0xFF; //Current element
diff --git a/src/elements/stkm2.c b/src/elements/stkm2.c
index 4498060..32f8619 100644
--- a/src/elements/stkm2.c
+++ b/src/elements/stkm2.c
@@ -192,8 +192,10 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
r = pmap[y+ry][x+rx];
if (!r || (r>>8)>=NPART)
r = photons[y+ry][x+rx];
- if (!r || (r>>8)>=NPART)
+
+ if ((!r || (r>>8)>=NPART) && !bmap[(y+ry)/CELL][(x+rx)/CELL])
continue;
+
if (ptypes[r&0xFF].falldown!=0 || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT)
{
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 :-)
//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
{
@@ -329,7 +331,7 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
r = pmap[(int)(player2[16]+ry)][(int)(player2[15]+0.5)];
//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))
{