File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1275,8 +1275,9 @@ PyObject* EntityComponent::createCellData()
1275
1275
// -------------------------------------------------------------------------------------
1276
1276
void EntityComponent::createFromDict (PyObject* pyDict)
1277
1277
{
1278
- ENTITY_ID old_ownerID = ownerID_;
1279
- ownerID_ = 0 ;
1278
+ // 设置为-1, 避免onScriptSetAttribute中尝试广播属性
1279
+ ENTITY_ID oid = ownerID_;
1280
+ ownerID_ = -1 ;
1280
1281
1281
1282
const ScriptDefModule::PROPERTYDESCRIPTION_MAP* pPropertyDescrs = pChildPropertyDescrs ();
1282
1283
@@ -1312,7 +1313,7 @@ void EntityComponent::createFromDict(PyObject* pyDict)
1312
1313
}
1313
1314
}
1314
1315
1315
- ownerID_ = old_ownerID ;
1316
+ ownerID_ = oid ;
1316
1317
}
1317
1318
1318
1319
// -------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments