From f80359fdca7f113e2c8b14f26c126c8c157c90c1 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 21 Feb 2010 23:30:12 +0000 Subject: [PATCH] proper particle cleanup in unit destructor; campfire is using new particles now --- source/glest_game/type_instances/unit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index cd81587e8..4a261e44a 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -154,6 +154,11 @@ Unit::~Unit(){ delete commands.back(); commands.pop_back(); } + // fade(and by this remove) all unit particle systems + while(!unitParticleSystems.empty()){ + unitParticleSystems.back()->fade(); + unitParticleSystems.pop_back(); + } } // ====================================== get ======================================