[colobot] 27/377: Fixed #639
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:33:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit d03ce19fbe085cc38a74f80034ea0bf1c8844519
Author: krzys-h <krzys_h at interia.pl>
Date: Wed Sep 30 20:54:36 2015 +0200
Fixed #639
---
src/object/old_object.cpp | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp
index d327c7a..ca68afe 100644
--- a/src/object/old_object.cpp
+++ b/src/object/old_object.cpp
@@ -286,6 +286,22 @@ void COldObject::DeleteObject(bool bAll)
}
}
+ if (!bAll)
+ {
+ if (m_power != nullptr)
+ {
+ if (m_power->Implements(ObjectInterfaceType::Old))
+ dynamic_cast<COldObject*>(m_power)->DeleteObject(bAll);
+ m_power = nullptr;
+ }
+ if (m_cargo != nullptr)
+ {
+ if (m_cargo->Implements(ObjectInterfaceType::Old))
+ dynamic_cast<COldObject*>(m_cargo)->DeleteObject(bAll);
+ m_cargo = nullptr;
+ }
+ }
+
if ( !bAll ) m_main->CreateShortcuts();
}
@@ -536,19 +552,6 @@ void COldObject::DestroyObject(DestructionType type)
m_team = 0; // Back to neutral on destruction
- if (m_power != nullptr)
- {
- if (m_power->Implements(ObjectInterfaceType::Old))
- dynamic_cast<COldObject*>(m_power)->m_transporter = nullptr;
- m_power = nullptr;
- }
- if (m_cargo != nullptr)
- {
- if (m_cargo->Implements(ObjectInterfaceType::Old))
- dynamic_cast<COldObject*>(m_cargo)->m_transporter = nullptr;
- m_cargo = nullptr;
- }
-
if ( m_botVar != nullptr )
{
if ( Implements(ObjectInterfaceType::Transportable) ) // (*)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list