]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/bosses.cpp
Capitalize Makefiles.
[quix0rs-blobwars.git] / src / bosses.cpp
index 609b23faa62c66296d736f9413a994b3ce96b3e0..0af6d84d875dcb866100f3ce0c9f444abf595a0e 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -398,11 +399,12 @@ void doBosses()
                                {
                                        debug(("Deleting unreferenced Boss...\n"));
                                        
+                                       if(map.mainBossPart == map.boss[i])
+                                               map.mainBossPart = NULL;
                                        delete map.boss[i];
                                        map.boss[i] = NULL;
-                               }
-                               
-                               self->referenced = false;
+                               } else
+                                       self->referenced = false;
                        }
                }
                else if (self->actionFinished())