Skip to content

Commit 0732b73

Browse files
committed
up
1 parent 17fd42e commit 0732b73

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kbe/src/lib/entitydef/entity_component.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,10 @@ void EntityComponent::createFromDict(PyObject* pyDict)
13191319
//-------------------------------------------------------------------------------------
13201320
void EntityComponent::updateFromDict(PyObject* pyDict)
13211321
{
1322+
// 设置为-1, 避免onScriptSetAttribute中尝试广播属性
1323+
ENTITY_ID oid = ownerID_;
1324+
ownerID_ = -1;
1325+
13221326
PyObject *key, *value;
13231327
Py_ssize_t pos = 0;
13241328

@@ -1386,6 +1390,8 @@ void EntityComponent::updateFromDict(PyObject* pyDict)
13861390
}
13871391

13881392
SCRIPT_ERROR_CHECK();
1393+
1394+
ownerID_ = oid;
13891395
}
13901396

13911397
//-------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)