We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17fd42e commit 0732b73Copy full SHA for 0732b73
kbe/src/lib/entitydef/entity_component.cpp
@@ -1319,6 +1319,10 @@ void EntityComponent::createFromDict(PyObject* pyDict)
1319
//-------------------------------------------------------------------------------------
1320
void EntityComponent::updateFromDict(PyObject* pyDict)
1321
{
1322
+ // 设置为-1, 避免onScriptSetAttribute中尝试广播属性
1323
+ ENTITY_ID oid = ownerID_;
1324
+ ownerID_ = -1;
1325
+
1326
PyObject *key, *value;
1327
Py_ssize_t pos = 0;
1328
@@ -1386,6 +1390,8 @@ void EntityComponent::updateFromDict(PyObject* pyDict)
1386
1390
}
1387
1391
1388
1392
SCRIPT_ERROR_CHECK();
1393
1394
+ ownerID_ = oid;
1389
1395
1396
1397
0 commit comments