From 99134da1b6f26b6c3c77cb982489919f2de89a5a Mon Sep 17 00:00:00 2001
From: johns <>
Date: Fri, 9 Jun 2000 14:03:48 +0000
Subject: [PATCH] Fixed bug: units in buildings are removed doubled from the
 map.

---
 src/unit/unit.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp
index 3380e1f13..5cacb6777 100644
--- a/src/unit/unit.cpp
+++ b/src/unit/unit.cpp
@@ -9,11 +9,10 @@
 //	   FreeCraft - A free fantasy real time strategy game engine
 //
 /**@name unit.c		-	The units. */
-/*
-**	(c) Copyright 1998-2000 by Lutz Sammer
-**
-**	$Id$
-*/
+//
+//	(c) Copyright 1998-2000 by Lutz Sammer
+//
+//	$Id$
 
 //@{
 
@@ -30,7 +29,6 @@
 #include "freecraft.h"
 
 #include "video.h"
-#include "sound_id.h"
 #include "unitsound.h"
 #include "unittype.h"
 #include "player.h"
@@ -480,6 +478,10 @@ global void RemoveUnit(Unit* unit)
     int w;
     const UnitType* type;
 
+    if( unit->Removed ) {		// could happen!
+	// If unit is removed (inside) and building is destroyed.
+	return;
+    }
     unit->Removed=1;
 
     //  Remove unit from the current selection