finish PreDelete and CheckPreDeletion. now there is no problem when deleting object

This commit is contained in:
2023-09-20 15:25:43 +08:00
parent a06f6a58c9
commit 81872053f0
16 changed files with 100 additions and 28 deletions

View File

@ -10,15 +10,7 @@ namespace LibCmo::CK2::ObjImpls {
CKBeObject::CKBeObject(CKContext* ctx, CK_ID ckid, CKSTRING name) :
CKSceneObject(ctx, ckid, name), m_Groups() {}
CKBeObject::~CKBeObject() {
// remove self from all group
//for (size_t i = 0; i < m_Groups.size(); ++i) {
// if (m_Groups[i]) {
// CKGroup* group = static_cast<CKGroup*>(m_Context->GetObjectManager()->GetGroupByGlobalIndex(static_cast<CKDWORD>(i)));
// group->RemoveObject(this);
// }
//}
}
CKBeObject::~CKBeObject() {}
bool CKBeObject::Save(CKStateChunk* chunk, CKFileVisitor* file, CKDWORD flags) {
bool suc = CKSceneObject::Save(chunk, file, flags);