From f70314dfefe4ba752525dfecc85e399c08470ec7 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Mon, 22 Dec 2008 03:30:24 +0000 Subject: [PATCH] Can now slam monsters with the other player (they don't die) --- data/levels/level99.dat | 7 ++++--- rc.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/data/levels/level99.dat b/data/levels/level99.dat index 738c6c9..f2e3027 100644 --- a/data/levels/level99.dat +++ b/data/levels/level99.dat @@ -8,7 +8,8 @@ monsters 134 36 19 23 38 19 6 20 10 -157 3 18 +1 13 19 +1 23 19 endmonsters exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, @@ -30,8 +31,8 @@ exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,1,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1,1,1,1,1,1,4, +4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,4, +4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4, 4,0,0,0,0,0,0,0,0,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,1,1,1,1,1,1,4, 4,0,0,0,0,0,0,0,0,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,1,1,1,1,1,1,4, 4,0,0,0,0,0,0,0,0,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,1,1,1,1,1,1,4, diff --git a/rc.c b/rc.c index 7a76445..f2c99be 100644 --- a/rc.c +++ b/rc.c @@ -2138,7 +2138,13 @@ void checkcollide(sprite_t *s) { if (s2->id != P_BLACKCLOUD) { if ((s2->id == P_SNAIL) && (s2->invuln)) { // snail shell doesn't hurt us + } else if (s->caughtby) { + // can't die while being slammed + if (!s->caughtby->slamming) { + die(s); + } } else { +printf("dead!\n"); die(s); } } else { @@ -7220,6 +7226,10 @@ void dogravity(sprite_t *s) { jump(s2, s->dir); // away from the one who caught them s2->jumpspeed = 3; } + // still counts as a monster for hitting others + gotsomething++; + xnet = s2->x; + ynet = s2->y - s2->img->h/2; } else { /* will become a fruit when it finishes dying */ if (boss) {