From 72b0c42e383b0bfbe04cd9a0f9e1566578bf67f2 Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Wed, 12 Jul 2006 14:51:52 +0000 Subject: [PATCH] No more shooting Igel from behind. SVN-Revision: 3988 --- src/badguy/igel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/badguy/igel.cpp b/src/badguy/igel.cpp index 0d305e502..6542761be 100644 --- a/src/badguy/igel.cpp +++ b/src/badguy/igel.cpp @@ -128,7 +128,8 @@ Igel::collision_solid(const CollisionHit& hit) // hit left or right switch(state) { case STATE_NORMAL: - turn_around(); + if( hit.left && dir == LEFT || hit.right && dir ==RIGHT ) + turn_around(); break; } } @@ -145,7 +146,8 @@ Igel::collision_badguy(BadGuy& , const CollisionHit& hit) switch(state) { case STATE_NORMAL: - turn_around(); + if( hit.left && dir == LEFT || hit.right && dir ==RIGHT ) + turn_around(); break; } @@ -154,8 +156,11 @@ Igel::collision_badguy(BadGuy& , const CollisionHit& hit) } HitResponse -Igel::collision_bullet(Bullet& , const CollisionHit& hit) +Igel::collision_bullet(Bullet& bullet, const CollisionHit& hit) { + //remove bullet + bullet.remove_me(); + // die if hit on front side if (((dir == LEFT) && hit.left) || ((dir == RIGHT) && hit.right)) { kill_fall(); -- 2.11.0