summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Wallin <nibbler.v1@gmail.com>2010-10-02 18:03:00 (GMT)
committer Felix Wallin <nibbler.v1@gmail.com>2010-10-02 18:03:00 (GMT)
commit769dbfeedddc774b177e2089eaa5abe870205e6b (patch)
tree58c6c17a3ded5ae3a98b55ae744e256045dca7f0 /src
parentb501e45705b6819560fc7e40b47a92d0ed92db29 (diff)
downloadpowder-769dbfeedddc774b177e2089eaa5abe870205e6b.zip
powder-769dbfeedddc774b177e2089eaa5abe870205e6b.tar.gz
fixes to photons, thanks to skylark
Diffstat (limited to 'src')
-rw-r--r--src/powder.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/powder.c b/src/powder.c
index 79c1bd4..3ca1056 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -35,8 +35,11 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr)
r = (r&~0xFF) | parts[r>>8].type;
if(rr)
*rr = r;
-
- if(pt==PT_PHOT&&((r&0xFF)==PT_GLAS||(r&0xFF)==PT_PHOT||(r&0xFF)==PT_CLNE||((r&0xFF)==PT_LCRY||((r&0xFF)==PT_PCLN&&parts[r>>8].life > 5))))
+ if(pt==PT_PHOT&&(
+ (r&0xFF)==PT_GLAS || (r&0xFF)==PT_PHOT ||
+ (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN ||
+ (r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW ||
+ ((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5)))
return 2;
if(pt==PT_STKM) //Stick man's head shouldn't collide
@@ -73,7 +76,7 @@ int try_move(int i, int x, int y, int nx, int ny)
if(!e) {
if(!legacy_enable) {
if((r >> 8) < PT_NUM)
- parts[i].temp = parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);
+ parts[i].temp = parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);
}
return 0;
}