summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-10-05 19:51:48 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-06 20:57:09 (GMT)
commitae3241ec80a252e86b8504304a3e03188d57022f (patch)
treef40441d34c80ce5cbb550254b383ec0d984ba400 /src
parent3e88325632bd6437204ae7c90fdde04293fcd406 (diff)
downloadpowder-ae3241ec80a252e86b8504304a3e03188d57022f.zip
powder-ae3241ec80a252e86b8504304a3e03188d57022f.tar.gz
Fix WHOL/VENT not eating ANAR, and fix PVOD eating PHOT/NEUT when off
Diffstat (limited to 'src')
-rw-r--r--src/powder.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/powder.c b/src/powder.c
index 16ae1f6..1b526e9 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -133,8 +133,8 @@ void init_can_move()
can_move[PT_PHOT][PT_LCRY] = 3;//varies according to LCRY life
can_move[PT_NEUT][PT_INVIS] = 2;
//whol eats anar
- can_move[PT_ANAR][PT_WHOL] = 2;
- can_move[PT_ANAR][PT_NWHL] = 2;
+ can_move[PT_ANAR][PT_WHOL] = 1;
+ can_move[PT_ANAR][PT_NWHL] = 1;
}
/*
@@ -168,6 +168,11 @@ int eval_move(int pt, int nx, int ny, unsigned *rr)
if (pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f) result = 2;
else result = 0;
}
+ if ((r&0xFF)==PT_PVOD)
+ {
+ if (parts[r>>8].life == 10) result = 1;
+ else result = 0;
+ }
}
if (bmap[ny/CELL][nx/CELL])
{
@@ -288,7 +293,7 @@ int try_move(int i, int x, int y, int nx, int ny)
}
//else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later
- if ((r&0xFF)==PT_VOID) //this is where void eats particles
+ if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles
{
if (parts[i].type == PT_STKM)
{
@@ -301,21 +306,6 @@ int try_move(int i, int x, int y, int nx, int ny)
parts[i].type=PT_NONE;
return 0;
}
- if ((r&0xFF)==PT_PVOD) //this is where void eats particles
- {
- if(parts[r>>8].life == 10){
- if (parts[i].type == PT_STKM)
- {
- player[27] = 0;
- }
- if (parts[i].type == PT_STKM2)
- {
- player2[27] = 0;
- }
- parts[i].type=PT_NONE;
- }
- return 0;
- }
if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles
{
if (parts[i].type == PT_STKM)