From f33ffaf18b57f98e2bbc83ad0452e036b4929041 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 27 Dec 2016 15:32:38 +0100 Subject: [PATCH] Fix mission end before astronaut death scene is finished (#848) --- src/object/old_object.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index c8937423..1f2f6e29 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -2654,7 +2654,10 @@ bool COldObject::IsDying() bool COldObject::GetActive() { - return !GetLock() && !(Implements(ObjectInterfaceType::Destroyable) && IsDying()) && !m_bFlat; + // Dying astronaut (m_dying == DeathType::Dead) should be treated as active + // This is for EndMissionTake to not detect him as actually dead until the animation is finished + + return !GetLock() && !(Implements(ObjectInterfaceType::Destroyable) && IsDying() && GetDying() != DeathType::Dead) && !m_bFlat; } bool COldObject::GetDetectable()