From 6f81c61ffe4e9304f2cf43b622f1c3cbf0c2f0a9 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Mon, 12 Oct 2009 00:03:19 +0200 Subject: [PATCH] make monster behaviour configurable --- src/sim/makefile | 8 +++++++- src/sim/w_sprite.c | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/sim/makefile b/src/sim/makefile index f773cd9..bdf5847 100644 --- a/src/sim/makefile +++ b/src/sim/makefile @@ -13,8 +13,14 @@ CC = gcc OPTFLAGS = -O3 #OPTFLAGS = -g +#Possible defines: +#ORIGINAL_MONSTER_BEHAVIOUR: The monster is able to walk over water and not die +#NO_AIRCRASH: The Aircrash-Disaster is disables completely +#CAM: ? +#NET: ? + #DEFINES = -DIS_LINUX -DCAM -DNET -DEFINES = -DIS_LINUX #-DNO_AIRCRASH +DEFINES = -DIS_LINUX -DORIGINAL_MONSTER_BEHAVIOUR #-DNO_AIRCRASH CFLAGS += $(OPTFLAGS) $(DEFINES) -Wall diff --git a/src/sim/w_sprite.c b/src/sim/w_sprite.c index c7258bb..c8837d5 100644 --- a/src/sim/w_sprite.c +++ b/src/sim/w_sprite.c @@ -1052,7 +1052,14 @@ DoMonsterSprite(SimSprite *sprite) if (sprite->count > 0) sprite->count--; c = GetChar(sprite->x + sprite->x_hot, sprite->y + sprite->y_hot); - if (c == -1) { + if ((c == -1) +#ifndef ORIGINAL_MONSTER_BEHAVIOUR + || ((c == RIVER) && + (sprite->count != 0) && + (sprite->count < 900) && + (sprite->control == -1)) +#endif + ) { sprite->frame = 0; /* kill zilla */ } -- 2.39.5